PureXML/Sources/Model
Mihaela Mihaljevic 4659ea33c8 feat(editor): source spans on the tree, mapping findings to positions
Slice 1 of #94 (editor integration). The keystone: a located validation finding
can now be mapped back to a source range.

- TreeNode gains a sourceRange (start/end Mark); SourceRange is a half-open span.
- PureXML.readTree builds a mutable, parent-aware, best-effort tree whose every
  node carries its span (an element from the < of its start tag to past its end
  tag; leaves over the text they consumed). Never throws, recovers in place,
  returns located diagnostics.
- TreeNode.node(at:) navigates a validation coding path to its node using the
  same canonical convention the validators build paths with (a sibling index
  only when a name repeats), and sourceRange(at:) returns the span. So
  Document.validate's ValidationError.codingPath resolves to characters in the
  document.

Tests prove the spans, the navigation, the end-to-end bridge (an XSD finding to
a source range), and that ranged reading of invalid input never crashes.
2026-06-08 13:14:29 +02:00
..
Attribute.swift chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00
Element.swift chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00
Node.swift chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00
QualifiedName.swift feat(parser): resolve XML namespaces at the start-element boundary 2026-06-08 01:03:29 +02:00
TreeNode.swift feat(editor): source spans on the tree, mapping findings to positions 2026-06-08 13:14:29 +02:00
TreeNodeConversion.swift feat(model): mutable parent-aware tree (libxml2 tree.h parity) 2026-06-08 03:13:59 +02:00
TreeNodeMutation.swift feat(model): mutable parent-aware tree (libxml2 tree.h parity) 2026-06-08 03:13:59 +02:00
TreeNodeNavigation.swift feat(model): mutable parent-aware tree (libxml2 tree.h parity) 2026-06-08 03:13:59 +02:00
TreeNodeSpan.swift feat(editor): source spans on the tree, mapping findings to positions 2026-06-08 13:14:29 +02:00