The schema-aware version of the Saxon product (Saxon-SA) includes an almost complete implementation of XML Schema 1.0. This version of the product is available from Saxonica Limited.
Known limitations include the following:
QNames and NOTATIONs are not supported as default values, nor as fixed values. (They are supported as enumeration values)
Validation against list or union data types including xs:QName
or xs:NOTATION
as one of the component types is not supported.
Default or fixed values specified for an element whose type is a complex type with complex content are ignored when validating instance documents.
Facets are evaluated according to XPath rules rather than XML Schema rules. For example, the pattern
syntax allows the extended syntax permitted in the XPath matches()
function, and comparisons
against facets such as minInclusive
and maxInclusive
follow the XPath semantics
for the lt
and gt
operators. This may be slightly different when comparing values such as dates,
times, and durations.
Saxon imposes limits on the values of minOccurs
and maxOccurs
appearing on any
particle in a content model. These limits are designed to prevent out-of-memory errors. By default, the upper limit for
minOccurs
is 100 and the upper limit for maxOccurs
is 250. If these limits are exceeded,
a warning is output, and the values specified are replaced with the highest allowed value (which is "unbounded"
in the case of maxOccurs
). The limits are configurable using the method setOccurrenceLimits()
in the class SchemaAwareConfiguration
. If they are set too high, however, out-of-memory or stack overflow errors will
occur either during schema compilation or during instance validation.
Uniqueness and key/keyref constraints are implemented only where the keys are atomic values (that is, they are not implemented for list-valued elements or attributes). Also, where element values participate in such constraints they must not be interleaved with comments or processing instructions. When evaluating these constraints, equality of values is assessed according to XPath rules rather than XML Schema rules. This means, for example, that a decimal and a double can be equal to each other, which is never the case under the XML Schema rules.
ID and IDREF constraints are checked only for values typed as xs:ID, xs:IDREF, or xs:IDREFS. They are not checked for types derived from these base types.
Any failure to resolve a QName in a schema document (that is, a reference within a schema to a component that has not been defined) is treated as a fatal error. The XML schema specification says this should only be an error if the component is actually required for validation.
Saxon implements schema processing only to the extent required for XPath, XSLT, and XQuery processing. This means that PSVI properties beyond those required for the XPath data model are not provided. It also means that validation errors are fatal, they do not result in a PSVI that indicates the validation outcome for individual nodes.
Elements and attributes of type xs:ENTITY or xs:ENTITIES are not checked against the list of unparsed entities declared in the document. (This check is not required during XSLT or XQuery validation, but it is required by standalone schema validation.)