XML Schema 1.1
Saxon implements selected features from the working drafts of XML Schema 1.1.
This support is generally provided only if explicitly requested by using the -xsdversion:1.1 option
on the cmmand line, or equivalent options in the API.
The rules for valid type derivation follow the XML Schema 1.1 specification, regardless of this
option setting. This is because the rules in the 1.0 specification do not meet the stated intent, namely that
type derivation is valid in all cases where the restricted type allows a subset of the instances permitted
by the base type.
XSD 1.1 facilities implemented are as follows:
Assertions, on both complex types and simple types. Saxon allows the full syntax of XPath 2.0
to be used in assertions. In the case of complex types, the context item is currently set to the element node
being validated as an untyped tree (according to the specification, all nodes except the root of the tree
should be typed). For simple types, and for complex types with simple content, the typed value of the node is available
as the value of the variable
$value. This is currently typed as an instance of the base type (the type
being restricted by the assertion), not the nearest built-in type as specified by W3C.
Conditional Type Assignment (xs:alternative). Again the full syntax of XPath 2.0 is allowed.
(Currently however the rules for type subsumption are not checked)
Unrestricted minOccurs and maxOccurs values on the element particles within
targetNamespace attribute is available for use on local element and attribute declarations
appearing within the restriction of a complex type.