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).

   

 

 

 

back to top