From: Lady Date: Sun, 14 Apr 2024 19:44:22 +0000 (-0400) Subject: Add support for manually serializing X·M·L X-Git-Tag: 0.7.2~1 X-Git-Url: https://git.ladys.computer/Shushe/commitdiff_plain/3dc36d1f23aff7cb60b498d88e503b619a7bc543?hp=3dc36d1f23aff7cb60b498d88e503b619a7bc543 Add support for manually serializing X·M·L This commit adds a transform for a new `<书社:serialize-xml>` element, which is useful in conjunction with `<书社:raw-text>` to produce a more finely‐controlled X·M·L output, or in other X·M·L‐y situations where an escaped X·M·L value is required. The algorithm used for serialization attempts to closely match the DOM Parsing and Serialization spec, including such behaviours as mandating an undeclared `xml:` prefix for the X·M·L name·space and dropping the prefix from elements whose name·space matches the default, but it probably isn’t exactly the same (due in part to the fact that the underlying data structure is an X·M·L infoset, not a potentially dynamically‐modified Dom). No special allowances are made for elements in the H·T·M·L name·space; this is not (yet) a suitable polyglot serializer (or intended to be one). ---