create-element-event

operator

Return type: markup-element-event
Returns:        A markup-element-event corresponding to the given element-declaration and with the specified-attributes.

Syntax
create-element-event element-declaration (attributes specified-attributes)?
    


Purpose

The operator create-element-event is used to create a new element event, that corresponds to the supplied element-declaration and the specified-attribute shelf.

The returned markup-element-event is not associated with any context. It has no parent element, no children, previous elements, etc. To add the missing context, process the generated stream of events through a do markup-parse.

The content queries work, since they are based on the element-declaration rather than the actual parsed element content. The occurrence is one, its status is proper, and usemap is #none.

The specified attributes of the returned element event correspond exactly to the specified-attributes argument, whereof declaration of must belong to the attributes of the argument element-declaration.

The operator throws a #program-error if the element cannot be created as specified. More specifically, if

The case-sensitivity of the equality checks performed during the attribute verification depends on the case-sensitivity of the element-declaration. This allows the same shelf of specified attributes to be applied to different element declarations.