XML technologies / XML Schema / Data type reference / xs:Name

(Excerpt from “XML Schema” by Eric van der Vlist)

XML 1.0 names

Derived from: xs:token

Primitive type: xs:string

Known subtypes: xs:NCName

Facets: xs:enumeration, xs:length, xs:maxLength, xs:minLength, xs:pattern, xs:whiteSpace

Definition

<xs:simpleType name="Name" id="Name">
    <xs:restriction base="xs:token">
        <xs:pattern value="\i\c*"/>
    </xs:restriction>
</xs:simpleType>

Description

The lexical and value spaces of xs:Name consist of tokens (NMTOKEN) matching the XML 1.0 definition of a name.

Restrictions

As in XML 1.0, these names can contain colons (:), but these have no special meaning. A different data type (xs:QName) should be used for qualified names using namespace prefixes.

Example

Valid values include "Snoopy", "CMS" or "_1950-10-04_10:00".

Invalid values include "0836217462" (an xs:Name cannot start with a digit) or "kühn,dreist" (commas are forbidden).

   

 

 

 

back to top