]> Lady’s Gitweb - Shushe/commit
Add support for manually serializing X·M·L
authorLady <redacted>
Sun, 14 Apr 2024 19:44:22 +0000 (15:44 -0400)
committerLady <redacted>
Sun, 14 Apr 2024 19:44:22 +0000 (15:44 -0400)
commit3dc36d1f23aff7cb60b498d88e503b619a7bc543
tree95db0e8f20558f67c4187f1e0f3e833342ed731d
parentc26abcf07cd0f116b5810946744dd804cc41a208
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).
README.markdown
lib/catalog2transform.xslt
lib/serialize.xslt [new file with mode: 0644]
transforms/serialization.xslt [new file with mode: 0644]
This page took 0.054546 seconds and 4 git commands to generate.