[Archive copy mirrored from the URL: http://www.ornl.gov/sgml/WG8/DSSSL/digest.htm, September 10, 1997; see this canonical version of the document.]

DSSSL Digest

This document contains all the procedures and top-level expressions from the electronic version of the DSSSL standard document. Each prototype is followed by the first paragraph of its definition in the standard. Multiple prototypes which share a definition are cross-referenced to the first prototype in the group, which is followed by the summary. Section numbers are given for all prototypes.

The balance of this document was produced automatically by Henry S. Thompson, using Jade 0.7 and LT XML.

Note that the links associated with section numbers in the standard are to an HTML version of the full standard which is not yet available.


Index

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z


(* x length-spec) 12.5.2 See +
(* length-spec x) 12.5.2 See +

(* q1 ...) 8.5.7.11

Returns the product of its arguments. The dimension of the result shall be the sum of the dimensions of the arguments.

(+ length-spec ...) 12.5.2

These procedures behave in the same way as their counterparts on quantities, except that they shall return a length-spec if any of their arguments is a length-spec (as opposed to just a length).

(+ q1 ...) 8.5.7.10

Returns the sum of its arguments, which shall all have the same dimension. The result shall have the same dimension as the arguments.

(- q1 q2) 8.5.7.12

With two or more arguments, returns the difference of its arguments, associating to the left; with one argument, returns the negation of its argument. The dimensions of all the arguments shall be identical. The dimension of the result shall be the same as the dimension of the arguments.

(- q1 q2 ...) 8.5.7.12 See -
(- length-spec ...) 12.5.2 See +
(- q) 8.5.7.12 See -

(/ q1 q2) 8.5.7.13

With two or more arguments, returns the quotient of its arguments, associating to the left; with one argument, returns 1 divided by the argument. The dimension of the result shall be the difference of the dimensions of each of the arguments.

(/ q) 8.5.7.13 See /
(/ q1 q2 ...) 8.5.7.13 See /
(/ length-spec x) 12.5.2 See +
(/ x length-spec) 12.5.2 See +
(< q1 q2 q3 ...) 8.5.7.7 See =
(<= q1 q2 q3 ...) 8.5.7.7 See =

(= q1 q2 q3 ...) 8.5.7.7

These procedures return #t if their arguments are ! ! (respectively): equal, monotonically increasing, monotonically decreasing, monotonically nondecreasing, or monotonically nonincreasing.


(=> query-expression transform-expression priority-expression?) 11.2
query-expression := expression
transform-expression := expression
priority-expression := expression

Each association has up to three components:

  • a query-expression returning a node-list; an association is potentially applicable to any node in the node-list returned by its query-expression.

  • a transform-expression that is evaluated for each of the nodes to which the association is applicable. The value returned describes the node or nodes in the result grove corresponding to the selected node in the source grove.

  • an optional priority-expression that affects whether the association actually applies to a node to which it is potentially applicable.

(> q1 q2 q3 ...) 8.5.7.7 See =
(>= q1 q2 q3 ...) 8.5.7.7 See =

(abs q) 8.5.7.14

Returns the magnitude of its argument.

(absolute-first-sibling? snl) 10.2.4.4

Returns #t if snl has no preceding sibling that is an element, and otherwise returns #f.

(absolute-last-sibling? snl) 10.2.4.4

Returns #t if snl has no following sibling that is an element, and otherwise returns #f.

(acos x) 8.5.7.19 See asin

(actual-c) 12.4.6

For each inherited characteristic c, actual-c shall return the value of c for the value flow object. This procedure shall be used only in the evaluation of an expression specifying a value for a characteristic. It shall be an error to call actual-c with a value flow object of f in the course of determining the value of c for f. Use of this procedure requires the actual-characteristic feature.


(add-char-properties keyword-argument-list character+) 8.5.8.1
keyword-argument-list := (keyword expression)*

The added-char-properties-declaration adds properties to each of the characters. The keyword-argument-list specifies the properties to be added. The keyword specifies the property name, and the expression specifies the property value. Each property either shall be a property that is pre-defined in this International Standard or it shall be explicitly declared using a character-property-declaration.

(address-local? address) 12.5.8

Returns #t if the address is local to the current document, and otherwise returns #f.

(address-visited? address) 12.5.8

Returns #t if address has been visited, and otherwise returns #f.

(address? obj) 12.5.8

Returns #t if obj is an object of type address, and otherwise returns #f.


(align-lines? expression) 12.6.5.1

The expression shall evaluate to a boolean specifying, if true, that an attempt shall be made in the course of distributing free space to keep lines in different columns aligned.

(all-area-reference-values symbol #!key unique: inherit:) 12.5.1.3 See first-area-reference-value

(ancestor string osnl) 10.2.4.1

Returns a node-list containing the nearest ancestor of osnl with a gi equal to string, or an empty node-list if there is no such ancestor or if osnl is empty.

(ancestor-child-number string snl) 10.2.4.2

Returns the child number of the nearest ancestor of snl whose generic identifier is string, or #f if there is no such ancestor.

(ancestors rnl) 11.3.3 See node-list-union

(ancestors nl) 10.2.3

Returns the mapping over nl of the function on a node that returns the ancestors of the node, where the ancestors of a node are an empty node-list if the node is a tree root, and otherwise are the result of appending the ancestors of the parent of the node and the parent of the node. This could be defined as follows: (define (ancestors nl) (node-list-map (lambda (snl) (let loop ((cur (parent snl)) (result (empty-node-list))) (if (node-list-empty? cur) result (loop (parent snl) (node-list cur result))))) nl))


(and test*) 8.3.2.3

The test expressions are evaluated from left to right, and the value of the first expression that evaluates to a false value is returned. Any remaining expressions are not evaluated. If all the expressions evaluate to true values, the value of the last expression is returned. If there are no expressions then #t is returned.

(append list ...) 8.5.3.10

Returns a list consisting of the elements of the first list followed by the elements of the other lists.

(apply proc args) 8.5.10.2

Proc shall be a procedure and args shall be a list. The first (essential) form calls proc with the elements of args as the actual arguments. The second form is a generalization of the first that calls proc with the elements of the list (append (list arg1 ...) args) as the actual arguments.

(apply proc arg1 ... args) 8.5.10.2 See apply

(asin x) 8.5.7.19

asin, acos, and atan return the arcsine, arccosine, and arctangent of their arguments, respectively. The result shall be a number. The two-argument variant of atan returns the angle of the complex number whose real part is the numerical value of q2 and whose imaginary part is the numerical value of q1; the dimensions of q1 and q2 shall be identical.

(asis-indirect-sosofo generated-object) 12.5.1.1

Returns a sosofo containing a single indirect flow object whose content is the kernel of generated-object. The kernel of generated-object shall be a sosofo.

(assoc obj alist) 8.5.3.15

alist (for association list) shall be a list of pairs. This procedure finds the first pair in alist whose car field is equal? to obj and returns that pair. If no pair in alist has obj as its car, then #f (not the empty list) is returned.

(atan x) 8.5.7.19 See asin
(atan q1 q2) 8.5.7.19 See asin

(attribute string nl) 10.2.5

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))

(attribute-string string osnl) 10.2.4.3

Returns a string representation of the attribute with name equal to string of osnl, or #f if osnl has no such attribute, or the attribute is implied, or osnl is empty.

(attributes rnl) 11.3.3 See node-list-union

(attributes nl) 10.2.5

