Jing supports W3C XML Schema Part 2 as its datatyping language. The version of XML Schema supported is the 02 May 2001 Recommendation.
The following datatypes are implemented:
stringnormalizedStringbooleanfloatdoubledecimalQNameNOTATIONtokenlanguageIDIDREFIDREFSNMTOKENNMTOKENSNCNameNameintegernonPositiveIntegernegativeIntegerlongintshortbytenonNegativeIntegerunsignedLongunsignedIntunsignedShortunsignedBytepositiveIntegerOther datatypes are recognized but validated like
string.
ID, IDREF and IDREFS will
not have the effect that you probably expect. They are equivalent to
NCName or a list of NCNames. No additional checking is performed.
This is in conformance with XML Schema Part 2. Used the
key and keyRef attributes of
data.
NOTATION also will not have the effect that you
probably expect. From the RELAX NG perspective, it is equivalent to
QName.
Any facet can be used as a parameter with the exception of
enumeration (use the value element instead)
and whiteSpace.
The implementation of the pattern facet requires an
implementation of regular expressions as defined in XML Schema Part
2. The name of the class implementing the interface
com.thaiopensource.datatype.xsd.RegexEngine must be
specified as the value of the
com.thaiopensource.relaxng.util.RegexEngine system property.
If no such class is available, then any pattern will be assumed to
match any string.
The class
com.thaiopensource.relaxng.util.XercesRegexEngine implements
com.thaiopensource.datatype.xsd.RegexEngine using the
package org.apache.xerces.utils.regex which is included
in the Xerces XML
Parser. To use this, an option of
-Dcom.thaiopensource.relaxng.util.RegexEngine=com.thaiopensource.relaxng.util.XercesRegexEngine
would be added to the invocation of the java
command. This requires at least version 1.3.1 of Xerces-J.
Alternatively, you can use IBM's Regex for Java package, available
from Alphaworks. You can
create a RegexEngine that uses this simply by changing
org.apache.xerces.utils to com.ibm in
com/thaiopensource/relaxng/util/XercesRegexEngine.java. The
sample implementation does not include such a class because the
license for Regex for Java is currently rather restrictive.