declaration of

operator

Return type:
attribute-declaration OR element-declaration
Returns:
The declaration of the given element-expression or declared-attribute.
Syntax
declaration of (element-expression | declared-attribute)
    


Purpose

The operator declaration of returns the element-declaration or attribute-declaration of the element-expression 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.

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"}.