PureXML/Sources/Validation
Mihaela Mihaljevic 89f8ccc95a refactor(validation): migrate DTD validation onto the framework
Slice 3 of #92. The DTD validator's imperative walk becomes declared Validation
values over a DTDSchema document:

- DTDSchema is now just the schema (content models + attribute declarations) and
  serves as the rules' Document context; its validate/walk methods are gone.
- contentModel and attributeDeclarations are Validation<Element, DTDSchema>, so
  every content-model and attribute violation is now located by coding path
  ("... at path: r/a"). undeclaredElement is added only in strict mode.
- identifierIntegrity is a Validation<Node, DTDSchema> gated to the root, doing
  the document-wide ID-uniqueness and IDREF-resolution checks in one pass.
- DTD.validator(strict:) assembles the rule set; validateAgainstInternalDTD runs
  it and returns [ValidationError] instead of [Issue].

A new test pins the located result. Schema (XSD) and Schematron validators still
use Issue and migrate in the following slices.
2026-06-08 12:36:56 +02:00
..
AttributeDeclaration.swift feat(validation): add DTD attribute (ATTLIST) validation 2026-06-08 02:07:01 +02:00
AttributeDefault.swift feat(validation): add DTD attribute (ATTLIST) validation 2026-06-08 02:07:01 +02:00
AttributeListParser.swift feat(validation): add DTD ID/IDREF/IDREFS validation 2026-06-08 02:13:11 +02:00
AttributeType.swift feat(validation): add DTD ID/IDREF/IDREFS validation 2026-06-08 02:13:11 +02:00
ContentModel.swift feat(validation): add DTD content-model validation 2026-06-08 01:59:00 +02:00
ContentModelMatcher.swift feat(validation): add DTD content-model validation 2026-06-08 01:59:00 +02:00
ContentModelParser.swift feat(validation): add DTD content-model validation 2026-06-08 01:59:00 +02:00
DTDSchema.swift refactor(validation): migrate DTD validation onto the framework 2026-06-08 12:36:56 +02:00
DTDValidationHelpers.swift refactor(validation): migrate DTD validation onto the framework 2026-06-08 12:36:56 +02:00
DTDValidations.swift refactor(validation): migrate DTD validation onto the framework 2026-06-08 12:36:56 +02:00
Issue.swift feat(validation): composable validation framework + structural rule 2026-06-08 12:00:34 +02:00
Occurrence.swift feat(validation): add DTD content-model validation 2026-06-08 01:59:00 +02:00
Particle.swift feat(validation): add DTD content-model validation 2026-06-08 01:59:00 +02:00
Schematron.swift feat(validation): Schematron rule validation 2026-06-08 05:58:55 +02:00
SchematronModel.swift feat(validation): Schematron rule validation 2026-06-08 05:58:55 +02:00
SchematronParser.swift feat(validation): Schematron rule validation 2026-06-08 05:58:55 +02:00
Severity.swift chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00
StructuralValidations.swift feat(validation): composable validation framework + structural rule 2026-06-08 12:00:34 +02:00
Validation.swift feat(validation): composable validation framework + structural rule 2026-06-08 12:00:34 +02:00
ValidationCombinators.swift feat(validation): composable validation framework + structural rule 2026-06-08 12:00:34 +02:00
ValidationCore.swift feat(validation): composable validation framework + structural rule 2026-06-08 12:00:34 +02:00
Validator.swift feat(validation): composable validation framework + structural rule 2026-06-08 12:00:34 +02:00