RELAX NG by Eric van der Vlist will be published by O'Reilly & Associates (ISBN: 0596004214)
You are welcome to use our annotation system to give your feedback.
xsd:token — Whitespace-replaced and collapsed strings.
xsd:normalizedString
xsd:string
xsd:language, xsd:NMTOKEN, xsd:Name
enumeration, length, maxLength, minLength, pattern.
<xsd:simpleType name="token" id="token"> <xsd:restriction base="xsd:normalizedString"> <xsd:whiteSpace value="collapse"/> </xsd:restriction> </xsd:simpleType> |
The lexical and value spaces of xsd:token are the sets of all the strings after whitespace replacement—i.e., after any occurrence of #x9 (tab), #xA (linefeed), and #xD (carriage return).These are replaced by an occurrence of #x20 (space) and collapsing. Collapsing is when contiguous occurrences of spaces are replaced by a single space, and leading and trailing spaces are removed).
More simply said, xsd:token is the most appropriate datatype to use for strings that do not care about whitespaces.
The name xsd:token is misleading since whitespaces are allowed within xsd:token. xsd:NMTOKEN is the type corresponding to what are usually called "tokens."
The element:
<title lang="en"> Being a Dog Is a Full-Time Job </title> |
is a valid xsd:token and its value is the string "Being a Dog Is a Full-Time Job", where all the extra whitespace has been replaced by single spaces. Leading and trailing spaces have been removed and contiguous sequences of spaces have been replaced by single spaces.
You are welcome to use our annotation system to give your feedback.
[Annotations for this page]
All text is copyright Eric van der Vlist, Dyomedea. During development, I give permission for non-commercial copying for educational and review purposes. After publication, all text will be released under the Free Software Foundation GFDL.