Name

rng:name — Specifies a name pattern which matches a name

XML syntax example

<element>
 <name>desc</name>
 <optional><attribute name="type"/></optional>
 <text/>
</element>

Compact syntax example

element desc { attribute type { text }?, text }

Parents

attribute, choice, element, except

Description

The name element specifies a name class that contains a specific name in a specific namespace. When used as the direct child of an element or attribute pattern, it is an alternative for the name attribute on element or attribute. However, you can’t use both at the same time—they are mutually exclusive.

See also

§11, attribute, element

Get XML Pocket Reference, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.