Expand description
Compiled-schema data structures.
A Schema is the output of the schema compiler — a graph of
reference-counted declarations and type definitions, ready for the
validator to consume.
Names are QNames carrying the namespace URI alongside the local
name; the schema compiler resolves prefixes to URIs at compile time
so the runtime never has to deal with prefix bookkeeping.
Structs§
- Assertion
- XSD 1.1
<xs:assert test="…">/<xs:assertion test="…">. - Attribute
Decl <xs:attribute>— top-level or local.- Attribute
Group <xs:attributeGroup>— a named bundle of attribute uses, referenced from complex types via<xs:attributeGroup ref="…"/>.- Attribute
Use - How an attribute appears within a complex type.
- Block
Set - Element
Decl <xs:element>declaration — top-level or local.- Model
Group <xs:group>— a named model-group particle, referenced from complex types or other groups.- Notation
Decl - Particle
- One particle in a content model — an element, a wildcard, or a nested group — with occurrence bounds.
- QName
- A namespace-qualified XML name. XSD operates entirely in terms of these — local names alone are insufficient when a schema imports other namespaces.
- Schema
- The top-level compiled schema. Cheap to clone (one
Arcbump). - Schema
Options - Knobs for
Schema::compile_str_with_options/Schema::compile_with_options. - Wildcard
<xs:any>/<xs:anyAttribute>wildcard configuration.
Enums§
- Attribute
UseKind - Content
Model - A type’s body shape: nothing, a simple value, or a particle tree.
- Group
Kind - MaxOccurs
- Namespace
Constraint - Process
Contents - Schema
Version - Which XSD version the compiler should target. XSD 1.1 is a strict
superset of 1.0 — every 1.0 schema is also a valid 1.1 schema — so
the choice only matters when a schema uses a 1.1-specific
construct (
xs:assert,xs:alternative,xs:override, wildcardnotQName/notNamespace, the 1.1-added built-in datatypes, …). - Term
- TypeRef
- A type reference — either a simple or complex type. Used everywhere
an element’s
type=...is resolved.