PureXML/docs/validation-coverage-registry.txt
Mihaela Mihaljevic d27e108b4d
perf(model): make the value Node tree type depth-safe (#344)
Element stored its children inline and Node was `indirect`, so a Node's
recursive layout made building, comparing, hashing, and releasing a deeply
nested tree recurse one native frame per level and overflow the stack
(signal 10) -- on a constrained stack such as a Swift Task, as shallow as a
few thousand deep.

Element now holds its children behind a copy-on-write reference
(ElementStorage), so Node is a fixed-size value (no longer indirect) and:

- `==` and `hashValue` walk the tree iteratively through explicit work
  stacks (the synthesized conformances recursed); equal trees still hash
  equally.
- ElementStorage's `deinit` flattens the subtree into a heap worklist
  before releasing, draining only storage it solely owns so a copy-on-write
  sibling keeps its subtree.
- `children` is a computed copy-on-write view with a `_modify` accessor, so
  in-place mutation (the parser's append loop) stays amortized O(1).

Value semantics are unchanged; Element/Node remain Equatable, Hashable,
Sendable. A 50000-deep tree builds, compares, hashes, and releases in a
fraction of a second; 1782 tests pass. Completes the value-Node half of #341.
2026-06-26 17:05:42 +02:00

37 lines
2.2 KiB
Plaintext

# PureXML validation coverage registry (validation-rules.md).
# Each public type is either a SUBJECT (validated by named rule sets) or EXCLUDE
# (with reason). Namespace prefixes EXCLUDE_NS auto-exclude infrastructure types.
# WATCH_NS requires every newly discovered type in that namespace be listed here.
SUBJECT PureXML.Model.Node structural,dtd,xsd,html,schematron,relaxng
SUBJECT PureXML.Model.Element structural,dtd,xsd,html
SUBJECT PureXML.Model.Attribute structural,dtd,xsd
SUBJECT PureXML.Validation.ConformanceCase conformance
SUBJECT PureXML.Schema.SchemaTypeFact xsd-schema-consistency
SUBJECT PureXML.Schema.ResolvedElement xsd-streaming-shallow
EXCLUDE PureXML.Model.QualifiedName value type; lexical invariants at construction
EXCLUDE PureXML.Model.ElementStorage copy-on-write backing for Element children; validated via Node
EXCLUDE PureXML.Model.TreeNode mutable editor view of Node; validated via Node
EXCLUDE PureXML.Model.TreeNodeKind tag enum; no invariants
EXCLUDE PureXML.LintDiagnostic editor output; not user input
EXCLUDE_NS PureXML.Parsing parser and scanner; Model.Node is the validation subject
EXCLUDE_NS PureXML.Emitting serializer; output not validated as input model
EXCLUDE_NS PureXML.Decoding typed decoding helpers; not document models
EXCLUDE_NS PureXML.Encoding encoding helpers; not document models
EXCLUDE_NS PureXML.Stream streaming adapters; events validate via schemas
EXCLUDE_NS PureXML.Validation validation framework and compiled schemas; Node is the subject
EXCLUDE_NS PureXML.Schema schema compiler and internal engine; Document validates Node
EXCLUDE_NS PureXML.XPath query engine; not a document model
EXCLUDE_NS PureXML.Pattern regex/pattern engine; not a document model
EXCLUDE_NS PureXML.XPointer pointer engine; not a document model
EXCLUDE_NS PureXML.Catalog catalog resolver; not a document model
EXCLUDE_NS PureXML.XInclude inclusion processor; not a document model
EXCLUDE_NS PureXML.Canonical canonicalization; not a document model
EXCLUDE_NS PureXML.Regex regex engine; not a document model
EXCLUDE_NS PureXML.XSLT transform engine; not a document model
EXCLUDE_NS PureXML.HTML tokenizer/builder; Node/HTML rules validate output trees
WATCH_NS PureXML.Model