The ultimate goal is to prevent whitespace in a pool of validated XML content by simply not allowing bad xs:token
content to pass schema validation for relevant elements. Schema-invalid instances are not allowed into the pool.
If I declare an element's type to be xsd:token
in an XML Schema (1.1) and I try to validate an instance of this schema where the xsd:token
-typed element contains more than zero of the repudiated characters (tab, LF, CR) or a double, leading or trailing space, will said instance validate or not?
Assume: there's no other "restriction" (so to speak) on the content, only that it has to be an xsd:token
.
Extension just to be totally clear: "The setting xs:whiteSpace=collapse means that leading and trailing whitespace is removed and internal whitespace is reduced to a single x20 character" - I understand that this is a "pre-validation / internal" (so to speak) step for the XML validator; is that right?