Skip to content

v0.9.0

Choose a tag to compare

@github-actions github-actions released this 30 Sep 11:18
· 143 commits to main since this release
1497b3c

Highlights

Performance

XSD, XPath 1.0, C14N and RELAX NG are 2–8× faster than v0.8.0 on the bundled benchmarks, with 60–95% less memory on
larger inputs (benchstat, 6 alternating runs per side):

Area Benchmark v0.8.0-era v0.9.0 Change
XSD validate 294 KB instance 15.2 ms, 9.1 MiB 6.7 ms, 1.3 MiB −56% time, −86% memory
XSD compile NVD schema 745 µs, 487 KiB 395 µs, 177 KiB −47% time, −64% memory
XSD keyref nesting depth 400 79.5 ms, 109 MiB 10.2 ms, 5.7 MiB −87% time, −95% memory
XPath 1.0 child path 671 µs, 766 KiB 102 µs, 69 KiB −85% time, −91% memory
XPath 1.0 // descendant path 791 µs 162 µs −79%
C14N 294 KB document, inclusive 5.75 ms, 4.9 MiB 1.97 ms, 1.5 MiB −66% time, −70% memory
RELAX NG compile libvirt grammar 644 µs 292 µs −55%

Several operations that grew faster than their input now grow linearly: C14N on deeply nested documents (depth 2048:
70 ms → 0.7 ms) and with many namespace bindings (215 ms → 2.2 ms), XSD keyref on nested hosts, and Content() on very
deep trees. XPath 3.1 child/attribute paths are ~72–74% faster.

Correctness

  • Entity references are now handled consistently when documents are parsed without entity substitution:
    Attribute.Value(), Content(), XPath string values, C14N attribute output, and XSD validation (text and elements
    reached through entities) all give the same results as a substituted parse.
  • XPath descendant axes no longer leak DTD nodes from entity-reference contexts; step results from inside entity
    content stay in document order.
  • The first of two duplicate entity declarations wins again (W3C valid-sa-086).
  • xslt3 copies of attributes containing & are no longer truncated.
  • XPath 3.1 raises XPTY0018 for path steps mixing nodes and atomic values within one result.
  • Empty ATTLIST defaults serialize as valid XML.
  • Catalog loading from a FIFO works on macOS when the writer has not written yet.

Hardening

  • Attribute values that reference entities are charged against the entity amplification limit, and entity reference
    loops in attribute values are rejected, matching libxml2.

Behavior and API changes

  • Attribute.Value() has a pointer receiver.
  • Content() on elements, documents and attributes leaves out comment and processing-instruction text, and
    Document.Content() leaves out the DTD (libxml2 2.9 / XPath string(/) semantics).
  • xpath3.ErrPathNotNodeSet carries the XPTY0019 error code; errors.Is still matches, but its message changed.
  • relaxng.Validator.Validate honors its context and returns the context's error when cancelled.
  • New: helium.CharacterData(n Node) string returns a node's own character data with entity references expanded.

Conformance

Unchanged per case versus v0.8.0-era main on every suite: XML 1993 pass / 8 xfail, XSD 1.0 14383 pass / 16 xfail,
XSD 1.1 1048 pass / 1 xfail, QT3 22324 pass / 4 xfail, XSLT 3.0 12346 pass (12827 with slow tests), XMLDSig 2ed 37,
XMLDSig 1.1 33, merlin 16, XML Encryption 1.1 10. Committed summaries now report expected failures in their own row.

What's Changed

Full Changelog: v0.8.0...v0.9.0