Supported features¶
pyxsd 1.0 implements a substantial, honest subset of XSD 1.0. This page
summarizes what is validated, with pointers to the regression corpus that
backing every claim (66 independently authored manifest-driven cases
inspired by the W3C XMLSchema1TestSuite and NIST datatype feature areas —
run
uv run python tests/report_conformance.py for the live pass-rate report).
Built-in type lattice¶
All 45 XSD 1.0 built-in simple types are implemented with lexical
validation in __new__ (pyxsd.xsd_data_types): the full string family
(string, normalizedString, token, Name, NCName, NMTOKEN, language, ID,
IDREF, ENTITY, anyURI, QName), all integer variants with correct ranges,
decimal, float/double (including INF/-INF/NaN), the date/time family
(date, dateTime, time, duration, gYear, gYearMonth, gMonth, gMonthDay,
gDay), base64Binary, hexBinary, anySimpleType/anyType, and the list types
NMTOKENS/IDREFS/ENTITIES.
Structural schema elements¶
xs:sequence,xs:choice,xs:allcontent models with order and occurrence checkingxs:groupdefinitions and references (nested, with occurrence folding and cycle detection)xs:attributeGroupdefinitions and referencesxs:any/xs:anyAttributewildcards with namespace lists (##any,##other,##local,##targetNamespace, explicit URIs) andprocessContents(strict/lax/skip), enforced in namespaced modeXML Namespaces in namespaced mode:
targetNamespace,elementFormDefault/attributeFormDefault, prefixed type/refQNames, cross-namespacexs:import, and QName value identityxs:union(declared members and inline anonymous members)element references (
ref) and substitution groupscomplex content
xs:extension/xs:restrictionderivation withfinalenforcement
Instance semantics¶
minOccurs/maxOccursenforcement (includingunbounded)xsi:nilon nillable elements (nil instances preserved in output)defaultandfixedfor attributes and simple-content elementsxsi:typedynamic dispatch on child elements and the document rootabstractelements and types;block/prohibitedrestrictionsroot dispatch: both complex-typed and primitive-typed document roots
expanded-name matching of elements and attributes against form defaults (namespaced mode)
Composition and identity¶
xs:include(chameleon schemas supported),xs:import(cross-namespace components in namespaced mode, including imports without aschemaLocationwhen the namespace is supplied),xs:redefine(single level)xs:key,xs:unique,xs:keyrefwith an XPath subset (child steps,.//descendants,*,.,@attr, multi-step paths)
Validation reporting¶
Non-fatal, code-tagged issue reporting via PyXSD.report (see
Validation), plus --strict CI-friendly exit codes and the
ValidationReport API for library users. PyXSD(mode=...) / --mode
selects how invalid or unrecognized content is bound (strict vs. lax)
without changing what is reported — see Parse modes and binding. The same policy
carries a namespaces field: PyXSD(mode=ParseModes.NAMESPACED) or
--namespaces strict turns on namespace-aware validation (the default
legacy behavior is unchanged).
Known gaps¶
Feature |
Construct |
Status |
Note |
|---|---|---|---|
Namespace-aware schemas |
|
partial |
Opt-in in namespaced mode ( |
Facets on user simpleTypes |
|
ignored |
Every built-in type’s own lexical rules and whitespace mode are enforced, but facets declared on user-defined simpleTypes are not. |
Wildcard namespace filtering |
|
partial |
Enforced in namespaced mode (including |
Full identity XPath |
|
partial |
Predicates, absolute paths, positional steps, and other axes are skipped with a warning. |
List type derivation |
|
unsupported |
Built-in list types work; user-defined list types are not generated. |
Unions of list members |
|
partial |
Unions of atomic types work (including inline anonymous members). |
Mixed content |
|
ignored |
Interleaved text is not preserved or validated. |
Remote schema hints |
URL |
partial |
Local file system resolution only. |
Notation |
|
unsupported |
Not implemented. |
Redefine chains |
redefining an already-redefined component |
partial |
A single redefine level is supported. |
Unique particle attribution |
UPA checking |
ignored |
Content models are matched greedily in document order. |
This table is maintained as machine-readable data in
tests/conformance/unsupported.toml, which also feeds the conformance
report.