number of data-attribute

operator

Return type:
Integer
Returns:
The number of tokens in a data attribute.
Syntax
number of data-attribute attribute-name (of element-expression)?
    


Purpose

The number of data-attribute operator returns the number of tokens in a list-valued data attribute for an attribute of an element (as specified by of element-expression, or for the current element if not specified). When the attribute does not have a list-valued type, the test will always yield a value of one.

Inside the lexical scope of an external-data-entity rule and if of element-expression is not specified, the number of data-attribute operator evaluates to the number of tokens in a list-valued data attribute for the current external data entity. In this context, number of data-attribute is synonymous with number of attribute

Related Syntax