extension PureXML.Schema { /// The result of compiling a schema document: its global element /// declarations, its named-type table, and the identity constraints declared /// on each element name. struct XSDCompiled { var elements: [String: ElementType] var types: [String: ElementType] var constraints: [String: [IdentityConstraint]] /// Simple types for identity-constraint field paths. var identityFieldTypes: [String: SimpleType] = [:] /// `default`/`fixed` value constraints on identity-constraint field /// targets, so an absent attribute or empty element takes that value as its /// identity-tuple component. var identityFieldConstraints: [String: ValueConstraint] = [:] /// Identity fields whose declared target is not a simple type, so the field /// violates cvc-identity-constraint.3 (idZ010). var identityNonSimpleFields: Set = [] /// Local names of elements declared `nillable="true"`. var nillableElements: Set = [] /// The `default`/`fixed` value constraint declared on each element name. var elementConstraints: [String: ValueConstraint] = [:] /// Local names of complex types declared `abstract="true"`. Bare-keyed, for /// the schema-consistency rules and direct unit tests. var abstractTypes: Set = [] /// Local names of element declarations declared `abstract="true"`: they may /// not appear in an instance directly, only through a substitution member. var abstractElements: Set = [] /// Derivation methods the named type forbids when used through `xsi:type`. /// Bare-keyed. var typeBlock: [String: Set] = [:] /// Derivation methods each element declaration forbids through `xsi:type`. /// Bare-keyed. var elementBlock: [String: Set] = [:] /// Each named complex type's base type and derivation method, the backbone /// the schema-consistency rules walk. Bare-keyed. var typeDerivation: [String: TypeDerivation] = [:] /// Namespaced (`{ns}local`) views of the abstract-type set, `block` tables, /// and derivation backbone, for the INSTANCE-validity subsystem, where two /// imported types sharing a local name in different namespaces must not /// collide. var nsAbstractTypes: Set = [] var nsTypeBlock: [String: Set] = [:] var nsElementBlock: [String: Set] = [:] var nsTypeDerivation: [String: TypeDerivation] = [:] /// Each named union simple type's member type keys (`{ns}local`), so the /// `xsi:type`-`block` check can follow a derivation that reaches the /// declared union through one of its members (cos-st-derived-OK 2.2.4). var nsUnionMembers: [String: [String]] = [:] /// Derivation methods each named type declares `final`, for the /// schema-consistency rules. var typeFinal: [String: Set] = [:] /// The schema's target namespace, so the root element's namespace can be /// checked against it. var targetNamespace: String? /// Schema-validity findings gathered while parsing (malformed facet /// definitions and the like), reported together with the model-level /// consistency findings when the schema is compiled. var schemaErrors: [PureXML.Validation.ValidationError] = [] /// Global attribute declarations keyed by ``attributeDeclarationKey(_:)``. var globalAttributes: [String: AttributeUse] = [:] } }