RELAX NG by Eric van der Vlist will be published by O'Reilly & Associates (ISBN: 0596004214)
You are welcome to use our annotation system to give your feedback.
attribute — Pattern matching an attribute.
pattern
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.
attribute
The attribute pattern matches an attribute. The name of the attribute may be defined either by using a name attribute or a name class.
After simplification, attributes patterns can only contain patterns relevant for text nodes.
Attributes cannot be duplicated, either directly or by overlaping name classes.
Attributes which 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> |
The datatypeLibrary attribute defines the default datatype library. The value of datatypeLibrary is inherited.
When name is specified, the attribute pattern will match attributes with this name ( 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 cannot both be specified (they are exclusive options).
The ns attribute defines the namespace of the attribute. Note that in the context of the ns pattern, the ns attribute is not inherited.
You are welcome to use our annotation system to give your feedback.
[Annotations for this page]
All text is copyright Eric van der Vlist, Dyomedea. During development, I give permission for non-commercial copying for educational and review purposes. After publication, all text will be released under the Free Software Foundation GFDL.