PureXML/Sources/XSLT
Mihaela Mihaljevic 1ba6bf86e2
fix(xslt): serialize a namespaced element as XML under the html output method (16.2) (#260)
* fix(xslt): serialize a namespaced element as XML under the html output method

XSLT 1.0 16.2: the html output method outputs an element whose expanded-name
has a non-null namespace URI as XML, not HTML. A namespaced document element's
tree was serialized as HTML, leaving empty namespaced elements unclosed (e.g.
a void name like br in a namespace) and repeating xmlns on every element, which
is not well-formed XML. Such a tree now serializes through the XML path (empty
elements self-close, the namespace is declared once and inherited); the html
method still omits the XML declaration. Null-namespace trees are unchanged.

Grounded in XSLT 1.0 16.2 and the libxml2 HTML serializer study; reimplemented
in Swift. Apache Xalan output63 exercises this rule but stays baselined because
its gold differs further only in non-normative attribute order.

* docs(xslt): disclose the document-element granularity of the 16.2 namespace rule

Make the whole-tree approximation explicit in the serializedBody comment and
the changelog: the html-outputs-namespaced-elements-as-XML rule is applied at
document-element granularity, not per element, so a mixed-namespace tree
follows its document element's path.
2026-06-24 02:48:50 +02:00
..
XSLTAVT.swift
XSLTCollation.swift
XSLTDocumentCache.swift fix(xslt): resolve string-form document() against the stylesheet element's base URI (closes mdocs12/13) (#257) 2026-06-24 02:03:32 +02:00
XSLTElements.swift XSLT/XPath conformance: close 68 Apache Xalan cases (#254) 2026-06-24 00:13:14 +02:00
XSLTFunctions.swift fix(xslt): resolve string-form document() against the stylesheet element's base URI (closes mdocs12/13) (#257) 2026-06-24 02:03:32 +02:00
XSLTGlobals.swift fix(xslt): resolve string-form document() against the stylesheet element's base URI (closes mdocs12/13) (#257) 2026-06-24 02:03:32 +02:00
XSLTLookups.swift fix(xslt): resolve document() references against the correct base URI (closes 3 Xalan reluri cases) (#256) 2026-06-24 01:30:54 +02:00
XSLTMatchCache.swift XSLT/XPath conformance: close 68 Apache Xalan cases (#254) 2026-06-24 00:13:14 +02:00
XSLTModel.swift fix(xslt): resolve string-form document() against the stylesheet element's base URI (closes mdocs12/13) (#257) 2026-06-24 02:03:32 +02:00
XSLTNamespaceFixup.swift
XSLTNumbering.swift
XSLTParser.swift fix(xslt): resolve string-form document() against the stylesheet element's base URI (closes mdocs12/13) (#257) 2026-06-24 02:03:32 +02:00
XSLTParserDeclarations.swift fix(xslt): match template, key, attribute-set, decimal-format names by expanded QName (#255) 2026-06-24 00:44:27 +02:00
XSLTParserEntry.swift fix(xslt): resolve string-form document() against the stylesheet element's base URI (closes mdocs12/13) (#257) 2026-06-24 02:03:32 +02:00
XSLTParserStructural.swift
XSLTRawText.swift
XSLTRuntime.swift fix(xslt): resolve string-form document() against the stylesheet element's base URI (closes mdocs12/13) (#257) 2026-06-24 02:03:32 +02:00
XSLTSorting.swift fix(xslt): resolve string-form document() against the stylesheet element's base URI (closes mdocs12/13) (#257) 2026-06-24 02:03:32 +02:00
XSLTTransform.swift fix(xslt): serialize a namespaced element as XML under the html output method (16.2) (#260) 2026-06-24 02:48:50 +02:00
XSLTTransformer.swift fix(xslt): resolve string-form document() against the stylesheet element's base URI (closes mdocs12/13) (#257) 2026-06-24 02:03:32 +02:00
XSLTUnitCollector.swift
XSLTWhitespace.swift