This version is out of date, covering development from v4.6.0 to v4.7.1. It is maintained here only for inbound reference links from elsewhere. Jump to the current version of aTbRef. |
|
A Tinderbox Reference File : Actions & Rules : Operators : Action Operator Scope : Group-based operators : collect(group,attribute) | aTbRef Site Map |
collect(group,attribute) |
Operator Type: | Set creation |
Operator Scope of Action: | Group |
A function collect() builds sets. (See collect_if() for a related new operator)
collect(where,attribute)
builds a set by visiting each note described by where and adding the value of the designated attribute to the set.
where may be any of {child,descendent,sibling,ancestor,all}. In addition, where may be argument that designates a particular (single) note other than this.
what can be any expression, but is typically an attribute.
For example,
collect(child,$Name)
constructs a set with the name of each child of the note.
For example,
collect(child(/agents/books),$Name)
does the same for children of the note 'books' inside 'agents'.
Up: Group-based operators | |
Previous: any(group,value) | Next: every(group,value) |
Licensed under Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
[See aTbRef CC licence Attribution/Waiver info info]