pyxsd.relaxng.comparison¶
Canonical comparison of a finite RELAX NG structural projection.
The projection erases reference indirection, generated definition names, source evidence and pool sharing. Choice and interleave are associative/commutative; group is associative but keeps non-attribute order. Attribute-only group terms commute, not arbitrary child/scalar terms. Interleave multiplicity is retained.
Pattern/name/datatype IDs are content addresses: replacement is removal plus addition. Starts, unambiguous named definitions and projection routes have semantic anchors and report changed fields. Ambiguous same-name definitions and routes use content discriminators, never traversal or source ordinals.
Recursive pattern identities use the finite bisimulation quotient of the labelled normalized graph. Partition refinement only splits classes and stops after at most the number of reachable nodes; the rooted quotient is serialized in canonical class order. This is structural bisimulation, not a decision procedure for RELAX NG language equivalence or inclusion.
Functions¶
|
Compare valid schemas, bounding field details but never counts or IDs. |
Module Contents¶
- pyxsd.relaxng.comparison.compare_relaxng_structure(old, new, *, detail_limit=None)¶
Compare valid schemas, bounding field details but never counts or IDs.
detail_limitmust be non-negative. The result includes a category breakdown, complete added/removed/changed ID lists and field-level details. A changed anchored component may refer to added/removed content addresses. Provenance, serialized RNG and raw resource hashes never enter the diff.- Parameters:
detail_limit (int | None)
- Return type: