10.2.1. HyTime Support

Use of the facilities in this clause in the style or transformation languages requires the hytime feature.

The grovepos abstract data type is represented by a list each of whose members is

(value-proploc propname snl #!key apropsrc?: default:)

Returns the value that the member of snl exhibits for the property named propname. propname shall be a symbol or string, interpreted as for the node-property procedure. If the member of snl does not exhibit a value for propname or exhibits a null value, then if default: is supplied, default: shall be returned; otherwise, an error shall be signaled. apropsrc?:, if true, has the same effect as specifying an apropsrc attribute with a value of apropsrc for the code proploc form in ISO/IEC 10744.

(list-proploc propname nl #!key apropsrc?: ignore-missing?:)

Returns a list of objects, one for each member of nl, where each object is the value that the member of nl exhibits for propname. propname shall be a symbol or string, interpreted as for the node-property procedure. If some member of nl does not exhibit a value for propname or exhibits a null value, then if ignore-missing?: is true, the resulting list shall contain no object for that member; otherwise, an error shall be signaled. apropsrc?:, if true, has the same effect as specifying an apropsrc attribute with a value of apropsrc for the code proploc form in ISO/IEC 10744.

(node-list-proploc propname nl #!key apropsrc?: ignore-missing?:)

Returns the node-list that results from concatenating the values that each member of nl exhibits for propname. propname shall be a symbol or string, interpreted as for the node-property procedure. For the class of each member of nl, propname shall be nodal. If some member of nl does not exhibit a value for propname or exhibits a null value, then if ignore-missing?: is true, the resulting node-list shall contain no nodes for that member; otherwise, an error shall be signaled. apropsrc?:, if true, has the same effect as specifying an apropsrc attribute with a value of apropsrc for the code proploc form in ISO/IEC 10744.

(listloc dimlist nl #!key overrun:)
(listloc dimlist list #!key overrun:)
(listloc dimlist string #!key overrun:)

This addresses the members of the second argument in the same manner as the listloc architectural form defined in ISO/IEC 10744. Returns a node-list, list, or string according to the type of the second argument. dimlist is a list of integers. overrun: is one of the symbols error, wrap, truncate, or ignore. The default is error.

(nameloc nmlist nnl #!key ignore-missing?:)

Returns a node-list containing one member for each member of nmlist, where nmlist is a string, symbol, or a list of strings and/or symbols. It shall be an error if any member of nmlist does not match the name of some member of nl, unless ignore-missing?: is true.

(groveloc list nl #!key overrun:)

Returns a list of nodes located in the same manner as with the groveloc architectural form of ISO/IEC 10744. list is a list in the same format as the representation of the grovepos abstract data type. overrun: is interpreted as with listloc.

(treeloc marklist nl #!key overrun: treecom?:)

Returns a list of nodes located in the same manner as with the treeloc architectural form of ISO/IEC 10744. marklist is list of integers. overrun: is interpreted as with listloc. treecom?:, if true, corresponds to a treecom attribute with a value of treecom.

(pathloc dimlist nl #!key overrun: treecom?:)

Returns a list of nodes located in the same manner as with the pathloc architectural form of ISO/IEC 10744. dimlist is a list of integers. overrun: is interpreted as with listloc. treecom?:, if true, corresponds to a treecom attribute with a value of treecom.

(relloc-anc dimlist nl #!key overrun:)
(relloc-esib dimlist nl #!key overrun:)
(relloc-ysib dimlist nl #!key overrun:)
(relloc-des dimlist nl #!key overrun:)

Returns a list of nodes located in the same manner as with the relloc architectural form of ISO/IEC 10744. The procedures relloc-anc, relloc-esib, relloc-ysib, and relloc-des correspond to values for the relation attribute of anc, esib, ysib, and des. dimlist is a list of integers. overrun: is interpreted as with listloc.

NOTE 27: Relations of parent and children are handled by parent and children procedures.
(datatok nl #!key  filter: concat: catsrcsp: catressp: tokensep:
ascp: stop: min: max: nlword: stem?:)

Returns a list of nodes located in the same manner as with the datatok architectural form of ISO/IEC 10744.

(make-grove string nl)

make-grove constructs a new grove and returns a node-list containing the grove root. string is the name of a grove plan. nl is the source text.

(literal-match string nl #!key level: boundary:
min-hits: max-hits:)
(hylex-match string nl #!key norm?: level: boundary:
min-hits: max-hits:)

These functions construct a new grove using the Data Tokenizer Property Set containing one tokenized string node for each non-overlapping match found in the data of each member of nl. A node-list of all tokenized string nodes is returned.

(compare proc list)

Returns #t if proc applied to each successive pair of strings returns #t, where proc is an argument of two strings that returns a boolean. This could be defined by:

(define (compare proc l)
  (if (null? l)
      #t
      (let loop ((prev (car l))
                   (rest (cdr l)))
        (cond ((null? rest) #t)
              ((proc prev (car rest))
               (loop (car rest) (cdr rest)))
              (else #f)))))

(ordered-may-overlap? nl)
(ordered-no-overlap? nl)

Each node shall be in an auxiliary grove, and the source nodes of all the nodes shall be in a single tree. Returns #t if the source nodes are ordered within that tree, and otherwise returns #f. For ordered-no-overlap?, the source nodes are considered to be ordered if, for each argument node, all of its source nodes are before any of the source nodes of the next argument node. For ordered-may-overlap?, the source nodes are considered to be ordered if, for each argument node, the first of its source nodes is before the first of the source nodes of the next argument node.

(span nl symbol)

Each node shall be in an auxiliary grove, and the source nodes of all the nodes shall be in a single tree. Returns the number of quanta between the first and the last source nodes. symbol specifies the quantum. It shall have one of the values allowed for the filter: argument of the datatok procedure.