XML technologies / XML Schema / Data type reference / xs:NCName
(Excerpt from “XML Schema” by Eric van der Vlist)
Unqualified names
Derived from: xs:Name
Primitive type: xs:string
Known subtypes: xs:ID, xs:IDREF, xs:ENTITY
Facets: xs:enumeration, xs:length, xs:maxLength, xs:minLength, xs:pattern, xs:whiteSpace
Definition
<xs:simpleType name="NCName" id="NCName">
<xs:restriction base="xs:Name">
<xs:pattern value="[\i-[:]][\c-[:]]*"/>
</xs:restriction>
</xs:simpleType>Description
The lexical and value spaces of xs:NCName consist of names (xs:Name) satisfying the definition of an NCName in the recommendation “Namespaces in XML 1.0”: all XML 1.0 names without colons (:).
Restrictions
This data type permits characters such as - and may require further restrictions to match the notion of a name in your preferred programming language or database.
Example
Valid values include "Snoopy", "CMS", "_1950-10-04_10-00" or "kühn_dreist".
Invalid values include "_1950-10-04:10-00" or "kühn:dreist" (colons are forbidden).
Copyright © 2003 O'Reilly Verlag GmbH & Co. KG
You may print the online version for your private use.
Otherwise, this chapter from “XML Schema” is subject to the same conditions as the bound edition. The work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
O’Reilly Verlag GmbH & Co. KG, Balthasarstraße 81, 50670 Köln, kommentar(at)oreilly.de