Commit Graph

261 Commits

Author SHA1 Message Date
a8cf4d2d76 Merge #90: DOM node kinds, ownerDocument, adoption 2026-06-09 03:43:32 +02:00
46131bff1b feat(model): first-class doctype/entity-reference/namespace nodes, ownerDocument, adoption (#90) 2026-06-09 03:43:24 +02:00
a71178ba9b docs: move closed Schematron #80 to done in roadmap 2026-06-09 03:31:29 +02:00
5c9c6366bd docs: refresh test count to 666 2026-06-09 03:30:44 +02:00
4256670758 Merge: Schematron key/document/current functions (#80) 2026-06-09 03:30:44 +02:00
2db9915fb2 feat(schematron): support key(), document(), and current() in tests
Schematron tests, lets, and message expressions can now use key() backed
by xsl:key declarations parsed from the schema, document() loading an
external file through an injected documentLoader, and current() resolving
to the rule context node. A node-keyed function-table factory threads
through the evaluation. Completes the Schematron audit.
2026-06-09 03:30:43 +02:00
e1a0b5698c docs: move closed RELAX NG #79 to done in roadmap 2026-06-09 03:21:37 +02:00
259aa251fd docs: refresh test count to 662 2026-06-09 03:20:48 +02:00
7487f50e0e Merge: RNC follow-annotations (#79) 2026-06-09 03:20:48 +02:00
dbdf98e231 feat(relaxng): skip RNC >> follow-annotations, completing #79
A >> follow-annotation after a pattern (a foreign element name with
optional [ ... ] content) is skipped, chaining and combining with leading
annotations; neither carries schema semantics. Namespace declarations
inside annotations were already dropped by the annotation skipper, so the
RNC compact syntax is now fully covered.
2026-06-09 03:20:47 +02:00
45001f3422 docs: bring the shipped-overview roadmap node current with catalog #86 and XSLT #81 #82 2026-06-09 03:16:05 +02:00
0865fac3f9 docs: move closed XSLT #82 to done in roadmap 2026-06-09 03:14:01 +02:00
47d4390020 docs: refresh test count to 658 2026-06-09 03:12:50 +02:00
5a9a75ee35 Merge: XSLT document() fragments and base-URI (#82) 2026-06-09 03:12:49 +02:00
7c24ada92b feat(xslt): document() fragments and base-URI resolution, completing #82
A document() reference with a #fragment selects a subset of the loaded
document via XPointer; a node-set first argument unions the documents
named by each node's string value; and a relative URI is resolved against
a caller-supplied baseURI (the loader is wrapped so xsl:include/xsl:import
resolve the same way). Closes the XSLT function/output audit.
2026-06-09 03:12:49 +02:00
a65668d1fc docs: refresh test count to 654 2026-06-09 03:04:56 +02:00
95073da7ed Merge: XSLT result-tree fragment as node-set (#82) 2026-06-09 03:04:56 +02:00
4ea84b3d58 feat(xslt): make result-tree fragments usable as node-sets
An xsl:variable with a body now binds a queryable document fragment (its
instantiated result converted to a TreeNode document) instead of a plain
string, so count($rtf/*), $rtf/child, and for-each over $rtf/... work.
It still has its concatenated text as a string value, so existing string
uses are unchanged. Part of #82.
2026-06-09 03:04:56 +02:00
aa65842bcc docs: refresh test count to 649 2026-06-09 02:58:35 +02:00
421eda4e78 Merge: XSLT cdata-section-elements (#82) 2026-06-09 02:58:35 +02:00
3fec78da51 feat(xslt): implement xsl:output cdata-section-elements
The text content of the named result elements is emitted in CDATA
sections rather than escaped: the result tree's text children of those
elements are converted to CDATA nodes before serialization, leaving
nested and other elements unaffected. Part of #82.
2026-06-09 02:58:34 +02:00
9b07a5901d docs: refresh test count to 645 2026-06-09 02:53:51 +02:00
f1113c7787 Merge: XSLT output doctype (#82) 2026-06-09 02:53:51 +02:00
2a40300479 feat(xslt): emit xsl:output doctype-public/doctype-system
When doctype-system (optionally with doctype-public) is set on xsl:output,
a <!DOCTYPE> for the result's root element is emitted before the
serialized output: PUBLIC when both identifiers are given, SYSTEM
otherwise. Works for the XML and HTML output methods. Part of #82.
2026-06-09 02:53:50 +02:00
9545802be6 docs: refresh test count to 642 2026-06-09 02:50:24 +02:00
f00c9086cf Merge: XSLT key() node-set argument (#82) 2026-06-09 02:50:24 +02:00
47b88f19b2 feat(xslt): key() over a node-set second argument
key(name, node-set), including key('k', .), now unions the indexed nodes
for every value node's string value and de-duplicates, instead of using
only the first node's string value. A string value still works directly.
Part of #82.
2026-06-09 02:50:24 +02:00
73f8fb74af docs: refresh test count to 639 2026-06-09 02:48:01 +02:00
f9b82bb749 Merge: XSLT method=html output (#82) 2026-06-09 02:48:00 +02:00
41a48d3130 feat(xslt): serialize method=html output by the HTML rules
An xsl:output method=html result is serialized through PureXML.HTML
(void elements emitted without a self-closing slash, raw-text elements
like script/style left unescaped) instead of as XML. Part of #82.
2026-06-09 02:48:00 +02:00
20d7b0e748 docs: refresh test count to 635 2026-06-09 02:37:43 +02:00
999db770e6 Merge: XSLT xsl:sort case-order (#82) 2026-06-09 02:37:43 +02:00
e30672d72b feat(xslt): implement xsl:sort case-order
case-order=upper-first/lower-first makes the string comparison
case-insensitive, with case used only to break ties among otherwise-equal
strings; without it the default codepoint order is unchanged. Part of #82.
2026-06-09 02:37:43 +02:00
46393b3aa2 docs: document the pull/push/SAX/tree consumption modes
Make explicit that input is consumed step by step with bounded memory via
the pull cursor (EventReader/TextReader), push/feed, and SAX, and that only
the tree mode materializes the whole document.
2026-06-09 02:24:02 +02:00
943c9e9b09 docs: refresh test count to 632 2026-06-09 02:20:36 +02:00
33b1883efe Merge: XSLT functions bundle (#82) 2026-06-09 02:20:36 +02:00
322fd013e9 feat(xslt): add generate-id, system-property, *-available functions
generate-id returns a stable per-node identifier (the context node when
no argument is given, the empty string for an empty node-set);
system-property reports the XSLT version and vendor; element-available and
function-available answer against the implemented instruction and function
sets; unparsed-entity-uri is a stub. Part of #82.
2026-06-09 02:20:36 +02:00
f34120a70e docs: move closed XSLT elements #81 to done in roadmap 2026-06-09 02:11:13 +02:00
ae847c32d6 docs: refresh test count to 627 2026-06-09 02:10:17 +02:00
525e047d66 Merge: XSLT xsl:namespace-alias (#81) 2026-06-09 02:10:17 +02:00
610b7d0ca0 feat(xslt): implement xsl:namespace-alias, completing #81
A literal result element and its attributes in a stylesheet namespace
bound by stylesheet-prefix are rewritten on output to the namespace and
prefix bound by result-prefix (#default supported), so a stylesheet can
emit literal xsl: elements. Prefixes resolve through the in-scope xmlns
declarations; aliases fold across include/import. Splits AVT parsing into
XSLTAVT.swift and trims the transformer to stay within length budgets.
2026-06-09 02:10:16 +02:00
26ebeed155 docs: refresh test count to 624 2026-06-09 01:59:40 +02:00
19baa0cd75 Merge: XSLT xsl:decimal-format (#81) 2026-06-09 01:59:40 +02:00
2d2572e265 feat(xslt): implement xsl:decimal-format for format-number
format-number now honors named and default decimal formats: the decimal
separator, grouping separator, percent, minus sign, zero-digit (for
non-Latin digit sets), NaN, and infinity symbols come from the chosen
xsl:decimal-format, in both the picture and the output. FormatNumber is
parameterized over the symbol set and the formats thread through the
function table; folded across include/import.
2026-06-09 01:59:37 +02:00
2f79be18e1 docs: refresh test count to 619 2026-06-09 01:52:22 +02:00
618bf170c8 Merge: XSLT xsl:fallback (#81) 2026-06-09 01:52:22 +02:00
61ab8ce8f9 feat(xslt): implement xsl:fallback for forwards-compatible processing
An unrecognized XSLT element instantiates its xsl:fallback children in its
place, or is dropped when it has none; a fallback under a supported
instruction is ignored. The fallback content is handled in the instantiate
loop alongside variables, so the evaluate dispatch stays within budget.
2026-06-09 01:52:21 +02:00
0dae8e5670 docs: refresh test count to 615 2026-06-09 01:49:34 +02:00
b9e2cd9fa5 Merge: XSLT xsl:apply-imports (#81) 2026-06-09 01:49:34 +02:00
4f11bafa28 feat(xslt): implement xsl:apply-imports
Re-applies templates to the current node in the current mode, considering
only templates of lower import precedence than the one being instantiated,
falling back to the built-in rule when none match. Threads the current
mode and import precedence through the evaluation context, and moves the
transformer runtime types into XSLTRuntime.swift (namespaced, via private
aliases) to stay within the file-length and namespacing gates.
2026-06-09 01:49:33 +02:00