operator
declaration of (element-expression | entity-event | declared-attribute)
The operator declaration of returns
the element-declaration, entity-declaration, or
attribute-declaration of the element-expression, entity-event,
or declared-attribute, respectively, that it is applied to.
In the case of an SGML or validating XML parse, an element-declaration can be obtained in an
element rule with declaration of #current-markup-event. In a well-formed XML parse,
this returns a declaration that contains the element's name and nothing else. In a markup-parse,
it returns the original declaration of the element. The same expression used inside
an external-text-entity rule returns an entity-declaration instead.
An expression like declaration of attribute "a" can be used to obtain the
attribute-declaration of the attribute in question. Inside an element rule, this expression would
be equivalent to (attributes of declaration of #current-markup-event){"a"}.