Annex B
(informative)
Types and Symbols
This annex clarifies the existing data types of specification for DSSSL.
B.1 Expression Language
DSSSL expressions have the following data types:
- boolean: logic-type
This type specifies true or false. The value is either #t or #f. This type is used in conditional expressions. #f means false, #t means true, other objects except #t and #f mean true. (See 8.2.2 True and False, and 8.5.1 Booleans.)
- e.g.,
((if eqaul wordflag #t) x y) - e.g.,
- symbol: symbol-type
The symbol identifies strings for optional semantics. The value is used for specification of DSSSL scripts as parameters. In an expression, the symbol requires a single quotation (') before the string of symbol. (See 8.5.4 Symbols.)
- e.g.,
(font-weight: 'bold) - e.g.,
- keyword: keyword-type
The keyword specifies names of keyword strings. This type is used for specificaton of a DSSSL script as constant and invariable parameters. In an expression, the keyword requires a single colon (:) after the strings of keywords and some keyword arguments. (See 8.5.5 Keywords.)
- e.g.,
(font-weight: 'bold) - e.g.,
- char: character-type
The char specifies characters and names of characters. In an expression, the char requires a single sharp (#) and backslash (\) before the character or the name of character. (See 8.5.8 Characters.)
- e.g.,
- #\A: character 'A'
- #\space: spacing 'empty character'
- #\(: open circle paretheses '('
- e.g.,
- pair: pair-type
The pair is constructed with two arguments. A list is constructed with head part and other part of a pair; the head part is called car, other part is called cdr.
A pair is converted from a list. When a list is converted from a pair, DSSSL processor should generate an empty list as a tail of the list. The empty list is known as ().
- e.g.,
(glyph-subset-table (list (cons glyph1 glyph2))) DSSSL expressions have the following numerical types:
- e.g.,
- quantity: qauntity-type
- number: number-type
- real: real-number-type
- integer: integer-number-type
A quantity-type is represented as the product of a number and the base unit raised to the power of an integer-type. A number-type is the quantity-type without dimension. A real-number-type is a subtype of the number-type. An integer-type is a subtype of the real-number-type and integer-number-type. The quantity-type has both concepts of exactness and inexactness. An inexactness of the quantity-type is used for a large size of numerical object to be printed or displayed.
- e.g.,
(even? tapesize) - e.g.,
- string: string-type
A string-type is similar to a string-type of other programming languages. The string-type is enclosed with double quotation (").
- e.g.,
(string=? headstr "Contents") - e.g.,
- procedure: procedure-type
A procedure-type is a name of procedure treated as an object in DSSSL.
- e.g.,
(apply (format-number stringsizes)) - e.g.,
- language: laguage-type
- e.g.,
(with-language french (spellcheck-french)) - e.g.,
B.2 SDQL
- node-list: node-list-type
A node-list is the most basic type of SDQL to specify node lists of a grove. A single node should be specified by node-list with a single node list. In DSSSL transformations, this data type with flag specifies and discriminates the result node-list. (See 10 Standard Document Query Language and 10.1.2 Node Lists.)
- e.g.,
(node-list-first firstpage) - e.g.,
- named-node-list: node-list-with-name-type
A named-node-list specifies node lists with name in a grove tree. (See 10 Standard Document Query Language and 10.1.3 Named Node Lists.)
- e.g.,
(named-node column1 page-top) - e.g.,
B.3 Transformation Language
- subgrove-spec: sub-grove-specification-type
A subgrove-spec specifies a sub-grove. All the sub-grove can be specified by specifying the root of the sub-grove.
- e.g.,
(subgrove-spec node | subgrove | class | add | null | remove | children | sublabel sort-children) - e.g.,
- create-spec: create-specification-type
- e.g.,
- (create-root obj sg)
- (create-sub snl sg property label unique)
- (create-proc snl sg label result-path optional unique)
- (create-follow snl sg label result-path optional unique)
- e.g.,
- result-node-list: result-node-list-type
- e.g.,
(select-by-relation rnl i proc) - e.g.,
- transform-grove-spec : transform-grove-specification-type
Transform-grove-spec specifies information of a grove tranformation.
- e.g.,
(transform-grove snl obj ...) (select-grove nl obj) - e.g.,
- transliteration-map : transliteration-map-type
- e.g.,
(define-transliteration-map variable transliteration-entry) - e.g.,
B.4 Style Language
- sosofo: sosofo-type
A flow object class of DSSSL generates a specification of sequence of flow object(sosofo) as the result of execution.
- e.g.,
(element p (make paragraph)) - e.g.,
- style : style type
- e.g.,
(make paragraph style: emphasizing-style) - e.g.,
- generated-object : genarated object type
- e.g.,
(asis-indirect-sosofo (column-number)) - e.g.,
- length : length type
- e.g.,
page-height: 15in - e.g.,
- decoration-area : decoration area type
- e.g.,
(make external-graphic entity-system-id: "sample.gif"
(decoration-area "graphics sample"
placement-point-x: 50
placement-point-y: 250))
- e.g.,
- display-space : display space type
- e.g.,
space-before: (display-space 15pt max: 45pt priority: 1) - e.g.,
- inline-space : inline space type
- e.g.,
escapement-space-before: (inline-space 15pt max:45pt) - e.g.,
- glyph-id : glyph identifier type
- e.g.,
(glyph-subst gst-eng glyph-aacute) - e.g.,
- glyph-subst-table : glyph substitution table type
- e.g.,
(make character glyph-id: eacute glyph-subst-table: gst-eng) - e.g.,
- address : address type
- e.g.,
(make link destination: chapter-2) - e.g.,
- color-space : color space type
- (color-space string arg ...)
- e.g.,
(color-space "ISO/IEC 10179:1996//Color-Space Family::Device RGB") - color : color type
- (color color-space arg ...)
- e.g.,
(define *rgb-color-space*
(color-space
"ISO/IEC 10179:1996//Color-Space Family::Device RGB"))
(define *midnight-blue* (color *rgb-color-space* 0.0 0.0 0.5))
...
(make paragraph color: *midnight-blue*)- page-model : page-model type
- (define-page-model page-model-name [[region+ | width | height | filling | decoration]])
- e.g.,
(region [[x | y | width | height | decoration* | filling | header | footer | flow-map?]]) - column-set-model : column-set-model type
- (define-column-set-model variable [[column-subset* | fill-out? | tied-column-subset* | filling-direction? | width? | height? | decoration*]]) (column-subset [[column+ | flow-map | top-float-space-below? | bottom-float-space-above? | balance? |justify? | justify-limit? | justify-last-limit? | length-deviation? | length-decrease-order? | align-lines?]]) (column [[width? | height? | x-origin? | y-origin? | footnote-separator? | header? | footer?]])
- (color-space string arg ...)