|
|||||
Attribute tests on items of the "attributes" shelf | |||||
Related Syntax |
All the tests that can usually be applied to attributes can be used with any identification of an attribute, where the attribute is identified by using the attribute's name, using an attribute alias name, or selecting an item of the attributes
shelf.
Because all attributes of specified attributes
are, by definition, specified, the is specified
, is defaulted
, and is implied
tests don't make much sense when applied to it: is specified
always succeeds, and is defaulted
and is implied
always fail.
For example, the following repeat over
loop outputs only those attributes whose values are defaulted or specified (excluding those which are implied or unspecified) and whose values consist entirely of letters. The attributes are output in the order in which they are declared. This is accomplished by testing an attribute identified by an attribute alias name:
output "<%q" repeat over attributes as this-attribute do when attribute this-attribute isnt implied and attribute this-attribute matches (letter+ value-end) output " " || key of attribute this-attribute || done again output ">"
Related Syntax attributes is defaulted is implied is specified |
---- |