This is equivalent to: (define (attributes nl) (node-list-property 'attributes nl))


(balance? expression) 12.6.5.1

The expression shall evaluate to a boolean. A value of #t indicates that a column-subset in the last column-set produced by a column-set-sequence shall be balanced. A value of #f indicates that it shall not be. If a column-subset is balanced, then free space shall be allocated evenly among all the columns in the column-subset. If a column-subset is not balanced, then free space shall be allocated to the columns in reverse order. The default is for the column-subset not to be balanced.


(binding-spec*) 8.3.2.5
binding-spec := (variable init)
init := expression

It shall be an error for a variable to appear more than once in any bindings. The inits are evaluated in the current environment, the variables are bound to the results, and the result of evaluating body in the extended environment is returned. Each binding of a variable has body as its region.

(boolean? obj) 8.5.1.2

boolean? returns #t if obj is either #t or #f and returns #f otherwise.


(bottom-float-space-above expression) 12.6.5.1

The expression shall evaluate to an object of type display-space specifying the size of a space to be added. For each column in the column-set that is spanned by an area in the bottom-float zone, a space of the specified size shall be added immediately before all the areas that span the column and that are in the bottom-float zone.

(caaaar pair) 8.5.3.5 See caar
(caaadr pair) 8.5.3.5 See caar
(caaar pair) 8.5.3.5 See caar
(caadar pair) 8.5.3.5 See caar
(caaddr pair) 8.5.3.5 See caar
(caadr pair) 8.5.3.5 See caar

(caar pair) 8.5.3.5

These procedures are compositions of car and cdr,! ! where for example caddr could be defined by (define caddr (lambda (x) (car (cdr (cdr x))))).

(cadaar pair) 8.5.3.5 See caar
(cadadr pair) 8.5.3.5 See caar
(cadar pair) 8.5.3.5 See caar
(caddar pair) 8.5.3.5 See caar
(cadddr pair) 8.5.3.5 See caar
(caddr pair) 8.5.3.5 See caar
(cadr pair) 8.5.3.5 See caar

(car pair) 8.5.3.3<! ! /A>

Returns the contents of the car field of pair. Note that it shall be an error to take the car of the empty list.


(case key case-clause+) | (case key case-clause* (else expression)) 8.3.2.2
key := expression
case-clause := ((datum*) expression)

All the datums shall be distinct. A case-expression is evaluated as follows. key is evaluated and its result is compared against each datum. If the result of evaluating key is equal (in the sense of equal?) to a datum, then the result of evaluating the expression in the corresponding case-clause is returned as the result of the case-expression. If the result of evaluating key is different from every datum, and if there is an else clause, then the result of evaluating its expression is the result of the case-expression; otherwise, an error is signaled.

(category-page-number #!key first-area-of-node: last-area-of-node:) 12.5.1.2

Returns a generated-object whose kernel is the number of pages before or the same as the reference area that has the same category as the page that is or that contains the reference area.

(cdaaar pair) 8.5.3.5 See caar
(cdaadr pair) 8.5.3.5 See caar
(cdaar pair) 8.5.3.5 See caar
(cdadar pair) 8.5.3.5 See caar
(cdaddr pair) 8.5.3.5 See caar
(cdadr pair) 8.5.3.5 See caar
(cdar pair) 8.5.3.5 See caar
(cddaar pair) 8.5.3.5 See caar
(cddadr pair) 8.5.3.5 See caar
(cddar pair) 8.5.3.5 See caar
(cdddar pair) 8.5.3.5 See caar
(cddddr pair) 8.5.3.5 See caar
(cdddr pair) 8.5.3.5 See caar
(cddr pair) 8.5.3.5 See caar

(cdr pair) 8.5.3.4

Returns the contents of the cdr field of pair. Note that it shall be an error to take the cdr of the empty list.

(ceiling x) 8.5.7.16 See floor
(char-ci<=? char1 char2) 8.5.8.5 See char-ci=?
(char-ci<? char1 char2) 8.5.8.5 See char-ci=?

(char-ci=? char1 char2) 8.5.8.5

These procedures are similar to char=? etc., but they treat upper-case and lower-case letters as the same. All these procedures use the current language. For example, (char-ci=? #\A #\a) returns #t.

(char-ci>=? char1 char2) 8.5.8.5 See char-ci=?
(char-ci>? char1 char2) 8.5.8.5 See char-ci=?
(char-downcase char) 8.5.8.6 See char-upcase

(char-property symbol char) 8.5.8.7

Returns the value of the property symbol of char. If symbol is not a character property, an error is signaled. If char does not have a property symbol, then obj is returned, or if obj was not specified, the default value of the property is returned.

(char-property symbol char obj) 8.5.8.7 See char-property

(char-script-case string1 obj1 ... stringn-1 objn-1 objn) 12.4.6

This procedure shall be used only in the evaluation of an expression specifying a value for an inherited characteristic. There shall be an odd number of arguments. All arguments other than the last shall be interpreted as a series of pairs, where the first member of the pair is a string specifying a public identifier, and the second member is any object. If the value flow object is not a character flow object or is a character flow object that has a script property that is not #f, then char-script-case shall return its last argument. Otherwise, the value of the script characteristic shall be compared in turn against the first member of each argument pair; if it matches, then the second member shall be returned; if there is no match, then the last argument shall be returned.what is order of evaluation if you specify an overriding characteristic for script and a char-script-case expression as well.

(char-upcase char) 8.5.8.6

The procedures return the upper- or lower-case equivalent of char as defined by the current language. If char has no upper- or lower-case equivalent, char is returned.How do we handle fact that upper-casing a single character may result in more than one character?

(char<=? char1 char2) 8.5.8.4 See char=?
(char<? char1 char2) 8.5.8.4 See char=?

(char=? char1 char2) 8.5.8.4

These procedures impose a total ordering on the set of characters. All the procedures other than char=? use the current language.

(char>=? char1 char2) 8.5.8.4 See char=?
(char>? char1 char2) 8.5.8.4 See char=?

(char? obj) 8.5.8.3

Returns #t if obj is a character, and otherwise returns #f.


(character character-list) 11.4.2
character-list := (character+)

A transliteration-map-definition binds variable to an object of type transliteration-map. The transliteration-map specifies a transliteration in which certain characters are represented by sequences of one or more other characters. Each transliteration entry specifies that the first character is represented by the sequence of characters in the character-list.


(character+) 11.4.2

A transliteration-map-definition binds variable to an object of type transliteration-map. The transliteration-map specifies a transliteration in which certain characters are represented by sequences of one or more other characters. Each transliteration entry specifies that the first character is represented by the sequence of characters in the character-list.

(child-number snl) 10.2.4.2

Returns the child number of snl. The child number of an element is one plus the number of element siblings of the current element that precede in tree order the current element and that have the same generic identifier as the current element.

(children rnl) 11.3.3 See node-list-union

(children nl) 10.2.3

Returns the mapping over nl of the function on a node that returns the value of the node's children property, if any, and otherwise the empty node-list. This could be defined as follows: (define (children nl) (node-list-map (lambda (snl) (let ((childprop (node-property 'children-property-name snl default: #f))) (if childprop (node-property childprop snl default: (empty-node-list)) (empty-node-list)))) nl))


(collate [[multi-collating-element-specification* | collating-symbol-specification*]] order-specification ) 8.5.8.2

A collation-specification determines the relative order of strings.

(color color-space arg ...) 12.5.9

Returns an object of type color. color-space is the color-space relative to which color is to be specified. The type and number of the remaining arguments depend on the color-space family to which color-space belongs. If no arguments other than color-space are specified, then the default color in color-space is returned.

(color-space string arg ...) 12.5.9

Returns an object of type color-space. The string specifies a public identifier identifying the color-space family. The remaining arguments specify parameters to the color-space family. The type and number of the remaining arguments depend on the color-space family as described below.

(color-space? obj) 12.5.9

Returns #t if obj is a color-space, and otherwise returns #f.

(color? obj) 12.5.9

Returns #t if obj is a color, and otherwise returns #f.


(column [[width-specification? | height-specification? | x-origin-specification? | y-origin-specification? | footnote-separator-specification? | header-specification? | footer-specification?]]) 12.6.5.1

If the column-set filling-direction is top-to-bottom, then the column-specification shall contain a width-specification and an x-origin-specification. If the column-set filling-direction is right-to-left or left-to-right, then the column-specification shall contain a height-specification and a y-origin-specification. These specifications give the geometry of the column.

(column-number #!key first-area-of-node: last-area-of-node:) 12.5.1.2

Returns a generated-object whose kernel is the number of columns in the same column-subset as the reference area that is before or the same as the reference area.

(column-set-model? obj) 12.6.5.1

Returns #t if obj is of type column-set-model, and otherwise returns #f.


(column-subset [[column-specification+ | column-subset-flow-map | top-float-space-below-specification? | bottom-float-space-above-specification? | balance-specification? | justify-specification? | justify-limit-specification? | justify-last-limit-specification? | length-deviation-specification? | length-decrease-order-specification? | align-lines-specification?]]) 12.6.5.1

For each column-subset in the column-set-model, there shall be a column-subset-specification.

(compare proc list) 10.2.1

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)))))


(cond cond-clause+) | (cond cond-clause* (else expression)) 8.3.2.1
cond-clause := (test expression) | (test) | (test => recipient)
recipient := expression

A cond-expression is evaluated by evaluating the test expressions of each successive cond-clause in order until one of them evaluates to a true value. When a test evaluates to a true value, then the result of evaluating the expression in the cond-clause is returned as the result of the entire cond expression. If the selected cond-clause contains only the test and no expression, then the value of the test is returned as the result. If the cond-clause contains a recipient, then recipient is evaluated. Its value shall be a procedure of one argument; this procedure is then invoked on the value of the test. If all tests evaluate to false values, and there is no else clause, then an error is signaled; if there is an else clause, then the result of evaluating its expression is returned.

(cons obj1 obj2) 8.5.3.2

Returns a pair whose car is obj1 and whose cdr is obj2.


(contents-alignment expression ) 12.6.4.1

The expression shall evaluate to one of the symbols start, end, center, or justify specifying the alignment of the child areas within the area container in the filling-direction of the area container. The default is start.

