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:
The rules for valid restrictions of complex types have changed: the specification now defines these rules in a very similar way to the way that Saxon has always implemented.
Assertions are implemented, 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
) is implemented. 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 are allowed on the element particles
within xs:all
groups.
An xs:all
content model may now be derived by extension from another xs:all
content model.
Element wildcards (xs:any
) are allowed within xs:all
groups.
The notNamespace
and notQName
attributes are now supported on xs:any
and
xs:anyAttribute
wildcards.
The targetNamespace
attribute is available for use on local element and attribute declarations
appearing within the restriction of a complex type.
Open content is implemented.
The defaultAttributes
attribute of xs:schema
is implemented
Saxon allows conditional inclusion of elements in a schema document, using attributes such as vc:minVersion
and vc:maxVersion
. This feature is available whether the schema processor is run in 1.0 or 1.1 mode,
allowing new 1.1 features such as assertions to be ignored when running in 1.0 mode.
The type xs:error
is implemented.
An element may now appear in more than one substitution group.
A new facet xs:explicitTimezone
is available with values required
, optional
, or prohibited
.
The new built-in data type xs:dateTimeStamp
(an xs:dateTime
with timezone required)
is implemented.
Unimplemented Features
The following facilities are not implemented. This list may be incomplete.
xs:key, xs:unique, and xs:keyref defined with a ref
attribute.
The ##definedSibling
option in element wildcards
The so-called "dynamic element declarations consistent" constraint: specifically, the rule that if a wildcard matches an element or attribute with a global declaration, then the global declaration must have a type that is consistent with any locally-declared elements or attributes having the same name.
xs:override is currently implemented simply as a synonym of xs:redefine
The new primitive type xs:precisionDecimal
Changes to derivation by union to make restrictions on a union work properly (transitive membership)
Allowing multiple IDs on the same element
Assertions: the data presented to an assertion on a complex type is currently untyped.
There are new rules indicating what should happen when the XPath expressions in an identity contraint select nodes in a part of the document that is skipped.