PureXML/Sources/Schema
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
..
BuiltinType.swift
ComplexType.swift feat(xsd): xsi:nil/nillable and fixed/default value constraints 2026-06-08 13:03:06 +02:00
ComplexValidator.swift feat(xsd): xsi:nil/nillable and fixed/default value constraints 2026-06-08 13:03:06 +02:00
ContentMatcher.swift
DateTimeParser.swift chore: silence clean-build warnings 2026-06-08 07:32:28 +02:00
DateTimeValue.swift
DecimalValue.swift
IdentityConstraint.swift feat(xsd): add identity constraints (unique, key, keyref) 2026-06-08 08:58:36 +02:00
IdentityValidator.swift refactor(validation): migrate XSD validation onto the framework 2026-06-08 12:43:20 +02:00
Lexical.swift
Primitive.swift
RelaxNGCompactLexer.swift feat(relaxng): add compact syntax (RNC) and include/externalRef 2026-06-08 09:13:09 +02:00
RelaxNGCompactParser.swift feat(relaxng): add compact syntax (RNC) and include/externalRef 2026-06-08 09:13:09 +02:00
RelaxNGDerivative.swift feat(schema): RELAX NG pattern model, parser, and derivative validation 2026-06-08 06:49:37 +02:00
RelaxNGParser.swift feat(relaxng): add compact syntax (RNC) and include/externalRef 2026-06-08 09:13:09 +02:00
RelaxNGPattern.swift feat(schema): RELAX NG pattern model, parser, and derivative validation 2026-06-08 06:49:37 +02:00
RelaxNGSchema.swift feat(relaxng): add compact syntax (RNC) and include/externalRef 2026-06-08 09:13:09 +02:00
SchemaDocument.swift feat(editor): unified lint surface merging parse and validation diagnostics 2026-06-08 13:18:29 +02:00
SimpleType.swift feat(xsd): add list/union simple types, attribute groups, and element/group refs 2026-06-08 08:28:17 +02:00
XSDContext.swift feat(xsd): xsi:nil/nillable and fixed/default value constraints 2026-06-08 13:03:06 +02:00
XSDParser.swift feat(xsd): xsi:nil/nillable and fixed/default value constraints 2026-06-08 13:03:06 +02:00
XSDSimpleParser.swift feat(xsd): add include/import/redefine, substitution groups, and xsi:type 2026-06-08 08:46:24 +02:00
XSDValidations.swift feat(xsd): xsi:nil/nillable and fixed/default value constraints 2026-06-08 13:03:06 +02:00