Saxon extensions to the W3C XSD specification
In assertions, and on all elements representing facets (for example pattern
),
Saxon supports the attribute saxon:message="message text"
.
This message text is used in error messages when the assertion or facet is not satisfied.
The XSD 1.1 specification allows vendor extensions in the form of vendor-defined primitive types and vendor-defined
facets. Saxon 9.2 exploits this freedom to provide a new facet, saxon:preprocess
. This is a pre-lexical
facet (like xs:whiteSpace
) in that it is used to transform the supplied value before validation. The preprocessing
is done using an arbitrary XPath expression which takes a string as input and produces a string as output. For example
<saxon:preprocess action="normalize-unicode($value)"/>
can be used to perform Unicode normalization, while
<saxon:preprocess action="upper-case($value)"/>
normalizes the value to upper case. This
is done before application of other facets such as the pattern
and enumeration
facets.
It is also possible to provide another XPath expression to reverse the process, for use when the typed value
is converted back to a string.
For more information see