XSD datatype
xs:Name
An XML name, which may contain a colon. Rarely the type you want — NCName usually is.
xs:Name permits the colon that xs:NCName forbids, because it models the raw XML name production rather than a namespace-aware one. In practice a name containing a colon is a QName, and should be typed as one.
It is worth knowing mainly to explain why some schemas accept 'a:b' where you expected a rejection.
- Lexical space
- Letter, underscore or colon, then name characters including colons.
- Derives from
xs:token- Category
- String types
- Facets
- length, minLength, maxLength, pattern, enumeration, whiteSpace
The schema used
This is the exact schema the literals above are validated against. Paste it into the validator with one of them to see the result yourself.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="v" type="xs:Name"/>
</xs:schema>Related
Get started
Bring order to the XML your team can't afford to ignore.
Create a free account and get a private workspace to search, validate, diff, and monitor your XML feeds, sitemaps, schemas, and vendor integrations.