ddn.data.xml.names

XML names, QNames, and namespace helper types.

Types 3

structXmlName

A validated XML Name.

Fields
string valueThe name value, as provided.
structXmlQName

A validated XML namespace-aware qualified name.

Note

This represents the lexical QName (prefix:local) as used in XML Namespaces.
Fields
string prefixPrefix part (empty means “no prefix”).
string localLocal part (never empty).

A namespace mapping helper.

Fields
string prefixNamespace prefix (empty for the default namespace).
string uriNamespace URI (empty means “no namespace”).

Functions 6

fnbool isXmlNameStartChar(const dchar c, const bool allowColon) @safe pure nothrow
fnbool isXmlNameChar(const dchar c, const bool allowColon) @safe pure nothrow
fnbool isValidXmlName(const string value) @safe pure nothrowChecks whether `value` is a valid XML `Name`.
fnbool isValidXmlNCName(const string value) @safe pure nothrowChecks whether `value` is a valid XML `NCName`.
fnXmlName parseXmlName(const string value, const XmlLocation location = XmlLocation.init) @safeParses and validates an XML `Name`.
fnXmlQName parseXmlQName(const string value, const XmlLocation location = XmlLocation.init) @safeParses and validates an XML QName.