PureXML/Sources/Validation
Mihaela Mihaljevic a041b8beca feat(dtd): attribute defaulting, tokenized types, value normalization
Complete the DTD attribute handling found in the audit:

- Default and #FIXED attribute values are applied to the parsed tree.
  parseApplyingInternalDTDDefaults returns a tree where every element
  carries the attributes its <!ATTLIST> defaults, so an editor sees the
  same effective attributes a validating processor would.
- NMTOKEN, NMTOKENS, ENTITY, ENTITIES are validated: NMTOKEN(S) must be
  XML name tokens, ENTITY/ENTITIES must be XML names. Previously all fell
  through to unconstrained CDATA.
- DTD default values are normalized per XML 1.0: character and predefined
  entity references are expanded, literal whitespace becomes a space, and
  non-CDATA values are collapsed and trimmed.

ENTITY/ENTITIES check name syntax only; that the named entity is a
declared unparsed entity is not verified, since NDATA entity tracking is
not yet modeled.

Closes #73
2026-06-08 14:31:42 +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(dtd): attribute defaulting, tokenized types, value normalization 2026-06-08 14:31:42 +02:00
AttributeType.swift feat(dtd): attribute defaulting, tokenized types, value normalization 2026-06-08 14:31:42 +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
DTDDefaults.swift feat(dtd): attribute defaulting, tokenized types, value normalization 2026-06-08 14:31:42 +02:00
DTDSchema.swift refactor(validation): migrate DTD validation onto the framework 2026-06-08 12:36:56 +02:00
DTDValidationHelpers.swift feat(dtd): attribute defaulting, tokenized types, value normalization 2026-06-08 14:31:42 +02:00
DTDValidations.swift refactor(validation): migrate DTD validation onto the framework 2026-06-08 12:36:56 +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 refactor(validation): migrate Schematron, retire Issue 2026-06-08 12:49:19 +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 refactor(validation): migrate Schematron, retire Issue 2026-06-08 12:49:19 +02:00
Validator.swift feat(validation): composable validation framework + structural rule 2026-06-08 12:00:34 +02:00