PureXML/Tests
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
..
Fixtures
CanonicalTests.swift feat(canonical): Canonical XML (C14N) serialization 2026-06-08 06:13:02 +02:00
CatalogTests.swift feat(catalog): OASIS XML Catalog resolution 2026-06-08 06:03:02 +02:00
DTDAttributeTests.swift refactor(validation): migrate DTD validation onto the framework 2026-06-08 12:36:56 +02:00
DTDIdentifierTests.swift refactor(validation): migrate DTD validation onto the framework 2026-06-08 12:36:56 +02:00
DTDTests.swift feat(parser): optional DTD with internal entities and billion-laughs defense 2026-06-08 01:17:09 +02:00
DTDValidationTests.swift refactor(validation): migrate DTD validation onto the framework 2026-06-08 12:36:56 +02:00
EncodingTests.swift feat(parsing): full encoding support (UTF-32, ISO-8859-1, Windows-1252) 2026-06-08 02:39:25 +02:00
EntityResolverTests.swift feat(dtd): external and parameter entities, secure by default 2026-06-08 03:08:20 +02:00
HTMLDocumentTests.swift feat(html): add HTML5 document tree construction with insertion modes 2026-06-08 09:24:11 +02:00
HTMLTests.swift feat(html): lenient HTML parser and serializer 2026-06-08 07:12:42 +02:00
ModelTests.swift
NamespaceTests.swift feat(parser): resolve XML namespaces at the start-element boundary 2026-06-08 01:03:29 +02:00
ParityEdgeTests.swift feat(parity): C14N 2.0 text trimming, catalog delegation, XPath number formatting 2026-06-08 09:37:16 +02:00
ParsingTests.swift feat(parser): add bounded-by-default limits (depth, name, content) 2026-06-08 00:40:34 +02:00
PatternTests.swift feat(pattern): streaming xmlPattern matching 2026-06-08 05:49:13 +02:00
PushParserTests.swift feat(parsing): resumable push / feed streaming API 2026-06-08 07:21:22 +02:00
RecoveringReaderTests.swift feat(parsing): in-reader recovery keeps elements and pops to matching tags 2026-06-08 12:24:43 +02:00
RegexTests.swift feat(regex): XML Schema regular-expression engine 2026-06-08 06:18:50 +02:00
RelaxNGCompactTests.swift feat(relaxng): add compact syntax (RNC) and include/externalRef 2026-06-08 09:13:09 +02:00
RelaxNGTests.swift feat(schema): RELAX NG pattern model, parser, and derivative validation 2026-06-08 06:49:37 +02:00
SaveOptionsTests.swift feat(emit): XML declaration save-option parity 2026-06-08 02:57:27 +02:00
SAXTests.swift feat(parsing): add SAX2 push-callback API 2026-06-08 02:26:04 +02:00
SchemaConformanceTests.swift test(schema): schema conformance fixtures, completing XSD and RELAX NG 2026-06-08 06:52:43 +02:00
SchematronTests.swift feat(validation): Schematron rule validation 2026-06-08 05:58:55 +02:00
SerializerTests.swift refactor(emitter): make the serializer iterative and fix mixed content 2026-06-08 00:31:05 +02:00
TextReaderTests.swift feat(parse): xmlTextReader pull cursor 2026-06-08 03:18:00 +02:00
TreeNodeTests.swift feat(model): mutable parent-aware tree (libxml2 tree.h parity) 2026-06-08 03:13:59 +02:00
ValidationFrameworkTests.swift feat(validation): composable validation framework + structural rule 2026-06-08 12:00:34 +02:00
ValidationTests.swift feat(validation): composable validation framework + structural rule 2026-06-08 12:00:34 +02:00
WriterTests.swift feat(emitting): add an incremental XML writer (xmlTextWriter) 2026-06-08 02:32:39 +02:00
XIncludeTests.swift feat(xinclude): XInclude, URI resolution, and xml:base 2026-06-08 06:08:31 +02:00
XMLCharacterTests.swift feat(parsing): spec-exact XML character classification (chvalid parity) 2026-06-08 02:52:42 +02:00
XPathAxisTests.swift feat(xpath): all thirteen axes via parent-aware navigation 2026-06-08 05:15:14 +02:00
XPathContextTests.swift feat(xpath): explicit evaluation context entry point 2026-06-08 05:40:52 +02:00
XPathExpressionTests.swift feat(xpath): expression engine and the four-type model 2026-06-08 05:33:13 +02:00
XPathFunctionTests.swift feat(xpath): full XPath 1.0 function library 2026-06-08 05:38:39 +02:00
XPathTests.swift feat(xpath): all thirteen axes via parent-aware navigation 2026-06-08 05:15:14 +02:00
XPointerTests.swift feat(xpointer): element() and xpointer() schemes 2026-06-08 05:52:23 +02:00
XSDComplexTypeTests.swift feat(schema): XSD complex types and particles 2026-06-08 06:33:51 +02:00
XSDCompositionTests.swift feat(xsd): add list/union simple types, attribute groups, and element/group refs 2026-06-08 08:28:17 +02:00
XSDDatatypeTests.swift feat(schema): XSD simple-type datatype library with facets 2026-06-08 06:29:37 +02:00
XSDIdentityTests.swift feat(xsd): add identity constraints (unique, key, keyref) 2026-06-08 08:58:36 +02:00
XSDImportTests.swift feat(xsd): add include/import/redefine, substitution groups, and xsi:type 2026-06-08 08:46:24 +02:00
XSDSchemaTests.swift feat(schema): XSD schema-document parser and end-to-end validation 2026-06-08 06:40:03 +02:00
XSLTParityTests.swift feat(xslt): add xsl:include/import, xsl:output, comment, and processing-instruction 2026-06-08 08:08:38 +02:00
XSLTParserTests.swift feat(xslt): stylesheet model and parser 2026-06-08 06:57:11 +02:00
XSLTTests.swift feat(xslt): add xsl:include/import, xsl:output, comment, and processing-instruction 2026-06-08 08:08:38 +02:00