by Eric van der Vlist is published by O'Reilly & Associates (ISBN: 0596004214)
attribute — Pattern matching an attribute
element attribute { ( attribute ns { text }?, attribute datatypeLibrary { xsd:anyURI }?, attribute * - (rng:* | local:*) { text }* ), ( attribute name { xsd:QName } | ( ( element * - rng:* { ... }* ) & ( element name { ... } | element anyName { ... } | element nsName { ... } | element choice { ... } ) ) ), ( ( element * - rng:* { ... }* ) & ( element element { ... } | element attribute { ... } | element group { ... } | element interleave { ... } | element choice { ... } | element optional { ... } | element zeroOrMore { ... } | element oneOrMore { ... } | element list { ... } | element mixed { ... } | element ref { ... } | element parentRef { ... } | element empty { ... } | element text { ... } | element value { ... } | element data { ... } | element notAllowed { ... } | element externalRef { ... } | element grammar { ... } )? ) } |
attribute, choice, define, element, except, group, interleave, list, mixed, oneOrMore, optional, start, zeroOrMore
The attribute pattern matches an attribute. The name of the attribute may be defined by using either a name attribute or a name class.
After simplification, attribute patterns can contain only patterns relevant for text nodes.
Attributes can't be duplicated, either directly or by overlapping name classes.
Attributes that have an infinite name class (anyName or nsName) must be enclosed in a oneOrMore or zeroOrMore pattern.
<attribute name="id"/> <attribute name="xml:lang"> <data type="language"/> </attribute> <attribute> <anyName/> </attribute> |
This attribute defines the default datatype library. The value is inherited.
When name is specified, the attribute pattern matches attributes with this name only. This can be a shortcut to define a single name as a name class for the attribute pattern).
name and the definition of a name class can't both be specified (they are exclusive options).
This attribute defines the namespace of the attribute. Note that in the context of the attribute pattern, the ns attribute isn't inherited.
This text is released under the Free Software Foundation GFDL.