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. |
||
|---|---|---|
| .. | ||
| Canonical | ||
| Catalog | ||
| Emitting | ||
| HTML | ||
| Model | ||
| Parsing | ||
| Pattern | ||
| Regex | ||
| Schema | ||
| Stream | ||
| Validation | ||
| XInclude | ||
| XPath | ||
| XPointer | ||
| XSLT | ||
| API.swift | ||
| PureXML.swift | ||