(cos x) 8.5.7.18 See sin
(create-follow snl sg #!key label: result-path: optional: unique:) 11.3.2 See create-sub
(create-preced snl sg #!key label: result-path: optional: unique:) 11.3.2 See create-sub

(create-root obj sg) 11.3.2

Returns a create-spec specifying the creation of the root of a result grove. sg is a subgrove-spec for the root of the result grove. obj is an identifier for the result grove.

(create-spec? obj) 11.3.2

Returns #t if obj is of type create-spec, and otherwise returns #f.

(create-sub snl sg #!key property: label: result-path: optional: unique:) 11.3.2

create-sub, create-preced, and create-follow return a create-spec specifying that for each arrow labeled label: with a start-point of snl the subgrove specified by sg shall be created in the result grove. The evaluation of the create-sub, create-preced, or create-follow procedures does not of itself cause the creation of nodes in the result grove; a create-spec that is not returned by a transform-expression shall be ignored.

(current-language) 8.5.8.2

At any point in a computation there may be a current language. current-language returns the current language if there is one, and otherwise returns #f.

(current-node) 10.1.1

Returns a singleton node-list. The semantics of this are defined by the context in which the SDQL expression occurs.

(current-node-address) 12.5.8

Returns an address object representing the current node.

(current-node-page-number-sosofo) 12.6.3

Returns an indirect-sosofo whose content is a sequence of character flow objects representing the page number of the primary flow object of the current node.

(current-root) 10.1.1

Returns a singleton node-list. The semantics of this are defined by the context in which the SDQL expression occurs.

(data nl) 10.2.3

Returns a string containing the concatenation of the data of each member of nl. The data of a node is:

(datatok nl #!key filter: concat: catsrcsp: catressp: tokensep: ascp: stop: min: max: nlword: stem?:) 10.2.1

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


(datum*) | (datum+ . datum) | abbreviation 8.5.3

The most general notation (external representation) for pairs is the dotted notation (c1 . c2) where c1 is the value of the car field and c2 is the value of the cdr field. For example (4 . 5) is a pair whose car is 4 and whose cdr is 5. Note that (4 . 5) is the external representation of a pair, not an expression that evaluates to a pair.


(declare-char-characteristic+property identifier string expression) 12.4.6

This declares identifier to be an additional non-inherited characteristic of a character flow object and also declares identifier to be an additional character property. The string shall be a public identifier specifying the semantics of the characteristic. The default value of the characteristic is the value of the identifier property of the character that is the value of the char: characteristic of the flow object. The default value of the property is the value of expression. This expression shall be evaluated normally; it shall not be evaluated in the special way that the values of characteristics are evaluated, nor shall it be evaluated with respect to a current node.


(declare-char-property identifier expression) 8.5.8.1

This declares identifier to be a character property with the default value equal to the value of expression.


(declare-characteristic identifier string expression ) 12.4.6

This declares identifier to be an additional inherited characteristic. It also has the effect of declaring procedures inherited-identifier and actual-identifier. The string is a public identifier specifying the semantics of the characteristic. If an implementation does not recognize the specified public identifier, it shall ignore uses of the characteristic. The expression is the specification of the initial value of the characteristic.Specify how expression is evaluated.


(declare-default-language expression) 8.5.8.2

A default-language-declaration declares the current language which is used initially in the evaluation of an expression. The expression shall evaluate to a language object.


(declare-flow-object-class identifier string) 12.4.3

This declares identifier to be a flow-object-class-name for a class with a public identifier specified by string.


(declare-initial-value identifier expression) 12.4.6

This declares the initial value of the inherited characteristic identifier to be an expression.Specify how expression is evaluated. This shall not be used for characteristics declared with an application-characteristic-declaration.


(declare-reference-value-type identifier) 12.5.1.3

A reference-value-type-declaration declares identifier to be the name of a reference-value type. The identifier shall not be the name of a characteristic or of any other keyword argument accepted by a make-expression.


(decorate expression) 12.6.4.1

The expression shall evaluate to a decoration-area object. The area is decorated by the object as explained in .

(decorated-area-width) (decorated-area-height) 12.5.3

decorated-area-width and decorated-area-height return a length-spec specifying, respectively, the width and height of the area to be decorated. They may be used in the specification for the placement-point-x: and placement-point-y: arguments of a decoration-area.

(decoration-area sosofo #!key placement-point-x: placement-point-y: placement-direction:) 12.5.3

Returns an object of type decoration-area. The sosofo can specify a single flow object of any class that can be used inline. The result of formatting the sosofo is used as the decoration area. The decoration area has a placement point and a placement direction specified by the other arguments. The inline area produced by the sosofo is placed so that its position point lies on the placement point of the decoration area and its escapement direction is in the placement direction of the decoration area.


(default construct-expression) 12.4.1

A default-element-construction-rule matches any node of class element.


(define (variable formal-argument-list) body) 8.4

This form is equivalent to (define variable (lambda (variable formal-argument-list) body)).


(define variable expression) 8.4

This syntax is primitive.


(define-column-set-model variable [[column-subset-specification* | fill-out-specification? | tied-column-subset-specification* | filling-direction-specification? | width-specification? | height-specification? | decoration-specification*]] ) 12.6.5.1

A column-set-model-definition defines variable to be an object of type column-set-model.


(define-language variable [[collation-specification? | toupper-specification? | tolower-specification?]]) 8.5.8.2

A language-definition defines variable to be an object of type language.


(define-page-model page-model-name [[page-region-specification+ | width-specification | height-specification | filling-direction-specification? | decoration-specification*]]) 12.6.4.1
page-model-name := variable

define-page-model binds page-model-name to a page-model object.


(define-transliteration-map variable transliteration-entry) 11.4.2
transliteration-entry := (character character-list)
character-list := (character+)

A transliteration-map-definition binds variable to an object of type transliteration-map. The transliteration-map specifies a transliteration in which certain characters are represented by sequences of one or more other characters. Each transliteration entry specifies that the first character is represented by the sequence of characters in the character-list.


(define-unit unit-name expression) 8.5.7.1

expression shall evaluate to a quantity. A unit-declaration declares the derived quantity unit-name to be equivalent to this quantity. In this context, unit-name is a separate token.

(descendants nl) 10.2.3

Returns the mapping over nl of the function on a node that returns the descendants of the node, where the descendants of a node are defined to be the result of appending the subtrees of the children of the node. This could be defined as follows: (define (descendants nl) (node-list-map (lambda (snl) (subtree (children snl))) nl))

(descendants rnl) 11.3.3 See node-list-union

(display-size) 12.5.2

This procedure shall be used only in the evaluation of an expression specifying a value for a characteristic. The value flow object shall be a displayed flow object. It returns a length-spec specifying the display-size of the value flow object.

(display-space length-spec #!key min: max: conditional?: priority:) 12.5.4.1

Returns an object of type display-space. length-spec specifies the nominal size of the space. min: and max: are length-specs specifying the minimum and maximum size of the space. These both default to the nominal size. priority: is either an integer or the symbol force. The default is 0. Higher integers indicate higher priorities. When two display-spaces are adjacent, then if one has a higher priority than the other, the minimum, nominal, and maximum values from the higher priority space shall be used, and the lower priority space shall be ignored. If the priorities are equal, but one display-space has a higher nominal value than the other, then the minimum, nominal, and maximum values from the space with the higher nominal value shall be used, and the other space shall be ignored. Otherwise, the priorities and nominal values are both equal; in this case, that nominal value, the lesser of the maximum values, and the greater of the minimum values shall be used. A priority of force is considered greater than any other priority. However, if both priorities are force, then the nominal, minimum, and maximum values shall be added together. The conditional: argument is a boolean; if true, the space shall be discarded if it starts an area. The default is #t.

(display-space? obj) 12.5.4.1

Returns #t if obj is an object of type display-space, and otherwise returns #f.


(element (gi | qualified-gi) construct-expression) 12.4.1
gi := string | symbol
qualified-gi := (( gi+ ))

An element-construction-rule matches any node of class element that matches the gi or qualified-gi. A node matches a gi if its generic identifier is equal to the string or symbol. A node matches a qualified-gi if it matches the last gi in the qualified-gi, and its parent matches the next to last gi, and so on for each gi in the qualified-gi.


(element multi-collating-element string) 8.5.8.2
multi-collating-element := identifier

When two strings are compared, each string is divided up into collating elements. Each collating element is either a single character or a sequence of consecutive characters that is to be treated as a single unit. A multi-collating-element-specification declares that the sequence of characters in the string is to be treated as a collating element. Within the order-specification, this collating element is identified by the multi-collating-element. Identifiers declared as multi-collating-elements shall be distinct from those used as weight-identifiers.

(element-number snl) 10.2.4.2

Returns the number of elements before or equal to snl with the same gi as snl.

(element-number-list list snl) 10.2.4.2

Returns a list of non-negative integers, one for each member of list, which shall be a list of strings, where the i-th integer is the number of elements that:

(element-with-id string snl) 10.2.5

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).

(empty-node-list) 10.2.2

Returns an empty node-list.

(empty-sosofo) 12.4.3

Returns an empty sosofo.

(entity-address string) 12.5.8

The string is divided into one or more space-separated tokens, and an object of type address shall be returned representing the entities whose names are the tokens.

(entity-attribute-string string1 string2 snl) 10.2.4.5

Returns a string representation of the value of the attribute named string2 of the general entity whose name is string1 in the governing document type of the same grove as snl, or #f if there is no such entity or the entity has no such attribute or the attribute is implied.

(entity-generated-system-id string snl) 10.2.4.5

Returns the value of the generated-system-id property of the value of the external-id property of the general entity whose name is string in the governing document type of the same grove as snl, or #f if there is no such entity or the entity has a null value for the external-id property or the external-id has a null value for the generated-system-id property.

(entity-name-normalize string snl) 10.2.4.6

Returns string transformed using the entity namecase substitution string normalization rule of the grove in which snl occurs. This could be defined as follows: (define (entity-name-normalize string snl) (named-node-list-normalize string (node-property 'entities (grove-root snl)) 'entity))

(entity-notation string snl) 10.2.4.5

Returns the value of the notation-name property of the general entity whose name is string in the governing document type of the same grove as snl, or #f if there is no such entity or the entity has a null value for the notation-name property.

(entity-public-id string snl) 10.2.4.5

Returns the value of the public-id property of the value of the external-id property of the general entity whose name is string in the governing document type of the same grove as snl, or #f if there is no such entity or the entity has a null value for the external-id property or the external-id has a null value for the public-id property.

(entity-system-id string snl) 10.2.4.5

Returns the value of the system-id property of the value of the external-id property of the general entity whose name is string in the governing document type of the same grove as snl, or #f if there is no such entity or the entity has a null value for the external-id property or the external-id has a null value for the system-id property.

(entity-text string snl) 10.2.4.5

Returns the value of the text property of the general entity whose name is string in the governing document type of the same grove as snl, or #f if there is no such entity or the entity has a null value for the text property.

(entity-type string snl) 10.2.4.5

Returns the value of the entity-type property of the general entity whose name is string in the governing document type of the same grove as snl, or #f if there is no such entity or the entity has a null value for the entity-type property.

(equal? obj1 obj2) 8.5.2

The equal? procedure defines an equivalence relation on objects. It returns #t if obj1 and obj2 should be regarded as the same object, and otherwise returns #f. For objects that have external representations, two objects shall be the same if their external representations are the same. If each of obj1 and obj2 is of type boolean, symbol, char, pair, quantity, or string, then the equal? procedure shall return #t if and only if:

(error string) 8.5.12

error signals an error. The string argument describes the error. The action a system takes when an error is signaled is system-dependent. In particular, the manner in which the error is reported to the user is system-dependent. It should, however, use string in its report and describe the context in which the error occurred. No value is returned from error.

(even? n) 8.5.7.8 See zero?

(exact->inexact q) 8.5.7.22

Exact->inexact returns an inexact representation of q. The value returned is the inexact quantity that is numerically closest to the argument. If an exact argument has no reasonably close inexact equivalent, then a violation of an implementation restriction may be reported.

(exact? q) 8.5.7.6

These numerical predicates provide tests for the exactness of a quantity. For any quantity, precisely one of these predicates is true.

(exp x) 8.5.7.17

Returns e raised to the power of x. log computes the natural logarithm of x (not the base-ten logarithm). If x is zero or negative, an error shall be signaled.

(expt x1 x2) 8.5.7.21

Returns x1 raised to the power x2. (expt x1 0) is defined to be equal to 1.

(external-procedure string) 8.5.10.4

Returns a procedure object which when called shall execute the external procedure with public identifier string. If the system is unable to find the external procedure, then #f is returned. The arguments passed to the procedure object shall be passed to the external procedure. If the number or type of arguments do not match those expected by the external procedure, then an error may be signaled. The result of the external procedure shall be returned as the result of the call of the procedure object.


(fill-out expression) 12.6.5.1

The expression shall evaluate to a boolean. If it is #t, then each column-set area shall be filled out in the filling-direction to the maximum size allowed by the area in which it is placed.


(filling-direction expression ) 12.6.4.1

The expression shall evaluate to one of the symbols left-to-right, right-to-left, or top-to-bottom specifying the filling-direction of the area container.

(first-area-reference-value symbol #!key default: inherit:) 12.5.1.3

Each of these procedures may be used only in a generate-specification or in the construction of a decoration area. The context in which these procedures are used determines a list of areas, the associated-areas list, on which these procedures operate.

(first-child-gi osnl) 10.2.4.1

Returns the value of the gi property of the first child of osnl of class element or #f if osnl is empty or has no such child.

(first-sibling? snl) 10.2.4.4

Returns #t if snl has no preceding sibling that is an element with the same generic identifier as itself, and otherwise returns #f.

(floor x) 8.5.7.16

These procedures return integers.


(flow ((port-specifier zone-name+))+ ) 12.6.5.1
zone-name := top-float | body-text | bottom-float | footnote

A column-subset-flow-map specifies that areas resulting from flow objects directed in port-specifier shall be labeled with one of the specified zone-names. Multiple zone-names may be specified for a single port-specifier only if the zone-names are top-float and bottom-float.


(flow port-specifier+) 12.6.4.1

A page-region-flow-map specifies that areas resulting from formatting flow objects directed into any of the ports identified by one of the port-specifiers may be assigned to this page-region.

(follow rnl) 11.3.3 See node-list-union

(follow nl) 10.2.3

Returns the mapping over nl of the function on a node that returns the following siblings of the node, if any. This could be defined as follows: (define (follow nl) (node-list-map (lambda (snl) (let loop ((rest (siblings snl))) (cond ((node-list-empty? rest) (empty-node-list)) ((node-list=? (node-list-first rest) snl) (node-list-rest rest)) (else (loop (node-list-rest rest)))))) nl))

(font-property string list #!key size: name: family-name: weight: posture: structure: proportionate-width: writing-mode:) 12.5.7

Returns the value of a property in a font resource. The arguments name:, family-name:, weight:, posture:, structure:, or proportionate-width: select the font in the same manner as the corresponding characteristics, with a prefix of font- added, of a character flow object. The size: argument is a length specifying the size of the font, which shall be supplied if the ISO/IEC 9541-1 data type of the value is REL-RATIONAL. string is a string representing a public identifier specifying the name of the property. list is a list, each of whose members is either:


(footer generated-area-clauses ) 12.6.4.1

A header-specification specifies areas to be generated at the end of a page-region or column.

(footnote-number symbol #!key first-area-of-node: last-area-of-node:) 12.5.1.2

Returns a generated-object whose kernel is the number of footnote areas that are before or the same as the reference area and are descendants of the nearest ancestor of the reference area that is of the type specified by symbol, which is one of page, page-region, or column. For this purpose, a footnote area is an area which is the first in the sequence of areas produced from a flow object whose stream is directed into the footnote zone of a column-set-sequence flow object.


(footnote-separator generated-area-clauses) 12.6.5.1

A footnote-separator-specification specifies areas that shall be generated immediately before the areas in the footnote zone if the footnote zone contains any areas.


(for-all? variable expression expression ) 10.2.2

An expression (for-all? var nl-expr expr)

(format-number n string) 8.5.7.24

Returns a string representation of n. string specifies the format to use as follows:

(format-number-list list obj1 obj2) 8.5.7.24

Returns a string representation of list, where list is a list of integers. obj1 specifies the format to use for each number. It shall be either a single string specifying the format to use for all numbers in the same manner as format-number or a list of strings with the same number of members as list specifying the format to use for each string in the same manner as format-number. obj2 is either a single string or a list of strings specifying the separator to be used between the strings representing each number; it shall contain either a single string or a list of strings with one fewer members than list.

(general-indirect-sosofo procedure generated-object ...) 12.5.1.1

Returns a sosofo containing a single indirect flow object, the content of which is an unlabeled sosofo that is the result of applying the procedure to a list of the kernels of the generated-objects. This requires the general-indirect feature.

(general-name-normalize string snl) 10.2.4.6

Returns string transformed using the general namecase substitution string normalization rule of the grove in which snl occurs. This could be defined as follows: (define (general-name-normalize string snl) (named-node-list-normalize string (node-property 'elements (grove-root snl)) 'element))


(generate expression) 12.6.4.1

The expression shall evaluate to an unlabeled sosofo specifying only displayed flow objects.

(generated-object? obj) 12.5.1

Returns #t if obj is of type generated-object, and otherwise returns #f.

(gi osnl) 10.2.4.1

Returns the value of the gi property of the node contained in osnl or #f if osnl is empty or if osnl has no gi property or a null gi property.

(glyph-id string) 12.5.5

Returns a glyph-id with public identifier string.

(glyph-id? obj) 12.5.5

Returns #t if obj is a glyph-id, and otherwise returns #f.

(glyph-subst glyph-subst-table glyph-id) 12.5.6

Returns the glyph-id that substitutes for glyph-id in the glyph-subst-table.

(glyph-subst-table list) 12.5.6

Returns an object of type glyph-subst-table. list shall contain a list of pairs of glyph-ids. In the resulting glyph-subst-table, the substitution for the first member of each pair is the second member. The substitution for any glyph-id that does not occur as the first member of a pair is itself. If a glyph-id occurs as the first member of more than one pair, then the substitution for that glyph-id is the second member of the first pair that has that glyph-id as its first member.

(glyph-subst-table? obj) 12.5.6

Returns #t if obj is of type glyph-subst-table, and otherwise returns #f.

(grove-before? snl1 snl2) 10.2.3

Returns #t if snl1 is strictly before snl2 in grove order. It is an error if snl1 and snl2 are not in the same grove. This could be defined as follows: (define (grove-before? snl1 snl2) (let ((sorted (node-list-intersection (subgrove (grove-root snl1)) (node-list snl1 snl2)))) (and (= (node-list-length sorted) 2) (node-list=? (node-list-first sorted) snl1))))

(grove-root nl) 10.2.3

This is equivalent to: (define (grove-root nl) (node-list-property 'grove-root nl))

(grove-root-path nl) 10.2.3

Returns the mapping over nl of the function on a node that returns the grove root path of the node, where the grove root path of a node is defined to be an empty node-list if the node is the grove root, and otherwise is the result of appending the grove root path of the origin of the node and the origin of the node. This could be defined as follows: (define (grove-root-path nl) (node-list-map (lambda (snl) (let loop ((cur (origin snl)) (result (empty-node-list))) (if (node-list-empty? cur) result (loop (origin nl) (node-list cur result))))) nl))

(groveloc list nl #!key overrun:) 10.2.1

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.

(have-ancestor? obj snl) 10.2.4.4

obj shall be either a string or a list of strings. If obj is a string, then have-ancestor? returns #t if snl has an ancestor with a generic identifier that matches that string and otherwise returns #f. If obj is a list of strings, then have-ancestor? returns #t if snl has an ancestor with generic identifier equal to the last member of obj, which itself has an ancestor with generic identifier equal to the next to last member of obj, and so on for each member, and otherwise returns #f.


(header generated-area-clauses ) 12.6.4.1

A header-specification specifies areas to be generated at the beginning of a page-region or column.


(height expression) 12.6.4.1

The expression shall evaluate to a length which specifies the height (size in the positive y-direction) of the area container with respect to its parent's coordinate system.

(hierarchical-number list snl) 10.2.4.2

Returns a list of non-negative integers with the same number of members as list. list shall be a list of strings. The last member is the child number of the nearest ancestor of snl whose generic identifier is equal to the last member of list, the next to last member is the child number of the nearest ancestor of that element whose generic identifier is equal to the next to last member, and so on for each member of list.

(hierarchical-number-recursive string snl) 10.2.4.2

Returns a list of non-negative integers. The last member of the list is the child number of the nearest ancestor of the snl element whose generic identifier is equal to string, the next to last member is the child number of the nearest ancestor of that element whose generic identifier is equal to string, and so on for each ancestor of the current element with generic identifier equal to string. Note that the length of this list is the nesting level of string.

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

(hytime-linkend) 12.5.8

Returns an object of type address. The current node shall be an element conforming to the clink architectural form as defined in ISO/IEC 10744. The address identifies the linkend of the current node.It is said that ilink with a single anchor functions as clink. If so, should handle this type of ilink as well.Perhaps this should also handle case where current element has conloc.Note that transformation can be used to make ilinks with multiple anchors into a clink.

(id osnl) 10.2.4.1

Returns the value of the id property of the node contained in osnl or #f if osnl is empty or if osnl has no id property or a null id property.


(id unique-id construct-expression) 12.4.1
unique-id := symbol | string

An id-construction-rule matches any node of class element that has a unique identifier equal to unique-id.

(idref-address string) 12.5.8

The string is divided into one or more space-separated tokens, and an object of type address shall be returned representing the elements whose unique ID is one of the tokens.


(if test consequent alternate) 8.3.1.5
test := expression
consequent := expression
alternate := expression

A conditional is evaluated as follows: first, test is evaluated. If it yields a true value, then consequent is evaluated and its value is returned. Otherwise, alternate is evaluated and its value is returned.

(ifollow nl) 10.2.3

Returns the mapping over nl of the function on a node that returns the immediately following sibling of the node, if any. This could be defined as follows: (define (ifollow nl) (node-list-map (lambda (snl) (let loop ((rest (siblings snl))) (cond ((node-list-empty? rest) (empty-node-list)) ((node-list=? (node-list-first rest) snl) (node-list-first (node-list-rest rest))) (else (loop (node-list-rest rest)))))) nl))

(inexact->exact q) 8.5.7.22 See exact->inexact
(inexact? q) 8.5.7.6 See exact?

(inherited-c) 12.4.6

For any inherited characteristic, c, there is a procedure inherited-c. This procedure shall be used only in the evaluation of an expression specifying a value for a characteristic. The procedure returns the result of evaluating the expression that specifies c for the flow parent of the specification flow object; this expression is evaluated with the value flow object unchanged and with the specification flow object equal to the flow parent of the current specification flow object. If the current specification flow object has no flow parent because it occurs as a characteristic value of some flow object, then that flow object shall be treated as the flow parent for this purpose. If the current specification flow object has no flow parent because it is used in a generate-specification or a decoration-specification, then the page-sequence or column-set-sequence flow object that is using the page-model or column-set-model in which that generate-specification or decoration-specification occurs shall be treated as the flow parent for this purpose. Otherwise, if the current specification flow object has no flow parent then inherited-c returns the result of evaluating the expression specifying the initial value of c; there is no specification flow object during the evaluation of this specification, and it shall be an error if it calls inherited-c for any inherited characteristic c.this desperately needs an example

(inherited-attribute-string string osnl) 10.2.4.3

Returns a string representation of the attribute with name equal to string of osnl or of the nearest ancestor of osnl for which this attribute is present and not implied, or #f if there is no such element or osnl is empty. For the purpose of this procedure, a node is considered an ancestor of itself.

(inherited-element-attribute-string string1 string2 osnl ) 10.2.4.3

Returns a string representation of the attribute with name equal to string2 of the nearest ancestor of osnl whose generic identifier is equal to string1 and for which this attribute is present and not implied, or #f if there is no such element or osnl is empty. For the purpose of this procedure, a node is considered an ancestor of itself.

(inline-space length-spec #!key min: max:) 12.5.4.2

Returns an object of type inline-space. length-spec specifies the nominal size of the space. min: and max: are length-specs specifying the minimum and maximum size of the space. These both default to the nominal size.

(inline-space? obj) 12.5.4.2

Returns #t if obj is an object of type inline-space, and otherwise returns #f.

(integer? obj) 8.5.7.5 See quantity?

(ipreced nl) 10.2.3

Returns the mapping over nl of the function on a node that returns the immediately preceding sibling of the node, if any. This could be defined as follows: (define (ipreced nl) (node-list-map (lambda (snl) (let loop ((prev (empty-node-list)) (rest (siblings snl))) (cond ((node-list-empty? rest) (empty-node-list)) ((node-list=? (node-list-first rest) snl) prev) (else (loop (node-list-first rest) (node-list-rest rest)))))) nl))


(justify-last-limit expression) 12.6.5.1

The expression shall evaluate to a number between 0 and 100. A column shall not be justified if the amount of free space in a column in the last column-set in a column-set-sequence as a percentage of the total size of the column exceeds the number returned by the expression. The default is 0.


(justify-limit expression) 12.6.5.1

The expression shall evaluate to a number between 0 and 100. If the amount of free space in a column as a percentage of the total size of the column exceeds this, then that column shall not be justified. The default is 100.


(justify? expression) 12.6.5.1

The expression shall evaluate to a boolean specifying whether the column-subset is to be justified. If a column subset is to be justified, the free space shall be distributed before and after the areas in the column-subset according to the minimum and maximum allowed space specified in the display spaces. Otherwise, all free space shall be distributed at the end of each column. The default is for the column-subset not to be justified. A column-subset may only be justified if the fill-out-specification specifies that the column-set is to be filled out.

(keyword->string keyword) 8.5.5.2

Returns the name of keyword as a string.

(keyword? obj) 8.5.5.1

Returns #t if obj is a keyword, and otherwise returns #f.


(lambda (formal-argument-list) body) 8.3.1.4

A lambda expression evaluates to a procedure. The environment in effect when the lambda expression was evaluated is remembered as part of the procedure. When the procedure is later called with some actual arguments, the environment in which the lambda expression was evaluated shall be extended by binding the variables in the formal argument list to the corresponding actual argument values, and the body of the lambda expression shall be evaluated in the extended environment. The result of the body shall be returned as the result of the procedure call.

(language? obj) 8.5.8.2

Returns #t if obj is of type language, and otherwise returns #f.

(last-area-reference-value symbol #!key default: inherit:) 12.5.1.3 See first-area-reference-value
(last-preceding-area-reference-value symbol #!key default:) 12.5.1.3 See first-area-reference-value

(last-sibling? snl) 10.2.4.4

Returns #t if snl has no following sibling that is an element with the same generic identifier as itself, and otherwise returns #f.

(length list) 8.5.3.9

Returns the length of list.


(length-decrease-order expression) 12.6.5.1

The expression shall evaluate to one of the following symbols:

  • forward specifying that as columns progress in the forward direction their length shall not increase,

  • backward specifying that as columns progress in the backward direction their length shall not increase,

or #f implying no additional constraint on the relative length of the columns.

(length-deviation expression) 12.6.5.1

The expression shall evaluate to a positive length. When a column-subset is being justified or balanced, then the lengths of the columns may differ by up to this amount. The default is 0pt.


(let variable (binding-spec*) body) 8.3.2.6

Named let has the same syntax and semantics as ordinary let except that variable is bound within body to a procedure whose formal arguments are the bound variables and whose body is body. Thus, the execution of body may be repeated by invoking the procedure named by variable.


(let bindings body) 8.3.2.5
bindings := (binding-spec*)
binding-spec := (variable init)
init := expression

It shall be an error for a variable to appear more than once in any bindings. The inits are evaluated in the current environment, the variables are bound to the results, and the result of evaluating body in the extended environment is returned. Each binding of a variable has body as its region.


(let* bindings body) 8.3.2.5

A let*-expression is similar to a let-expression, but the bindings are performed sequentially from left to right, and the region of a binding indicated by a binding-spec is that part of the let*-expression to the right of the binding-spec. Thus, the second binding is done in an environment in which the first binding is visible, and so on.


(letrec bindings body) 8.3.2.5

Each variable in a binding-spec is bound to the result of evaluating the corresponding init, and the result of evaluating body in the extended environment is returned. The inits are evaluated in the extended environment. Each binding of a variable in a binding-spec has the entire letrec-expression as its region, making it possible to define mutually recursive procedures. It shall be an error if the evaluation of an init references the value of any of the variables. In the most common uses of letrec, all the inits are lambda expressions, and this restriction is satisfied automatically.

(line-number symbol #!key first-area-of-node: last-area-of-node:) 12.5.1.2

Returns a generated-object whose kernel is the number of line areas that are before or the same as the reference area and are descendants of the nearest ancestor of the reference area that is of the type specified by symbol, where symbol is one of page, page-region, column, or paragraph. Line areas from paragraphs for which the numbered-lines?: characteristic was #f shall not be counted.

(list obj ...) 8.5.3.8

Returns a list of its arguments.

(list->string chars) 8.5.9.9 See string->list

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

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.

(list-ref list k) 8.5.3.13

Returns the kth element of list. (This is the same as the car of (list-tail list k).)

(list-tail list k) 8.5.3.12

Returns the sublist of list obtained by omitting the first k elements. List-tail could be defined by (define list-tail (lambda (x k) (if (zero? k) x (list-tail (cdr x) (- k 1)))))

(list? obj) 8.5.3.7

Returns #t if obj is a list, and otherwise returns #f. By definition, all lists have finite length and are terminated by the empty list.

(listloc dimlist string #!key overrun:) 10.2.1 See listloc
(listloc dimlist list #!key overrun:) 10.2.1 See listloc

(listloc dimlist nl #!key overrun:) 10.2.1

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.

(literal string ...) 12.4.3

Returns a sosofo containing one flow object of class character for every char in string, ... in the same order. Each character flow object is constructed as if by evaluating a make-expression with character as the flow-object-class-name and a char: argument specifying the character.

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

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.

(log x) 8.5.7.17 See exp

(make flow-object-class-name keyword-argument-list content-expression*) 12.4.3
content-expression := expression

The result of evaluating a make-expression is a sosofo (the result sosofo) whose first specified member is a flow object of the class named by the flow-object-class-name. This flow object is called the constructed flow object. Each content-expression shall return an object of type sosofo. The sosofos returned by the content-expressions are concatenated to form the content sosofo. No content-expressions shall be specified if the flow-object-class-name is of an atomic flow object class. If the flow-object-class-name is not of an atomic flow object class and the make-expression contains no content-expressions, then a content-expression with the effect of (process-children) shall be used.

(make-grove string nl) 10.2.1

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.

(map proc list1 list2 ...) 8.5.10.3

The lists shall be lists, and proc shall be a procedure taking as many arguments as there are lists. If more than one list is given, then they shall all be the same length. map applies proc element-wise to the elements of the lists and returns a list of the results, in order from left to right.

(map-constructor procedure node-list) 12.4.3

For each node in node-list, procedure is evaluated with that node as a current node. procedure shall be a procedure of no arguments and shall return a sosofo. map-constructor shall return the sosofo that results from concatenating the results of evaluating the procedure. This requires the query feature.Need trim-children query function.

(match-element? pattern snl) 10.2.5

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.

(max q1 q2 ...) 8.5.7.9

These procedures return the maximum or minimum of their arguments. The dimensions of all the arguments shall be identical; the dimension of the result shall be the same as the dimension of the arguments.

(member obj list) 8.5.3.14

Returns the first sublist of list whose car is equal? to obj, where the sublists of list are the non-empty lists returned by (list-tail list k) for k less than the length of list. If obj does not occur in list, then #f (not the empty list) is returned.

(merge-style style ...) 12.4.5

Returns a style object constructed by merging style, .... The expression for a characteristic in the returned style object is the expression for that characteristic in the first of the argument style objects that contains an expression for that characteristic.

(min q1 q2 ...) 8.5.7.9 See max

(mode mode-name construction-rule*) 12.4.1
mode-name := identifier

A construction-rule in a mode-construction-rule-group matches a node only when the current processing mode is mode-name.

(modulo n1 n2) 8.5.7.15 See quotient

(named-node string nnl) 10.1.3

Returns a singleton node-list comprising the node in nnl whose name is string, if there is such a node, and otherwise returns the empty node-list. string is normalized according to the string normalization rule associated with nnl before being compared to the names of the members of nnl.

(named-node-list-names nnl) 10.1.3

Returns a list of the names of the members of nnl in the same order as nnl. The result shall be a list of strings with the same number of members as nnl.

(named-node-list-normalize string nnl symbol) 10.1.3

Returns string normalized according to the normalization rule of the named node list nnl applicable to nodes of class symbol.

(named-node-list? obj) 10.1.3

Returns #t if obj is a named-node-list and otherwise returns #f.

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

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.

(negative? q) 8.5.7.8 See zero?
(next-match style) 12.4.3 See next-match

(next-match) 12.4.3

Returns the sosofo that results from applying the next most specific construction rule that matches the current node. If style is specified, then that style shall become the current overriding style for the evaluation of that construction rule.

(node-list nl1 nl2 ...) 10.1.2

Returns the node-list that results from appending the members of nl1, nl2, .... If there are no arguments, returns the empty node-list.

(node-list->list nl) 10.2.2

Returns a list containing, for each member of nl, a singleton node-list containing just that member. This could be defined as follows: (define (node-list->list nl) (reverse (node-list-reduce nl (lambda (result snl) (cons snl result)) '())))

(node-list-address node-list) 12.5.8

Returns an address object representing the nodes in node-list. This procedure requires the query feature.

(node-list-contains? nl snl) 10.2.2

Returns #t if nl contains a node equal to the member of snl, and otherwise returns #f. This could be defined as follows: (define (node-list-contains? nl snl) (node-list-reduce nl (lambda (result i) (or result (node-list=? snl i))) #f))

(node-list-count nl) 10.2.2

Returns the number of distinct members of nl. This could be defined as follows: (define (node-list-count nl) (node-list-length (node-list-remove-duplicates nl)))

(node-list-difference #!rest args) 10.2.2

Returns a node-list containing the set difference of all the arguments, which shall be node-lists. The set difference is defined to be those members of the first argument that are not members of any of the other arguments. The result shall contain no duplicates. With no arguments, an empty node-list shall be returned. This could be defined as follows: (define (node-list-difference #!rest args) (if (null? args) (empty-node-list) (reduce (cdr args) (lambda (nl1 nl2) (node-list-reduce nl1 (lambda (result snl) (if (node-list-contains? nl2 snl) result (node-list result snl))) (empty-node-list))) (node-list-remove-duplicates (car args)))))

(node-list-empty? nl) 10.1.2

Returns #t if nl is the empty node-list, and otherwise returns #f.

(node-list-error string nl) 10.1.4

This signals an error in a similar way to the error procedure. When an error is signaled with node-list-error, the system should report to the user that the error is associated with the nodes in nl. The manner in which this is done is system-dependent.

(node-list-every? proc nl) 10.2.2

Returns #t if, for every member of nl, proc does not return #f when applied to a singleton node-list containing just that member, and otherwise returns #f. An implementation is allowed to signal an error if, for some member of nl, proc would signal an error when applied to a singleton node-list containing just that member. This could be defined as follows: (define (node-list-every? proc nl) (node-list-reduce nl (lambda (result snl) (if (and result (proc snl)) #t #f)) #t))

(node-list-filter proc nl) 10.2.2

Returns a node-list containing just those members of nl for which proc applied to a singleton node-list containing just that member does not return #f. This could be defined as follows: (define (node-list-filter proc nl) (node-list-reduce nl (lambda (result snl) (if (proc snl) (node-list snl result) result)) (empty-node-list)))

(node-list-first nl) 10.1.2

Returns a node-list containing the first member of nl, if any, and otherwise returns the empty node-list.

(node-list-head nl k) 10.2.2

Returns a node-list comprising the first k members of nl. If nl has k or fewer members, returns nl. This could be defined as follows. (define (node-list-head nl i) (if (zero? i) (empty-node-list) (node-list (node-list-first nl) (node-list-head nl (- i 1)))))

(node-list-intersection rnl ...) 11.3.3 See node-list-union

(node-list-intersection #!rest args) 10.2.2

Returns a node-list containing the intersection of all the arguments, which shall be node-lists. The result shall contain no duplicates. With no arguments, an empty node-list shall be returned. This could be defined as follows: (define (node-list-intersection #!rest args) (if (null? args) (empty-node-list) (reduce (cdr args) (lambda (nl1 nl2) (node-list-reduce nl1 (lambda (result snl) (if (node-list-contains? nl2 snl) (node-list result snl) result)) (empty-node-list))) (node-list-remove-duplicates (car args)))))

(node-list-last nl) 10.2.2

Returns a node-list containing the last member of nl, if nl is not empty, and otherwise returns the empty node-list. This could be defined as follows: (define (node-list-last nl) (node-list-ref nl (- (node-list-length nl) 1)))

(node-list-length nl) 10.2.2

Returns the length of nl. This could be defined as follows: (define (node-list-length nl) (node-list-reduce nl (lambda (result snl) (+ result 1)) 0))

(node-list-map proc nl) 10.2.2

For each member of nl, applies proc to a singleton node-list containing just that member and appends the resulting node-lists. It shall be an error if proc does not return a node-list when applied to any member of nl. This could be defined as follows: (define (node-list-map proc nl) (node-list-reduce nl (lambda (result snl) (node-list (proc snl) result)) (empty-node-list)))

(node-list-no-order nl) 10.1.2

Returns a node-list that has the same members as nl but in an unspecified order.

(node-list-property propname nl) 10.2.3

Returns the mapping over nl of the function on a node that returns the value that the node exhibits for the property propname or an empty node-list if the node does not exhibit a value or exhibits a null value for propname. propname can be specified in any of the ways allowed for the node-property procedure. It shall be an error if any node in nl exhibits a non-null, non-nodal value for propname. This could be defined as follows: (define (node-list-property prop nl) (node-list-map (lambda (snl) (node-property prop snl default: (empty-node-list))) nl))

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

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.

(node-list-reduce nl proc obj) 10.2.2

If nl has no members, returns obj, and otherwise returns the result of applying node-list-reduce to

(node-list-ref nl k) 10.2.2

Returns a node-list containing the kth member of nl (zero-based), if there is such a member, and otherwise returns the empty node-list. This could be defined as follows: (define (node-list-ref nl i) (cond ((< i 0) (empty-node-list)) ((zero? i) (node-list-first nl)) (else (node-list-ref (node-list-rest nl) (- i 1)))))

(node-list-remove-duplicates nl) 10.2.2

Returns a node-list which is the same as nl except that any member of nl which is equal to a preceding member of nl is removed. This could be defined as follows: (define (node-list-remove-duplicates nl) (node-list-reduce nl (lambda (result snl) (if (node-list-contains? result snl) result (node-list result snl))) (empty-node-list)))

(node-list-rest nl) 10.1.2

Returns a node-list containing all members of nl except the first, if nl has at least one member, and otherwise returns the empty node-list.

(node-list-reverse nl) 10.2.2

Returns a node-list containing the members of nl in reverse order. This could be defined as follows: (define (node-list-reverse nl) (node-list-reduce nl (lambda (result snl) (node-list snl result)) (empty-node-list)))

(node-list-some? proc nl) 10.2.2

Returns #t if, for some member of nl, proc does not return #f when applied to a singleton node-list containing just that member, and otherwise returns #f. An implementation is allowed, but not required, to signal an error if, for some member of nl, proc would signal an error when applied to a singleton node-list containing just that member. This could be defined as follows: (define (node-list-some? proc nl) (node-list-reduce nl (lambda (result snl) (if (or result (proc snl)) #t #f)) #f))

(node-list-sublist nl k1 k2) 10.2.2

Returns a node-list containing those members of nl that are preceded in nl by at least k1 members but fewer than k2 members. This is equivalent to selecting those members whose zero-based index in nl is greater than or equal to k1 but less than k2. This could be defined as follows: (define (node-list-sublist nl i j) (node-list-head (node-list-tail nl i) (- j i)))

(node-list-symmetric-difference #!rest args) 10.2.2

Returns a node-list containing the symmetric set difference of all the arguments, which shall be node-lists. The symmetric set difference is defined to be those nodes that occur in exactly one of the arguments. The result shall contain no duplicates. With no arguments, an empty node-list shall be returned. This could be defined as follows: (define (node-list-symmetric-difference #!rest args) (if (null? args) (empty-node-list) (reduce (cdr args) (lambda (nl1 nl2) (node-list-difference (node-list-union nl1 nl2) (node-list-intersection nl1 nl2))) (node-list-remove-duplicates (car args)))))

(node-list-tail nl k) 10.2.2

Returns the node-list comprising all but the first k members of nl. If nl has k or fewer members, returns the empty node-list. This could be defined as follows: (define (node-list-tail nl i) (cond ((< i 0) (empty-node-list)) ((zero? i) nl) (else (node-list-tail (node-list-rest nl) (- i 1)))))

(node-list-union rnl ...) 11.3.3

These procedures behave in the same way as the corresponding operations on node-lists except that the return value is of type result-node-list rather than node-list.

(node-list-union #!rest args) 10.2.2

Returns a node-list containing the union of all the arguments, which shall be node-lists. The result shall contain no duplicates. With no arguments, an empty node-list shall be returned. This could be defined as follows: (define (node-list-union #!rest args) (reduce args (lambda (nl1 nl2) (node-list-reduce nl2 (lambda (result snl) (if (node-list-contains? result snl) result (node-list result snl))) nl1)) (empty-node-list)))

(node-list-union-map proc nl) 10.2.2

For each member of nl, applies proc to a singleton node-list containing just that member and returns the union of the resulting node-lists. It shall be an error if proc does not return a node-list when applied to any member of nl. This could be defined as follows: (define (node-list-union-map proc nl) (node-list-reduce nl (lambda (result snl) (node-list-union (proc snl) result)) (empty-node-list)))

(node-list=? nl1 nl2) 10.1.2

Returns #t if nl1 and nl2 are the same node-list, that is, they contain the same members in the same order, and otherwise returns #f.

(node-list? obj) 10.1.2

Returns #t if obj is a node-list, and otherwise returns #f.

(node-property propname snl #!key default: null: rcs?:) 10.1.6

Returns the value that the node represented by snl exhibits for the property propname. If the node does not exhibit the property propname, then if the default: is supplied, it is returned; otherwise, an error is signaled. If the node exhibits a null value for the property, then if null: is supplied, it is returned; otherwise, if default: is supplied, it is returned; otherwise, an error is signaled.

(not obj) 8.5.1.1

not returns #t if obj is false, and returns #f otherwise.

(notation-generated-system-id string snl) 10.2.4.5

Returns the value of the generated-system-id property of the value of the external-id property of the general notation whose name is string in the governing document type of the same grove as snl, or #f if there is no such notation or the external-id has a null value for the generated-system-id property.

(notation-public-id string snl) 10.2.4.5

Returns the value of the public-id property of the value of the external-id property of the general notation whose name is string in the governing document type of the same grove as snl, or #f if there is no such notation or the external-id has a null value for the public-id property.

(notation-system-id string snl) 10.2.4.5

Returns the value of the system-id property of the value of the external-id property of the general notation whose name is string in the governing document type of the same grove as snl, or #f if there is no such notation or the external-id has a null value for the system-id property.

(null? obj) 8.5.3.6

Returns #t if obj is the empty list, and otherwise returns #f.

(number->string number) 8.5.7.24

Radix shall be an exact integer, either 2, 8, 10, or 16. If omitted, radix defaults to 10. The procedure number->string takes a number and a radix and returns as a string an external representation of the given number in the given radix such that (let ((number number) (radix radix)) (equal? number (string->number (number->string number radix) radix)))

(number->string number radix) 8.5.7.24 See number->string

(number-indirect-sosofo generated-object #!key format: add: multiple:) 12.5.1.1

Returns a sosofo containing a single indirect flow object whose content is the kernel of generated-object, which shall be an integer converted to a string and then to a sosofo. The keyword arguments control the conversion of the integer to a string as follows:

(number? obj) 8.5.7.5 See quantity?
(odd? n) 8.5.7.8 See zero?

(operator operand*) 8.3.1.3
operator := expression
operand := expression

A procedure call is written by simply enclosing in parentheses expressions for the procedure to be called and the arguments to be passed to it. The operator and operand expressions are evaluated, and the resulting procedure is passed the resulting arguments.


(or test*) 8.3.2.4

The test expressions are evaluated from left to right, and the value of the first expression that evaluates to a true value is returned. Any remaining expressions are not evaluated. If all expressions evaluate to false values, the value of the last expression is returned. If there are no expressions then #f is returned.


(order sort-rules collation-entry*) 8.5.8.2
sort-rules := ( level-sort-rules+ )

Each order specification defines a number of different comparison levels. If two strings compare equal at the first level, they are compared at the second level. If they also compare equal at the second level, they are compared at the third level. This process is repeated until there are no more levels or until the strings compare unequal. The number of levels in the order specification is determined by the number of level-sort-rules.

(ordered-may-overlap? nl) 10.2.1

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.

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

(origin nl) 10.2.3

This is equivalent to: (define (origin nl) (node-list-property 'origin nl))

(origin rnl) 11.3.3 See node-list-union

(origin-to-subnode-rel snl) 10.2.3

Returns the value that the member of snl exhibits for the origin-to-subnode-rel-property-name property, or #f if it does not exhibit a value or exhibits a null value. This could be defined as follows: (define (origin-to-subnode-rel snl) (node-property 'origin-to-subnode-rel-property-name snl default: #f))

(page-model? obj) 12.6.4.1

Returns #t if obj is of type page-model, and otherwise returns #f.

(page-number #!key first-area-of-node: last-area-of-node:) 12.5.1.2

Returns a generated-object whose kernel is the number of pages before or the same as the reference area.

(page-number-in-node nd) 12.5.1.2

Returns a generated-object whose kernel is the number of pages that:

(page-number-sosofo) 12.6.3

Returns an indirect-sosofo whose content is a sequence of character flow objects representing the page number of the page on which the first area resulting from the indirect flow object specified by the indirect-sosofo occurs.

(pair? obj) 8.5.3.1

Returns #t if obj is a pair, and otherwise returns #f.

(parent nl) 10.2.3

This is equivalent to: (define (parent nl) (node-list-property 'parent nl))

(parent rnl) 11.3.3 See node-list-union

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

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.

(positive? q) 8.5.7.8 See zero?

(preced nl) 10.2.3

Returns the mapping over nl of the function on a node that returns the preceding siblings of the node, if any. This could be defined as follows: (define (preced nl) (node-list-map (lambda (snl) (let loop ((scanned (empty-node-list)) (rest (siblings snl))) (cond ((node-list-empty? rest) (empty-node-list)) ((node-list=? (node-list-first rest) snl) scanned) (else (loop (node-list scanned (node-list-first rest)) (node-list-rest rest)))))) nl))

(preced rnl) 11.3.3 See node-list-union

(procedure? obj) 8.5.10.1

Returns #t if obj is a procedure, and otherwise returns #f.

(process-children) 12.4.3

Returns the sosofo that results from appending the sosofos that result from processing in order the children of the current node. When the current node is of class sgml-document, the value of the document-element property is treated as being the children of the node.

(process-children-trim) 12.4.3

Returns the sosofo that results from appending the sosofos that result from processing in order the children of the current node after removing any leading and trailing sequence of nodes that have a char property with the input-whitespace property true.

(process-element-with-id string) 12.4.3

Returns the sosofo that results from processing the element in the same grove as the current node whose unique identifier is string, if there is such an element, and otherwise returns an empty sosofo. This procedure requires the cross-reference feature.

(process-first-descendant pattern ...) 12.4.3

Returns the sosofo that results from processing the first descendant in tree order of the current node that matches any of pattern, .... A pattern shall be an object that is allowed as the second argument to the match-element? procedure. It is interpreted as it is by match-element?.

(process-matching-children pattern ...) 12.4.3

Returns the sosofo that results from appending the sosofos that result from processing in order those children of the current node that match any of pattern, .... A pattern shall be an object that is allowed as the second argument to the match-element? procedure. It is interpreted as it is by match-element?.

(process-node-list ndlist) 12.4.3

Returns the sosofo that results from appending the sosofos that result from processing the members of the ndlist in order. This requires the query feature.

(property-lookup propname snl if-present if-not-present) 10.2.3

If snl exhibits a non-null value for the property propname, property-lookup returns the result of applying if-present to that value, and otherwise returns the result of calling if-not-present without arguments. propname can be specified in any of the ways allowed for the node-property procedure. This could be defined as follows: (define (property-lookup name snl if-present if-not-present) (let ((val (node-property name snl default: #f))) (cond (val (if-present val)) ((node-property name snl default: #t) (if-not-present)) (else (if-present val)))))

(q-class symbol) 10.2.5 See q-class

(q-class symbol nl) 10.2.5

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-element pattern) 10.2.5 See q-element

(q-element pattern nl) 10.2.5

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-sdata string nl) 10.2.5

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.

(q-sdata string) 10.2.5 See q-sdata

(quantity->number q) 8.5.7.23

Returns the number of the quantity q.

(quantity? obj) 8.5.7.5

These type predicates may be applied to any kind of argument, including non-quantities. They return #t if the object is of the named type, and otherwise they return #f. In general, if a type predicate is true of a quantity, then all higher type predicates are also true of that quantity. Consequently, if a type predicate is false for a quantity, then all lower type predicates are also false for that quantity.


(query style-query-expression construct-expression priority-expression?) 12.4.1

A query-construction-rule matches any node in the node-list returned by the style-query-expression. query-construction-rules require the query feature.

(quotient n1 n2) 8.5.7.15

These procedures implement number-theoretic (integer) division: For positive integers n1 and n2, if n3 and n4 are integers such that n1 = n2n3 +n4 and 0 <= n4 < n2, then the following is true. (quotient n1 n2) n3 (remainder n1 n2) n4 (modulo n1 n2) n4

(real? obj) 8.5.7.5 See quantity?

(referent nl) 10.2.5

This is equivalent to: (define (referent nl) (node-list-property 'referent nl))

(regexp-and regexp1 regexp2 ... regexpn) 10.3.3

Returns a regexp that matches a node-list with respect to a search list x if, for every i such that 1 <= i <= n, the node-list matches regexpi with respect to x.

(regexp-node proc) 10.3.3

Returns a regexp that matches a node-list with respect to any search list if the node-list contains exactly one node and proc applied to that node-list returns a true value.

(regexp-opt regexp) 10.3.3

Returns a regexp that matches a node-list with respect to a search list x if either the node-list is empty or the node-list matches regexp with respect to x.

(regexp-or regexp1 regexp2 ... regexpn) 10.3.3

Returns a regexp that matches a node-list with respect to a search list x if, for some i such that 1 <= i <= n, the node-list matches regexpi with respect to x.

(regexp-plus regexp) 10.3.3

Returns a regexp that matches a node-list with respect to a search list x if there is some integer n >= 1 such that the node-list can be split into sublists s1, s2,...,sn such that si matches regexp for each i such that 1 <= i <= n and such that si immediately precedes si+1 with respect to x for each i such that 1 <= i <= n-1.

(regexp-range regexp k1 k2) 10.3.3

Returns a regexp that matches a node-list with respect to a search list x if there is some integer n with k1 <= n <= k2 such that the node-list can be split into sublists s1,s2,...,sn such that si matches regexp for each i such that 1 <= i <= n and such that si immediately precedes si+1 with respect to x for each i such that 1 <= i <= n-1. If k1 is zero, then the returned regexp shall match the empty node-list.

(regexp-rep regexp) 10.3.3

Returns a regexp that matches a node-list with respect to a search list x if the node-list is empty or if there is some integer n >= 1 such that the node-list can be split into sublists s1,s2,...,sn such that si matches regexp for each i such that 1 <= i <= n and such that si immediately precedes si+1 with respect to x for each i such that 1 <= i <= n-1.

(regexp-search nl regexp) 10.3.4

Returns a new auxiliary grove built using the regexp property set. The grove contains one group node for each sublist of nl that matches regexp with respect to nl.How ordered? The source property of each group node contain the nodes in the matching sublist.

(regexp-search-disjoint nl regexp) 10.3.4

This is the same as regexp-search except that the sublists are disjoint. When two sublists overlap, if one sublist has a member that occurs in nl before all members of the other sublist, then the first sublist is preferred. If one sublist contains another sublist as a proper sublist, then the containing sublist is preferred.

(regexp-seq regexp1 regexp2 ... regexpn) 10.3.3

Returns a regexp that matches a node-list with respect to a search list x if the node-list can be split into sublists s1, s2,..., sn such that regexpi matches si with respect to the search list x for 1 <= i <= n and such that si immediately precedes si+1 with respect to x for 1 <= i <= n-1.

(regexp? obj) 10.3.2

Returns #t if obj is a regexp, and otherwise returns #f.


(region [[x-origin-specification | y-origin-specification | width-specification | height-specification | decoration-specification* | filling-direction-specification? | header-specification? | footer-specification? | page-region-flow-map?]] ) 12.6.4.1

A page-region-specification specifies an area container with fixed dimensions that is filled to produce a page-region area. Each page-region has a single predominant filling-direction.

(relloc-anc dimlist nl #!key overrun:) 10.2.1

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.

(relloc-des dimlist nl #!key overrun:) 10.2.1 See relloc-anc
(relloc-esib dimlist nl #!key overrun:) 10.2.1 See relloc-anc
(relloc-ysib dimlist nl #!key overrun:) 10.2.1 See relloc-anc
(remainder n1 n2) 8.5.7.15 See quotient

(reverse list) 8.5.3.11

Returns a list consisting of the elements of list in reverse order.


(root construct-expression) 12.4.1

A root-construction-rule matches any node of class sgml-document.

(round x) 8.5.7.16 See floor

(rsiblings nl) 10.2.3

Returns the mapping over nl of the function on a node that returns the reflexive siblings of the node, where the reflexive siblings of a node are defined to be the value of the origin-to-subnode relationship property of the node's origin, if the node has an origin, and otherwise the node itself. This could be defined as follows: (define (rsiblings nl) (node-list-map (lambda (snl) (let ((rel (origin-to-subnode-rel snl))) (if rel (node-property rel (origin snl) default: (empty-node-list)) snl))) nl))

(select-by-attribute-token rnl string1 string2) 11.3.3

Returns a result-node-list containing those nodes in rnl that have an attribute named string1 and that have an attribute with a child of class attribute-value-token with a token property equal to string2 after any applicable string normalization.

(select-by-class rnl sym) 11.3.3 See node-list-union

(select-by-class nl sym) 10.2.3

Returns a node-list comprising members of nl that have node class sym. sym is either the application name (transformed as specified in ) or the RCS name of the class.

(select-by-missing-property rnl sym) 11.3.3 See node-list-union

(select-by-missing-property nl sym) 10.2.3

Returns a node-list comprising members of nl for which the property sym does not exhibit a value.

(select-by-null-property rnl sym) 11.3.3 See node-list-union

(select-by-null-property nl sym) 10.2.3

Returns a node-list comprising members of nl for which the property sym exhibits a null value.

(select-by-property nl sym proc) 10.2.3

Returns a node-list comprising those members of nl that have a non-nodal property named sym that exhibits a non-null value such that proc applied to it returns a true value.

(select-by-property rnl sym proc) 11.3.3 See node-list-union

(select-by-relation rnl i proc) 11.3.3

Returns a result-node-list containing those nodes contained in rnl which are such that proc applied to a result-node-list containing exactly that node returns a result-node-list containing i or more nodes. For example, (lambda (x) (select-by-relation (children x) 1 (lambda (y) (select-elements (descendants y) "para")))) selects those children of a node that have a descendant element with a gi of para.


(select-each variable expression expression) 10.2.2

An expression (select-each var nl-expr expr)

(select-elements nl pattern) 10.2.5

Returns a node-list comprising those members of nl that match pattern as defined by the match-element? procedure.

(select-grove nl obj) 11.3.4

Returns a node-list containing those members of nl whose grove root has a transform-args property that contains a member equal to obj.

(select-tokens nl string) 10.3.1

Returns a node-list containing each member of nl that is a tokenized-string node with a string property equal to string.

(sgml-document-address string1 string2) 12.5.8

string1 shall be the system identifier of an SGML document entity and string2 shall be a unique ID in that SGML document. Returns an address object representing the element in the SGML document that has that unique ID.

(sgml-parse string #!key active: parent:) 10.1.7

Returns a node-list containing a single node that is the root of a grove built by parsing an SGML document or subdocument using the SGML property set. string is the system identifier of the SGML document entity or SGML subdocument entity. active: is a list of strings specifying the names of the active DTD or LPDs. At most one DTD shall be active. If parent: is specified, then the entity to be parsed is an SGML subdocument entity, and the value shall be a singleton node-list in the grove in which the subdocument should be treated as being declared. This uses the default grove plan, which is determined in an application-dependent manner.

(sgml-parse-prolog string) 11.3.5

Returns a node-list containing a single node that is the root of a grove built by parsing the prolog of an SGML document. string is the system identifier of the SGML document entity. This is built using the default grove plan modified to exclude the instabs module.

(side-sync list) 12.4.7

Creates a synchronization set containing the first members of each of the members of list, which shall be a list of two or more sosofos. side-sync returns the sosofo that results from concatenating the members of the list except that the first member of each sosofo is replaced by a copy with added synchronization information. The first areas produced by each member of the synchronization set are constrained to be positioned in the same column-set so that the position of their placement paths is the same in the filling-direction, possibly adjusted for any difference in alignment mode.

(sin x) 8.5.7.18

sin, cos, and tan return the sine, cosine, and tangent of their arguments, respectively. The result shall be a number.

(sort-in-tree-order nl) 10.2.3

Returns the members of nl sorted in tree order. Any duplicates shall be removed. It is an error if the members of nl are not all in the same tree. This could be defined as follows: (define (sort-in-tree-order nl) (node-list-intersection (subtree (tree-root nl)) nl))

(sosofo-append sosofo ...) 12.4.3

Returns the sosofo that results from appending sosofo ....

(sosofo-discard-labeled sosofo symbol) 12.4.3

Returns a sosofo that results from discarding from sosofo any flow object that is labeled with symbol. A new sosofo is constructed; the sosofo is not modified.

(sosofo-label sosofo symbol) 12.4.3

Returns a sosofo that results from labeling with symbol each member of sosofo that is currently unlabeled. A new sosofo is constructed; neither the sosofo nor its members are modified.

(sosofo? obj) 12.4.3

Returns #t if obj is a sosofo, and otherwise returns #f.

(source nl) 10.2.3

This is equivalent to: (define (source nl) (node-list-property 'source nl))

(span nl symbol) 10.2.1

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.

(sqrt q) 8.5.7.20

Returns the square root of q. The dimension of q shall be even. The dimension of the result shall be half the dimension of q. If q is negative, an error is signaled.

(string char ...) 8.5.9.2

Returns a string composed of the arguments.

(string->keyword string) 8.5.5.3

Returns the keyword whose name is string.

(string->list string) 8.5.9.9

string->list returns a list of the characters that make up the given string. list->string returns a string formed from the characters in the list chars. string->list and list->string are inverses so far as equal? is concerned.

(string->number string radix) 8.5.7.25 See string->number

(string->number string) 8.5.7.25

Returns a number of the maximally precise representation expressed by the given string. radix shall be an exact integer, either 2, 8, 10, or 16. If supplied, radix is a default radix that may be overridden by an explicit radix prefix in string (e.g., [Quot]#o177[Quot]). If radix is not supplied, then the default radix is 10. If string is not a syntactically valid notation for a number, then string->number returns #f.

(string->regexp string) 10.3.3

Returns the regexp represented by string. It shall be an error if string is not a valid representation of an extended regular expression as defined in ISO 9945-2. A normal character in string matches a node with a char property whose value is that character.Specify how ranges and named character classes work

(string->symbol string) 8.5.4.3

Returns the symbol whose name is string. This procedure may create symbols with names containing special characters, but it is usually a bad idea to create such symbols because they have no external representation. See symbol->string. What happens if string contains a character not in the system character set?

(string-append string ...) 8.5.9.8

Returns a string formed by the concatenation of the given strings.

(string-ci<=? string1 string2) 8.5.9.6 See string<?
(string-ci<? string1 string2) 8.5.9.6 See string<?
(string-ci=? string1 string2) 8.5.9.5 See string=?
(string-ci>=? string1 string2) 8.5.9.6 See string<?
(string-ci>? string1 string2) 8.5.9.6 See string<?

(string-equiv? string1 string2 k) 8.5.9.! ! 5

Returns #t if the two strings compare the same at the first k comparison levels of the collation specification of the current language, and otherwise returns #f. k shall be strictly positive.

(string-length string) 8.5.9.3

Returns the number of characters in the given string.

(string-ref string k) 8.5.9.4

k shall be a valid index of string. string-ref returns character k of string using zero-origin indexing.

(string<=? string1 string2) 8.5.9.6 See string<?

(string<? string1 string2) 8.5.9.6

These procedures are the lexicographic extensions to strings of the corresponding orderings on characters. For example, string<? is the lexicographic ordering on strings induced by the ordering char<? on characters. If two strings differ in length but are the same up to the length of the shorter string, the shorter string is considered to be lexicographically less than the longer string. These procedures use the current language.

(string=? string1 string2) 8.5.9.5

Return #t if the two strings are the same length and contain the same characters in the same positions, and otherwise return #f. string-ci=? treats upper- and lower-case letters as though they were the same character, but string=? treats upper- and lower-case letters as distinct characters. string-ci=? uses the current language.

(string>=? string1 string2) 8.5.9.6 See string<?
(string>? <string1 string2) 8.5.9.6 See string<?

(string? obj) 8.5.9.1

Returns #t if obj is a string, and otherwise returns #f.


(style keyword-argument-list) 12.4.5

Evaluates to an object of type style. The following keywords are allowed in the keyword-argument-list:

  • A keyword that is the name of an inherited characteristic and specifies the value of that characteristic for the style (unless overridden) as described in .

  • A keyword force!c: where c is the name of an inherited characteristic that specifies the value of that characteristic for the style and prevents overriding of that value as described in .

  • use: specifying another style whose characteristics are to be added to this style as described in .

(style? obj) 12.4.5

Returns #t if obj is of type style, and otherwise returns #f.

(subgrove nl) 10.2.3

Returns the mapping over nl of the function on a node that returns the subgrove of a node, where the subgrove of a node is defined to be the node-list comprising the node followed by the subgroves of members of the values of each of the node's subnode properties. This could be defined as follows: (define (subgrove nl) (node-list-map (lambda (snl) (node-list snl (subgrove (apply node-list (map (lambda (name) (node-property name snl)) (node-property 'subnode-property-names snl)))))) nl))

(subgrove-spec #!key node: subgrove: class: add: null: remove: children: sub: label: sort-children:) 11.3.1

Returns an object of type subgrove-spec.

(substring string start end) 8.5.9.7

Returns a string formed from the characters of string beginning with index start (inclusive) and ending with index end (exclusive).

(subtree nl) 10.2.3

Returns the mapping over nl of the function on a node that returns the subtree of a node, where the subtree of a node is defined to be the node-list comprising the node followed by the subtrees of its children. This could be defined as follows: (define (subtree nl) (node-list-map (lambda (snl) (node-list snl (subtree (children snl)))) nl))


(symbol weight-identifier) 8.5.8.2
weight-identifier := identifier

A collating-symbol-specification declares that weight-identifier is a symbolic identifier for a weight, which may be used within the order-specification.

(symbol->string symbol) 8.5.4.2

Returns the name of symbol as a string.

(symbol? obj) 8.5.4.1

Returns #t if obj is a symbol, and otherwise returns #f.

(sync sosofo1 sosofo2 #!key type: min: max:) 12.4.7

Creates a synchronization set whose members are the first member of sosofo1 and the first member of sosofo2. sync returns a sosofo comprising:

Avoid use of copy here. Sosofos don't contain flow objects but specify them.

(table-unit k) 12.6.27.3

Returns a length-spec that specifies k units of proportional measure. This may be used in the value of the width: characteristic. The value of a unit of proportional measure for a particular table is chosen so that the total width of the columns is equal to the specified width of the table.

(tan x) 8.5.7.18 See sin

(template-or-splice_D*) | (template-or-splice_D+ . template_D) | 'template_D | quasiquotation_D+1 8.3.2.7
unquotation_D := ,template_D-1 | (unquote template_D-1)
template-or-splice_D := template_D | splicing-unquotation_D
splicing-unquotation_D := ,@template_D-1 | (unquote-splicing template_D-1)

In quasiquotations, a list-template_D may sometimes be confused with either an unquotation_D or a splicing-unquotation_D. The interpretation as an unquotation or splicing-unquotation_D takes precedence.


(test expression) | (test) | (test => recipient) 8.3.2.1
recipient := expression

A cond-expression is evaluated by evaluating the test expressions of each successive cond-clause in order until one of them evaluates to a true value. When a test evaluates to a true value, then the result of evaluating the expression in the cond-clause is returned as the result of the entire cond expression. If the selected cond-clause contains only the test and no expression, then the value of the test is returned as the result. If the cond-clause contains a recipient, then recipient is evaluated. Its value shall be a procedure of one argument; this procedure is then invoked on the value of the test. If all tests evaluate to false values, and there is no else clause, then an error is signaled; if there is an else clause, then the result of evaluating its expression is returned.


(there-exists? variable expression expression) 10.2.2

An expression (there-exists? var nl-expr expr)


(tie column-subset-specification column-subset-specification+ ) 12.6.5.1

A tied-column-subset-specification specifies two or more column-subsets that are tied together. See Figure .

(time) 8.5.11

time returns the number of seconds since 1970-01-01 00:00:00 GMT as an integer.

(time->string k boolean) 8.5.11 See time
(time->string k) 8.5.11 See time
(time<=? string1 string2) 8.5.11 See time<?

(time<? string1 string2) 8.5.11

These procedures impose a total ordering on the set of strings that represent dates and times in ISO 8601 format. It shall be an error if any argument does not represent a date or time in ISO 8601 format.

(time>=? string1 string2) 8.5.11 See time<?
(time>? string1 string2) 8.5.11 See time<?

(tolower case-conversion-list) 8.5.8.2
case-conversion-list := ((character character))*

In the case-conversion-list, the upper-case or lower-case equivalent of the first character in each pair is the second character in that pair according as the case-conversion-list occurs in a toupper-specification or a tolower-specification.


(top-float-space-below expression) 12.6.5.1

The expression shall evaluate to an object of type display-space specifying the size of a space to be added. For each column in the column-set that is spanned by an area in the top-float zone, a space of the specified size shall be added immediately after all the areas that span the column and that are in the top-float zone.

(total-node-page-numbers nd) 12.5.1.2

Returns a generated-object whose kernel is the total number of pages that contain an area from the primary flow object associated with nd.


(toupper case-conversion-list) 8.5.8.2
tolower-specification := (tolower case-conversion-list)
case-conversion-list := ((character character))*

In the case-conversion-list, the upper-case or lower-case equivalent of the first character in each pair is the second character in that pair according as the case-conversion-list occurs in a toupper-specification or a tolower-specification.

(transform-grove snl obj ...) 11.3.4

snl shall be the root of a grove. transform-grove creates a new grove from snl by adding a transform-args property to the grove root whose value is a list containing obj, ..., and returns an object of type transform-grove-spec specifying the transformation of that new grove.

(transform-grove-spec? obj) 11.3.4

Returns #t if obj is of type transform-grove-spec, and otherwise returns #f.

(transliteration-map? obj) 11.4.2

Returns #t if obj is of type transliteration-map, and otherwise returns #f.

(tree-before nl) 10.2.3

Returns the mapping over nl of the function on a node that returns those nodes in the same tree as the node that are before the node. This could be defined as follows: (define (tree-before nl) (node-list-map (lambda (snl) (node-list-filter (lambda (x) (tree-before? x snl)) (subtree (tree-root snl)))) nl))

(tree-before? snl1 snl2) 10.2.3

Returns #t if snl1 is strictly before snl2 in tree order. It is an error if snl1 and snl2 are not in the same tree. This could be defined as follows: (define (tree-before? snl1 snl2) (let ((sorted (sort-in-tree-order (node-list snl1 snl2)))) (and (= (node-list-length sorted) 2) (node-list=? (node-list-first sorted) snl1))))

(tree-root nl) 10.2.3

This is equivalent to: (define (tree-root nl) (node-list-property 'tree-root nl))

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

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.

(truncate x) 8.5.7.16 See floor

(union-for-each variable expression expression) 10.2.2

An expression (union-for-each var nl-expr expr)

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

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.


(variable init) 8.3.2.5
init := expression

It shall be an error for a variable to appear more than once in any bindings. The inits are evaluated in the current environment, the variables are bound to the results, and the result of evaluating body in the extended environment is returned. Each binding of a variable has body as its region.


(width expression) 12.6.4.1

The expression shall evaluate to a length which specifies the width (size in the positive x direction) of the area container with respect to its parent's coordinate system.

(with-language language proc) 8.5.8.2

The with-language procedure calls proc, which shall be a procedure of no arguments, with language as the current language.


(with-mode mode-specification expression) 12.4.3
mode-specification := mode-name | #f

A with-mode-expression evaluates expression with the processing mode specified by mode-specification. A mode-specification of #f indicates the initial unnamed processing mode. The mode-name in mode-specification shall have been specified in a mode-construction-rule-group.

(word-parse nl) 10.3.1 See word-parse

(word-parse nl string) 10.3.1

This builds a new grove by performing an auxiliary parse using the Data Tokenizer Property Set. string, if specified, is the ISO 639 language code of the language which should be assumed for the purposes of determining what constitutes a word. The algorithm to be used is not specified in this International Standard. <propset psn=datatok fullnm="Data Tokenizer Property Set"> <classdef rcsnm=tokroot appnm="tokenized root" conprop=strings> <propdef rcsnm=strings datatype=nodelist ac=tokenstr> <classdef rcsnm=tokenstr appnm="tokenized string" conprop=string> <propdef rcsnm=string datatype=string>


(x-origin expression) 12.6.4.1

The expression shall evaluate to a length which specifies the x component of the origin of the area container with respect to its parent's coordinate system.


(y-origin expression) 12.6.4.1

The expression shall evaluate to a length which specifies the y component of the origin of the area container with respect to its parent's coordinate system.

(zero? q) 8.5.7.8

These predicates test a quantity for a particular property, returning #t or #f. See note above.