PureXML/Sources
Mihaela Mihaljevic 57c0c3b2da feat(editor): unified lint surface merging parse and validation diagnostics
Slice 2 of #94. One call for an editor: PureXML.lint reads the document once into
the ranged, best-effort tree (never throwing), then merges the parse diagnostics
and the validation findings into a single source-ranged, severity-tagged list in
document order.

- LintDiagnostic carries message, severity, and the SourceRange to highlight.
- lint(_:validate:) takes a node-based validate closure that runs over the
  RECOVERED tree, so validation works even when the document is not well-formed:
  a truncated, schema-invalid document yields both a parse diagnostic and the
  validation finding, each with a range.
- Schema.Document gains validate(_ node:) so a caller validates the same tree it
  is editing; validate(_ xml:) delegates to it.

Tests cover a clean lint, well-formedness-only lint, a range-located validation
finding, and the both-truncated-and-invalid editor case.
2026-06-08 13:18:29 +02:00
..
Canonical feat(parity): C14N 2.0 text trimming, catalog delegation, XPath number formatting 2026-06-08 09:37:16 +02:00
Catalog feat(parity): C14N 2.0 text trimming, catalog delegation, XPath number formatting 2026-06-08 09:37:16 +02:00
Emitting feat(emit): XML declaration save-option parity 2026-06-08 02:57:27 +02:00
HTML feat(html): add HTML5 document tree construction with insertion modes 2026-06-08 09:24:11 +02:00
Model feat(editor): source spans on the tree, mapping findings to positions 2026-06-08 13:14:29 +02:00
Parsing feat(editor): source spans on the tree, mapping findings to positions 2026-06-08 13:14:29 +02:00
Pattern feat(pattern): streaming xmlPattern matching 2026-06-08 05:49:13 +02:00
Regex chore: silence clean-build warnings 2026-06-08 07:32:28 +02:00
Schema feat(editor): unified lint surface merging parse and validation diagnostics 2026-06-08 13:18:29 +02:00
Stream chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00
Validation refactor(validation): migrate Schematron, retire Issue 2026-06-08 12:49:19 +02:00
XInclude feat(xinclude): XInclude, URI resolution, and xml:base 2026-06-08 06:08:31 +02:00
XPath feat(parity): C14N 2.0 text trimming, catalog delegation, XPath number formatting 2026-06-08 09:37:16 +02:00
XPointer feat(xpointer): element() and xpointer() schemes 2026-06-08 05:52:23 +02:00
XSLT feat(xslt): add xsl:include/import, xsl:output, comment, and processing-instruction 2026-06-08 08:08:38 +02:00
API.swift feat(editor): source spans on the tree, mapping findings to positions 2026-06-08 13:14:29 +02:00
Lint.swift feat(editor): unified lint surface merging parse and validation diagnostics 2026-06-08 13:18:29 +02:00
PureXML.swift feat(html): lenient HTML parser and serializer 2026-06-08 07:12:42 +02:00