10.2.5 SGML Property Operations
These procedures make use of particular properties that are defined by the property set for SGML.
(attributes nl)
This is equivalent to:
(define (attributes nl)
  (node-list-property 'attributes nl))
(attribute string nl)
Returns the mapping over nl of the function that returns the member of the value of the attributes property whose name is equal to string.  This could be defined as follows:
(define (attribute name nl)
  (node-list-map (lambda (snl)
                   (named-node name (attributes snl)))
                 nl))
(element-with-id string snl)
Returns a singleton node-list returning the element in the same grove as snl whose unique identifier is string, if there is such an element, and otherwise returns the empty node-list.  snl defaults to (current-node).
(referent nl)
This is equivalent to:
(define (referent nl)
  (node-list-property 'referent nl))
(match-element? pattern snl)
Returns #t if snl is a node of class element that matches pattern. pattern is either a list or a single string or symbol.  A string or symbol is equivalent to a list containing just that string or symbol.  The list can contain strings or symbols.  The element matches the list if the last string or symbol matches the gi of the element, and the next to last matches the gi of the element's parent, and so on.  Each string or symbol may optionally be followed by a list containing an even number of strings or symbols, which are interpreted as attribute name and value pairs all of which the element whose gi matches the preceding string or symbol shall have.
For example,
(match-element? '(e1 (a1 v1 a2 v2) e2 (a3 v3) e3 e4) n)
returns true if

•  the gi of n is e4,

•  the gi of n's parent is e3,

•  the gi of n's grandparent is e2,

•  n's grandparent has an a3 attribute with a value equal to v3,

•  the gi of n's great grandparent is e1,

•  n's great grandparent has an a2 attribute with a value equal to v2, and

•  n's great grandparent has an a1 attribute with a value equal to v1.
snl defaults to the node-list returned by the current-node procedure.
When a string or symbol in the pattern is compared against a property value, and the property value was subject to upper-case substitution, upper-case substitution shall also be performed on the string before comparison.
(select-elements nl pattern)
Returns a node-list comprising those members of nl that match pattern as defined by the match-element? procedure.
(q-element pattern nl)
(q-element pattern)
Searches in the subgroves whose roots are each members of nl for elements matching pattern, as defined by the match-element? procedure.  nl defaults to the node-list returned by current-node.
(q-class symbol nl)
(q-class symbol)
Searches in the subgroves whose roots are each members of nl for nodes whose class is symbol. nl defaults to the node-list returned by current-node.
(q-sdata string nl)
(q-sdata string)
Searches in the subgroves whose roots are each members of nl for nodes whose class is sdata and the value of whose sysdata property is string. nl defaults to the node-list returned by current-node.