xsd:Name
The type xsd:Name
represents an XML name, which can be used as an element-type name or attribute name, among other things. Specifically, this means that values must start with a letter, underscore(_
), or colon (:
), and may contain only letters, digits, underscores (_
), colons (:
), hyphens (-
), and periods (.
). Colons should only be used to separate namespace prefixes from local names.
Simple Type Information
Namespace: http://www.w3.org/2001/XMLSchema
Schema Document: datatypes.xsd
Content
Examples
Valid values | Comment |
---|---|
myElement | |
_my.Element | |
my-element | |
pre:myelement3 | this is recommended only if pre is a namespace prefix; otherwise, colons should not be used |
Invalid values | Comment |
-myelement | a Name must not start with a hyphen |
3rdElement | a Name must not start with a number |
an empty value is not valid, unless xsi:nil is used |
Type Inheritance Chain
- xsd:anySimpleType
- restricted by xsd:string
- restricted by xsd:normalizedString
- restricted by xsd:token
- restricted by xsd:Name
- restricted by xsd:NCName
- restricted by xsd:ID
- restricted by xsd:IDREF
- used in list xsd:IDREFS
- restricted by xsd:ENTITY
- used in list xsd:ENTITIES
- restricted by xsd:NCName
- restricted by xsd:Name
- restricted by xsd:token
- restricted by xsd:normalizedString
- restricted by xsd:string