data-attribute

operator

Syntax
data-attribute data-attribute-name of (attribute attribute-name (of element-expression)? indexer?) indexer?
or
data-attribute data-attribute-name
    


Purpose

data-attribute differentiates between attributes that belong to an entity or entities attribute, and other attributes.

In the syntax, the parentheses are used to eliminate confusion between the two indexers. The first optional indexer (inside the parentheses) is associated with the attribute of the qualified element or external entity currently being processed. This attribute must be declared as entity or entities. The second optional indexer (outside the parentheses) is associated with the data attribute named in the parenthesized attribute value item.

In the lexical scope of an external-data-entity rule, data-attribute refers to data attributes of the current external data entity. In this situation, the second form of the syntax is used. Note also that in this context, an unqualified attribute is a synonym for data-attribute.

The following code illustrates the use of data-attribute:

  element "tableref"
     local integer column-count
  
     set column-count to number of data-attribute "colwidth" of attribute "name"