DSSSL Syntax Summary

Copyright © 1996 Harvey Bingham

Reference

ISO/IEC 10179:1996
Information technology -- Text and office systems --
Document Style Semantics and Specification Language
(DSSSL), April 1, © ISO/IEC 1996

The printed DSSSL standard is available from your national standards body. Information about electronic sources for DSSSL information is available at
http://www.ornl.gov/sgml/wg8/wg8home.htm.
An HTML version of the final committee draft may still be available at
http://occam.sjf.novell.com:8080/dsssl/DSSSL96/1.toc
A few typograpic repairs to the printer's proofs have occurred since then.

Clauses, Productions, and Syntactic Details

The DSSSL standard is organized into clauses. The syntactic productions therein are the focus of this document. The long production names suggest their meaning. See the DSSSL standard for the actual semantics.

Clauses from the DSSSL Standard

The Table of Contents shows all the clauses of DSSSL. Those clauses containing productions indicate the production range contained, and are linked from there, The clauses containing syntactic productions are repeated herein. These captions provide insight to the production grouping.

Notation for Syntactic Productions

The syntactic productions are presented as:

[production number(s)] syntactic-variable-name =
definition
Reference {clause-number} Used in: list of syntactic-variable-name[production number(s) where used]

Each production number is in the range 1...220. Production numbers appear in brackets, such as [1]. Hyperlinks appear on the references to these, linking to the original productions where they are defined.

A definition may include one or more of:
syntactic-variable[production number(s) where defined]
grouping indicator (...)
Note s, x, y below are either a syntactic-variable or group, or mixture thereof
occurrence indicator suffix to s: s? (0 or 1 s), s* (0 or more s), s+ (1 or more s), or by default (1 s)
alternatives of the form (x | y); choose x OR y
character entity such as &
syntactic constant such as "collate" or "("
syntactic terminal constant such as space
syntactic terminal variable such as separator-character

Some syntactic-variable-names are defined in two productions, in two different clauses of DSSSL:

full DSSSL
core DSSSL--production numbers beween [120] and [145].

Of those repeated productions, some core DSSSL definitions are the same as full DSSSL definitions, others differ, usually as subsets. These are distinguished by showing both production numbers in brackets with different separators, reordered to show the appropriate one first, depending on clause:

full DSSSL, core DSSSL
[16=120] or [120=16] identical definitions
[17#121] or [121#17] different definitions

The Reference {clause-number} helps locate the semantics in the standard associated with the production. The "Used in:" list that follows names the productions in whose definitions the current production is used, and provides hyperlinks to those definitions.

The first production number provides a target, and those other than the first provide hyperlinks to the indicated target production for direct browser viewing.

See the Subsidiary Files for additional information about the productions and the various kinds of tokens contained therein.

Clauses and Productions

1 Scope

2 Conformance

3 Normative references

4 Definitions

5 Notation and Conventions

6 DSSSL Overview

7 DSSSL Specifications

7.3 Lexical Conventions
7.3.2 Identifiers

[1] identifier =
initial[2] (subsequent[6]* final[8])? | peculiar-identifier[9]
Reference {7.3.2} Used in: token[10] variable[19=123] symbol[74] keyword[75] character-property-declaration[96] multi-collating-element[103] weight-identifier[105] mode-name[163] flow-object-class-name[177] application-flow-object-class-declaration[178] application-characteristic-declaration[182] application-char-characteristic+property-declaration[183] initial-value-declaration[184] reference-value-type-declaration[185] port-specifier[192]
[2] initial =
letter[3] | special-initial[4] | added-name-character
Reference {7.3.2} Used in: identifier[1] subsequent[6]
[3] letter =
"a" | "b" | "c" | … | "z" | "A" | "B" | "C" | … | "Z"
Reference {7.3.2} Used in: initial[2] final[8] unit-name[87] character-name[95]
[4] special-initial =
special[5] | ":"
Reference {7.3.2} Used in: initial[2]
[5] special =
"!" | "$" | "%" | "&" | "*" | "/" | "<" | "=" | ">" | "?" | "~" | "_" | "^"
Reference {7.3.2} Used in: special-initial[4] final[8]
[6] subsequent =
initial[2] | digit[93] | special-subsequent[7]
Reference {7.3.2} Used in: identifier[1]
[7] special-subsequent =
"." | "+" | "-"
Reference {7.3.2} Used in: subsequent[6] final[8]
[8] final =
letter[3] | special[5] | added-name-character | digit[93] | special-subsequent[7]
Reference {7.3.2} Used in: identifier[1]
[9] peculiar-identifier =
"+" | "-" | "…"
Reference {7.3.2} Used in: identifier[1]

7.3.3 Tokens, Whitespace, and Comments

[10] token =
identifier[1] | keyword[75] | boolean[70] | number[78] | character[94] | string[118] | named-constant[76] | glyph-identifier[186] | "(" | ")" | "'" | "." | "`" | "," | ",@"
Reference {7.3.3} Used in: no other productions
[11] delimiter =
whitespace[12] | "(" | ")" | """ | ";"
Reference {7.3.3} Used in: no other productions
[12] whitespace =
space | record-start | record-end | tab | form-feed | separator-character
Reference {7.3.3} Used in: delimiter[11] atmosphere[14]
[13] comment =
";" any-character-except-record-end*
Reference {7.3.3} Used in: atmosphere[14]
[14] atmosphere =
whitespace[12] | comment[13]
Reference {7.3.3} Used in: intertoken-space[15]
[15] intertoken-space =
atmosphere[14]*
Reference {7.3.3} Used in: no other productions

8 Expression Language

8.3 Expressions

[16=120] expression =
primitive-expression[17#121] | derived-expression[41#137]
Reference {8.3} Used in: operator[28=131] operand[29=132] initializer[36] test[38=134] consequent[39=135] alternate[40=136] cond-expression[42=138] cond-clause[43#139] recipient[44] case-expression[45=140] key[46=141] case-clause[47=142] init[54] template_0[59] variable-definition[67] body[69] unit-declaration[77] character-property-declaration[96] keyword-argument-list[98] default-language-declaration[99] definition[66#145] there-exists?-expression[147] for-all?-expression[148] select-each-expression[149] union-for-each-expression[150] query-expression[153] transform-expression[154] priority-expression[155=167] style-query-expression[165] construct-expression[166] content-expression[176] with-mode-expression[179] application-characteristic-declaration[182] application-char-characteristic+property-declaration[183] initial-value-declaration[184] generate-specification[196] x-origin-specification[197] y-origin-specification[198] width-specification[199] height-specification[200] decoration-specification[201] filling-direction-specification[202] contents-alignment-specification[203] fill-out-specification[205] top-float-space-below-specification[209] bottom-float-space-above-specification[210] balance-specification[211] justify-specification[212] justify-limit-specification[213] justify-last-limit-specification[214] length-deviation-specification[215] length-decrease-order-specification[216] align-lines-specification[217]

8.3.1 Primitive Expression Types

[17#121] primitive-expression =
variable-reference[18=122] | literal[22=124] | procedure-call[27=130] | lambda-expression[30] | conditional[37=133]
Reference {8.3.1} Used in: expression[16=120]

8.3.1.1 Variable Reference

[18=122] variable-reference =
variable[19=123]
Reference {8.3.1.1} Used in: primitive-expression[17#121]
[19=123] variable =
identifier[1]
Reference {8.3.1.1} Used in: variable-reference[18=122] required-formal-argument[32] optional-formal-argument[33] rest-formal-argument[34] keyword-formal-argument[35] binding-spec[53] named-let[57] variable-definition[67] procedure-definition[68] language-definition[100] definition[66#145] there-exists?-expression[147] for-all?-expression[148] select-each-expression[149] union-for-each-expression[150] transliteration-map-definition[156] page-model-name[189] column-set-model-definition[204]
[20] syntactic-keyword =
expression-keyword[21] | "else" | "=>" | "define"
Reference {8.3.1.1} Used in: no other productions
[21] expression-keyword =
"quote" | "lambda" | "if" | "cond" | "and" | "or" | "case" | "let" | "let*" | "letrec" | "quasiquote" | "unquote" | "unquote-splicing"
Reference {8.3.1.1} Used in: syntactic-keyword[20]

8.3.1.2 Literals

[22=124] literal =
quotation[23=125] | self-evaluating[26#129]
Reference {8.3.1.2} Used in: primitive-expression[17#121]
[23=125] quotation =
"'" datum[24=126] | "(" "quote" datum[24=126] ")"
Reference {8.3.1.2} Used in: literal[22=124]
[24=126] datum =
simple-datum[25#127] | list[71#128]
Reference {8.3.1.2} Used in: quotation[23=125] case-clause[47=142] abbreviation[72]
[25#127] simple-datum =
boolean[70] | number[78] | character[94] | string[118] | symbol[74] | keyword[75] | named-constant[76] | glyph-identifier[186]
Reference {8.3.1.2} Used in: datum[24=126] template_D[61]
[26#129] self-evaluating =
boolean[70] | number[78] | character[94] | string[118] | keyword[75] | named-constant[76] | glyph-identifier[186]
Reference {8.3.1.2} Used in: literal[22=124]

8.3.1.3 Procedure Call

[27=130] procedure-call =
"(" operator[28=131] operand[29=132]* ")"
Reference {8.3.1.3} Used in: primitive-expression[17#121]
[28=131] operator =
expression[16=120]
Reference {8.3.1.3} Used in: procedure-call[27=130]
[29=132] operand =
expression[16=120]
Reference {8.3.1.3} Used in: procedure-call[27=130]

8.3.1.4 Lambda Expression

[30] lambda-expression =
"(" "lambda" "(" formal-argument-list[31] ")" body[69] ")"
Reference {8.3.1.4} Used in: primitive-expression[17#121]
[31] formal-argument-list =
required-formal-argument[32]* ("#!optional" optional-formal-argument[33]*)? ("#!rest" rest-formal-argument[34])? ("#!key" keyword-formal-argument[35]*)?
Reference {8.3.1.4} Used in: lambda-expression[30] procedure-definition[68]
[32] required-formal-argument =
variable[19=123]
Reference {8.3.1.4} Used in: formal-argument-list[31]
[33] optional-formal-argument =
variable[19=123] | ("(" variable[19=123] initializer[36] ")")
Reference {8.3.1.4} Used in: formal-argument-list[31]
[34] rest-formal-argument =
variable[19=123]
Reference {8.3.1.4} Used in: formal-argument-list[31]
[35] keyword-formal-argument =
variable[19=123] | ("(" variable[19=123] initializer[36] ")")
Reference {8.3.1.4} Used in: formal-argument-list[31]
[36] initializer =
expression[16=120]
Reference {8.3.1.4} Used in: optional-formal-argument[33] keyword-formal-argument[35]

8.3.1.5 Conditional Expression

[37=133] conditional =
"(" "if" test[38=134] consequent[39=135] alternate[40=136] ")"
Reference {8.3.1.5} Used in: primitive-expression[17#121]
[38=134] test =
expression[16=120]
Reference {8.3.1.5} Used in: conditional[37=133] cond-clause[43#139] and-expression[48=143] or-expression[49=144]
[39=135] consequent =
expression[16=120]
Reference {8.3.1.5} Used in: conditional[37=133]
[40=136] alternate =
expression[16=120]
Reference {8.3.1.5} Used in: conditional[37=133]

8.3.2 Derived Expression Types

[41#137] derived-expression =
cond-expression[42=138] | case-expression[45=140] | and-expression[48=143] | or-expression[49=144] | binding-expression[50] | named-let[57] | quasiquotation[58]
Reference {8.3.2} Used in: expression[16=120]

8.3.2.1 Cond-expression

[42=138] cond-expression =
"(" "cond" cond-clause[43#139]+ ")" | "(" "cond" cond-clause[43#139]* "(" "else" expression[16=120] ")" ")"
Reference {8.3.2.1} Used in: derived-expression[41#137]
[43#139] cond-clause =
"(" test[38=134] expression[16=120] ")" | "(" test[38=134] ")" | "(" test[38=134] "=>" recipient[44] ")"
Reference {8.3.2.1} Used in: cond-expression[42=138]
[44] recipient =
expression[16=120]
Reference {8.3.2.1} Used in: cond-clause[43#139]

8.3.2.2 Case-expression

[45=140] case-expression =
"(" "case" key[46=141] case-clause[47=142]+ ")" | "(" "case" key[46=141] case-clause[47=142]* "(" "else" expression[16=120] ")" ")"
Reference {8.3.2.2} Used in: derived-expression[41#137]
[46=141] key =
expression[16=120]
Reference {8.3.2.2} Used in: case-expression[45=140]
[47=142] case-clause =
"(" "(" datum[24=126]* ")" expression[16=120] ")"
Reference {8.3.2.2} Used in: case-expression[45=140]

8.3.2.3 And-expression

[48=143] and-expression =
"(" "and" test[38=134]* ")"
Reference {8.3.2.3} Used in: derived-expression[41#137]

8.3.2.4 Or-expression

[49=144] or-expression =
"(" "or" test[38=134]* ")"
Reference {8.3.2.4} Used in: derived-expression[41#137]

8.3.2.5 Binding expressions

[50] binding-expression =
let-expression[51] | let*-expression[55] | letrec-expression[56]
Reference {8.3.2.5} Used in: derived-expression[41#137]
[51] let-expression =
"(" "let" bindings[52] body[69] ")"
Reference {8.3.2.5} Used in: binding-expression[50]
[52] bindings =
"(" binding-spec[53]* ")"
Reference {8.3.2.5} Used in: let-expression[51] let*-expression[55] letrec-expression[56]
[53] binding-spec =
"(" variable[19=123] init[54] ")"
Reference {8.3.2.5} Used in: bindings[52] named-let[57]
[54] init =
expression[16=120]
Reference {8.3.2.5} Used in: binding-spec[53]
[55] let*-expression =
"(" "let*" bindings[52] body[69] ")"
Reference {8.3.2.5} Used in: binding-expression[50]
[56] letrec-expression =
"(" "letrec" bindings[52] body[69] ")"
Reference {8.3.2.5} Used in: binding-expression[50]

8.3.2.6 Named-let

[57] named-let =
"(" "let" variable[19=123] "(" binding-spec[53]* ")" body[69] ")"
Reference {8.3.2.6} Used in: derived-expression[41#137]

8.3.2.7 Quasiquotation

[58] quasiquotation =
quasiquotation_1[60]
Reference {8.3.2.7} Used in: derived-expression[41#137]
[59] template_0 =
expression[16=120]
Reference {8.3.2.7} Used in: quasiquotation_D[60] list-template_D[62] unquotation_D[63] template-or-splice_D[64] splicing-unquotation_D[65]
[60] quasiquotation_D =
"`" template_D[61] | "(" "quasiquote" template_D[61] ")"
Reference {8.3.2.7} Used in: quasiquotation[58] list-template_D[62]
[61] template_D =
simple-datum[25#127] | list-template_D[62] | unquotation_D[63]
Reference {8.3.2.7} Used in: quasiquotation_D[60] list-template_D[62] unquotation_D[63] template-or-splice_D[64] splicing-unquotation_D[65]
[62] list-template_D =
"(" template-or-splice_D[64]* ")" | "(" template-or-splice_D[64]+ "." template_D[61] ")" | "'" template_D[61] | quasiquotation_D+1[60]
Reference {8.3.2.7} Used in: template_D[61]
[63] unquotation_D =
"," template_D-1[61] | "(" "unquote" template_D-1[61] ")"
Reference {8.3.2.7} Used in: template_D[61]
[64] template-or-splice_D =
template_D[61] | splicing-unquotation_D[65]
Reference {8.3.2.7} Used in: list-template_D[62]
[65] splicing-unquotation_D =
",@" template_D-1[61] | "(" "unquote-splicing" template_D-1[61] ")"
Reference {8.3.2.7} Used in: template-or-splice_D[64]

8.4 Definitions

[66#145] definition =
variable-definition[67] | procedure-definition[68]
Reference {8.4} Used in: body[69] transformation-language-body[151] style-language-body[159]
[67] variable-definition =
"(" "define" variable[19=123] expression[16=120] ")"
Reference {8.4} Used in: definition[66#145]
[68] procedure-definition =
"(" "define" "(" variable[19=123] formal-argument-list[31] ")" body[69] ")"
Reference {8.4} Used in: definition[66#145]
[69] body =
definition[66#145]* expression[16=120]
Reference {8.4} Used in: lambda-expression[30] let-expression[51] let*-expression[55] letrec-expression[56] named-let[57] procedure-definition[68]

8.5 Standard Procedures
8.5.1 Booleans

[70] boolean =
"#t" | "#f"
Reference {8.5.1} Used in: token[10] simple-datum[25#127] self-evaluating[26#129]

8.5.3 Pairs and Lists

[71#128] list =
"(" datum[24=126]* ")" | "(" datum[24=126]+ "." datum[24=126] ")" | abbreviation[72]
Reference {8.5.3} Used in:
[72] abbreviation =
abbrev-prefix[73] datum[24=126]
Reference {8.5.3} Used in: list[71#128]
[73] abbrev-prefix =
"'" | "`" | "," | ",@"
Reference {8.5.3} Used in: abbreviation[72]

8.5.4 Symbols

[74] symbol =
identifier[1]
Reference {8.5.4} Used in: simple-datum[25#127] gi[169] unique-id[174]

8.5.5 Keywords

[75] keyword =
identifier[1] ":"
Reference {8.5.5} Used in: token[10] simple-datum[25#127] self-evaluating[26#129] keyword-argument-list[98]

8.5.6 Named Constants

[76] named-constant =
"#!optional" | "#!rest" | "#!key"
Reference {8.5.6} Used in: token[10] simple-datum[25#127] self-evaluating[26#129]

8.5.7 Quantities and Numbers
8.5.7.1 Numerical Types

[77] unit-declaration =
"(" "define-unit" unit-name[87] expression[16=120] ")"
Reference {8.5.7.1} Used in: transformation-language-body[151] style-language-body[159]

8.5.7.4 Syntax of Numerical Constants

[78] number =
num-2[79] | num-8[80] | num-10[82] | num-16[81]
Reference {8.5.7.4} Used in: token[10] simple-datum[25#127] self-evaluating[26#129]
[79] num-2 =
"#b" sign[88]? digit-2[89]+
Reference {8.5.7.4} Used in: number[78]
[80] num-8 =
"#o" sign[88]? digit-8[90]+
Reference {8.5.7.4} Used in: number[78]
[81] num-16 =
"#x" sign[88]? digit-16[92]+
Reference {8.5.7.4} Used in: number[78]
[82] num-10 =
"#d"? sign[88]? decimal[83] exponent[84]? unit[86]?
Reference {8.5.7.4} Used in: number[78]
[83] decimal =
digit-10[91]+ | "." digit-10[91]+ | digit-10[91]+ "." digit-10[91]*
Reference {8.5.7.4} Used in: num-10[82]
[84] exponent =
exponent-marker[85] sign[88]? digit[93]+
Reference {8.5.7.4} Used in: num-10[82]
[85] exponent-marker =
"e"
Reference {8.5.7.4} Used in: exponent[84]
[86] unit =
unit-name[87] (sign[88]? digit-10[91]+)?
Reference {8.5.7.4} Used in: num-10[82]
[87] unit-name =
letter[3]+
Reference {8.5.7.4} Used in: unit-declaration[77] unit[86]
[88] sign =
"+" | "-"
Reference {8.5.7.4} Used in: num-2[79] num-8[80] num-16[81] num-10[82] exponent[84] unit[86]
[89] digit-2 =
"0" | "1"
Reference {8.5.7.4} Used in: num-2[79]
[90] digit-8 =
"0" | "1" | "2" | "3" | "4" | "5" | "6" | "7"
Reference {8.5.7.4} Used in: num-8[80]
[91] digit-10 =
digit[93]
Reference {8.5.7.4} Used in: decimal[83] unit[86] digit-16[92] afii-glyph-identifier[187]
[92] digit-16 =
digit-10[91] | "a" | "b" | "c" | "d" | "e" | "f"
Reference {8.5.7.4} Used in: num-16[81]
[93] digit =
"0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
Reference {8.5.7.4} Used in: subsequent[6] final[8] exponent[84] digit-10[91] character-name[95]

8.5.8 Characters

[94] character =
"#\" any-character | "#\" character-name[95]
Reference {8.5.8} Used in: token[10] simple-datum[25#127] self-evaluating[26#129] added-char-properties-declaration[97] collating-element[111] weight[114] case-conversion-list[117] transliteration-entry[157] character-list[158]
[95] character-name =
letter[3] (letter[3] | digit[93] | "-" | ".")+
Reference {8.5.8} Used in: character[94] string-element[119]

8.5.8.1 Character Properties

[96] character-property-declaration =
"(" "declare-char-property" identifier[1] expression[16=120] ")"
Reference {8.5.8.1} Used in: transformation-language-body[151] style-language-body[159]
[97] added-char-properties-declaration =
"(" "add-char-properties" keyword-argument-list[98] character[94]+ ")"
Reference {8.5.8.1} Used in: transformation-language-body[151] style-language-body[159]
[98] keyword-argument-list =
(keyword[75] expression[16=120])*
Reference {8.5.8.1} Used in: added-char-properties-declaration[97] make-expression[175] style-expression[181]

8.5.8.2 Language-dependent Operations

[99] default-language-declaration =
"(" "declare-default-language" expression[16=120] ")"
Reference {8.5.8.2} Used in: transformation-language-body[151] style-language-body[159]

8.5.8.2.1 Language Definition

[100] language-definition =
"(" "define-language" variable[19=123] [[ collation-specification[101]? | toupper-specification[115]? | tolower-specification[116]? ]] ")"
Reference {8.5.8.2.1} Used in: transformation-language-body[151] style-language-body[159]

8.5.8.2.1.1 Collation

[101] collation-specification =
"(" "collate" [[ multi-collating-element-specification[102]* | collating-symbol-specification[104]* ]] order-specification[106] ")"
Reference {8.5.8.2.1.1} Used in: language-definition[100]
[102] multi-collating-element-specification =
"(" "element" multi-collating-element[103] string[118] ")"
Reference {8.5.8.2.1.1} Used in: collation-specification[101]
[103] multi-collating-element =
identifier[1]
Reference {8.5.8.2.1.1} Used in: multi-collating-element-specification[102] collating-element[111] weight[114]
[104] collating-symbol-specification =
"(" "symbol" weight-identifier[105] ")"
Reference {8.5.8.2.1.1} Used in: collation-specification[101]
[105] weight-identifier =
identifier[1]
Reference {8.5.8.2.1.1} Used in: collating-symbol-specification[104] collation-entry[110] weight[114]
[106] order-specification =
"(" "order" sort-rules[107] collation-entry[110]* ")"
Reference {8.5.8.2.1.1} Used in: collation-specification[101]
[107] sort-rules =
"(" level-sort-rules[108]+ ")"
Reference {8.5.8.2.1.1} Used in: order-specification[106]
[108] level-sort-rules =
sort-keyword[109] | ("(" sort-keyword[109]+ ")")
Reference {8.5.8.2.1.1} Used in: sort-rules[107]
[109] sort-keyword =
"forward" | "backward" | "position"
Reference {8.5.8.2.1.1} Used in: level-sort-rules[108]
[110] collation-entry =
("(" collating-element[111] level-weight[112]* ")") | weight-identifier[105] | collating-element[111]
Reference {8.5.8.2.1.1} Used in: order-specification[106]
[111] collating-element =
character[94] | multi-collating-element[103] | "#t"
Reference {8.5.8.2.1.1} Used in: collation-entry[110]
[112] level-weight =
weight[114] | weight-list[113]
Reference {8.5.8.2.1.1} Used in: collation-entry[110]
[113] weight-list =
"(" weight[114]* ")"
Reference {8.5.8.2.1.1} Used in: level-weight[112]
[114] weight =
weight-identifier[105] | multi-collating-element[103] | character[94] | string[118]
Reference {8.5.8.2.1.1} Used in: level-weight[112] weight-list[113]

8.5.8.2.1.2 Case Conversion

[115] toupper-specification =
"(" "toupper" case-conversion-list[117] ")"
Reference {8.5.8.2.1.2} Used in: language-definition[100]
[116] tolower-specification =
"(" "tolower" case-conversion-list[117] ")"
Reference {8.5.8.2.1.2} Used in: language-definition[100]
[117] case-conversion-list =
("(" character[94] character[94] ")")*
Reference {8.5.8.2.1.2} Used in: toupper-specification[115] tolower-specification[116]

8.5.9 Strings

[118] string =
""" string-element[119]* """
Reference {8.5.9} Used in: token[10] simple-datum[25#127] self-evaluating[26#129] multi-collating-element-specification[102] weight[114] gi[169] unique-id[174] application-flow-object-class-declaration[178] application-characteristic-declaration[182] application-char-characteristic+property-declaration[183]
[119] string-element =
any-character-other-than-"-or-\ | "\"" | "\\" | "\" character-name[95] ";"?
Reference {8.5.9} Used in: string[118]

8.6 Core Expression Language
8.6.1 Syntax

[120=16] expression =
primitive-expression[121#17] | derived-expression[137#41]
Reference {8.6.1} Used in: initializer[36] recipient[44] init[54] template_0[59] variable-definition[67] body[69] unit-declaration[77] character-property-declaration[96] keyword-argument-list[98] default-language-declaration[99] operator[131=28] operand[132=29] test[134=38] consequent[135=39] alternate[136=40] cond-expression[138=42] cond-clause[139#43] case-expression[140=45] key[141=46] case-clause[142=47] definition[145#66] there-exists?-expression[147] for-all?-expression[148] select-each-expression[149] union-for-each-expression[150] query-expression[153] transform-expression[154] style-query-expression[165] construct-expression[166] priority-expression[167=155] content-expression[176] with-mode-expression[179] application-characteristic-declaration[182] application-char-characteristic+property-declaration[183] initial-value-declaration[184] generate-specification[196] x-origin-specification[197] y-origin-specification[198] width-specification[199] height-specification[200] decoration-specification[201] filling-direction-specification[202] contents-alignment-specification[203] fill-out-specification[205] top-float-space-below-specification[209] bottom-float-space-above-specification[210] balance-specification[211] justify-specification[212] justify-limit-specification[213] justify-last-limit-specification[214] length-deviation-specification[215] length-decrease-order-specification[216] align-lines-specification[217]
[121#17] primitive-expression =
variable-reference[122=18] | literal[124=22] | procedure-call[130=27] | conditional[133=37]
Reference {8.6.1} Used in: expression[120=16]
[122=18] variable-reference =
variable[123=19]
Reference {8.6.1} Used in: primitive-expression[121#17]
[123=19] variable =
identifier[1]
Reference {8.6.1} Used in: required-formal-argument[32] optional-formal-argument[33] rest-formal-argument[34] keyword-formal-argument[35] binding-spec[53] named-let[57] variable-definition[67] procedure-definition[68] language-definition[100] variable-reference[122=18] definition[145#66] there-exists?-expression[147] for-all?-expression[148] select-each-expression[149] union-for-each-expression[150] transliteration-map-definition[156] page-model-name[189] column-set-model-definition[204]
[124=22] literal =
quotation[125=23] | self-evaluating[129#26]
Reference {8.6.1} Used in: primitive-expression[121#17]
[125=23] quotation =
"'" datum[126=24] | "(" "quote" datum[126=24] ")"
Reference {8.6.1} Used in: literal[124=22]
[126=24] datum =
simple-datum[127#25] | list[128#71]
Reference {8.6.1} Used in: abbreviation[72] quotation[125=23] case-clause[142=47]
[127#25] simple-datum =
boolean[70] | number[78] | character[94] | string[118] | symbol[74] | keyword[75] | glyph-identifier[186]
Reference {8.6.1} Used in: template_D[61] datum[126=24]
[128#71] list =
"(" datum[126=24]* ")" | "'" datum[126=24]
Reference {8.6.1} Used in:
[129#26] self-evaluating =
boolean[70] | number[78] | character[94] | string[118] | keyword[75] | glyph-identifier[186]
Reference {8.6.1} Used in: literal[124=22]
[130=27] procedure-call =
"(" operator[131=28] operand[132=29]* ")"
Reference {8.6.1} Used in: primitive-expression[121#17]
[131=28] operator =
expression[120=16]
Reference {8.6.1} Used in: procedure-call[130=27]
[132=29] operand =
expression[120=16]
Reference {8.6.1} Used in: procedure-call[130=27]
[133=37] conditional =
"(" "if" test[134=38] consequent[135=39] alternate[136=40] ")"
Reference {8.6.1} Used in: primitive-expression[121#17]
[134=38] test =
expression[120=16]
Reference {8.6.1} Used in: conditional[133=37] cond-clause[139#43] and-expression[143=48] or-expression[144=49]
[135=39] consequent =
expression[120=16]
Reference {8.6.1} Used in: conditional[133=37]
[136=40] alternate =
expression[120=16]
Reference {8.6.1} Used in: conditional[133=37]
[137#41] derived-expression =
cond-expression[138=42] | case-expression[140=45] | and-expression[143=48] | or-expression[144=49]
Reference {8.6.1} Used in: expression[120=16]
[138=42] cond-expression =
"(" "cond" cond-clause[139#43]+ ")" | "(" "cond" cond-clause[139#43]* "(" "else" expression[120=16] ")" ")"
Reference {8.6.1} Used in: derived-expression[137#41]
[139#43] cond-clause =
"(" test[134=38] expression[120=16] ")"
Reference {8.6.1} Used in: cond-expression[138=42]
[140=45] case-expression =
"(" "case" key[141=46] case-clause[142=47]+ ")" | "(" "case" key[141=46] case-clause[142=47]* "(" "else" expression[120=16] ")" ")"
Reference {8.6.1} Used in: derived-expression[137#41]
[141=46] key =
expression[120=16]
Reference {8.6.1} Used in: case-expression[140=45]
[142=47] case-clause =
"(" "(" datum[126=24]* ")" expression[120=16] ")"
Reference {8.6.1} Used in: case-expression[140=45]
[143=48] and-expression =
"(" "and" test[134=38]* ")"
Reference {8.6.1} Used in: derived-expression[137#41]
[144=49] or-expression =
"(" "or" test[134=38]* ")"
Reference {8.6.1} Used in: derived-expression[137#41]
[145#66] definition =
"(" "define" variable[123=19] expression[120=16] ")"
Reference {8.6.1} Used in: body[69] transformation-language-body[151] style-language-body[159]

9 Groves

10 Standard Document Query Language

10.2 Derived Procedures
10.2.2 List Operations

[146] special-query-expression =
there-exists?-expression[147] | for-all?-expression[148] | select-each-expression[149] | union-for-each-expression[150]
Reference {10.2.2} Used in: no other productions
[147] there-exists?-expression =
"(" "there-exists?" variable[19=123] expression[16=120] expression[16=120] ")"
Reference {10.2.2} Used in: special-query-expression[146]
[148] for-all?-expression =
"(" "for-all?" variable[19=123] expression[16=120] expression[16=120] ")"
Reference {10.2.2} Used in: special-query-expression[146]
[149] select-each-expression =
"(" "select-each" variable[19=123] expression[16=120] expression[16=120] ")"
Reference {10.2.2} Used in: special-query-expression[146]
[150] union-for-each-expression =
"(" "union-for-each" variable[19=123] expression[16=120] expression[16=120] ")"
Reference {10.2.2} Used in: special-query-expression[146]

11 Transformation Language

[151] transformation-language-body =
[[ unit-declaration[77]* | added-char-properties-declaration[97]* | character-property-declaration[96]* | transliteration-map-definition[156]* | language-definition[100]* | default-language-declaration[99]? | definition[66#145]* | association[152]* ]]
Reference {11} Used in: no other productions

11.2 Associations

[152] association =
"(" "=>" query-expression[153] transform-expression[154] priority-expression[155=167]? ")"
Reference {11.2} Used in: transformation-language-body[151]
[153] query-expression =
expression[16=120]
Reference {11.2} Used in: association[152]
[154] transform-expression =
expression[16=120]
Reference {11.2} Used in: association[152]
[155=167] priority-expression =
expression[16=120]
Reference {11.2} Used in: association[152] query-construction-rule[164]

11.4 SGML Document Generator
11.4.2 Transliteration

[156] transliteration-map-definition =
"(" "define-transliteration-map" variable[19=123] transliteration-entry[157] ")"
Reference {11.4.2} Used in: transformation-language-body[151]
[157] transliteration-entry =
"(" character[94] character-list[158] ")"
Reference {11.4.2} Used in: transliteration-map-definition[156]
[158] character-list =
"(" character[94]+ ")"
Reference {11.4.2} Used in: transliteration-entry[157]

12 Style Language

[159] style-language-body =
[[ unit-declaration[77]* | definition[66#145]* | construction-rule[161]* | mode-construction-rule-group[162]* | application-flow-object-class-declaration[178]* | application-characteristic-declaration[182]* | application-char-characteristic+property-declaration[183]* | initial-value-declaration[184]* | reference-value-type-declaration[185]* | page-model-definition[188]* | column-set-model-definition[204]* | added-char-properties-declaration[97]* | character-property-declaration[96]* | language-definition[100]* | default-language-declaration[99]? ]]
Reference {12} Used in: no other productions
[160] style-language-expression =
make-expression[175] | style-expression[181] | with-mode-expression[179]
Reference {12} Used in: no other productions

12.4 Flow Object Tree Construction
12.4.1 Construction Rules

[161] construction-rule =
query-construction-rule[164] | id-construction-rule[173] | element-construction-rule[168] | root-construction-rule[172] | default-element-construction-rule[171]
Reference {12.4.1} Used in: style-language-body[159] mode-construction-rule-group[162]
[162] mode-construction-rule-group =
"(" "mode" mode-name[163] construction-rule[161]* ")"
Reference {12.4.1} Used in: style-language-body[159]
[163] mode-name =
identifier[1]
Reference {12.4.1} Used in: mode-construction-rule-group[162] mode-specification[180]
[164] query-construction-rule =
"(" "query" style-query-expression[165] construct-expression[166] priority-expression[155=167]? ")"
Reference {12.4.1} Used in: construction-rule[161]
[165] style-query-expression =
expression[16=120]
Reference {12.4.1} Used in: query-construction-rule[164]
[166] construct-expression =
expression[16=120]
Reference {12.4.1} Used in: query-construction-rule[164] element-construction-rule[168] default-element-construction-rule[171] root-construction-rule[172] id-construction-rule[173]
[167=155] priority-expression =
expression[16=120]
Reference {12.4.1} Used in: association[152] query-construction-rule[164]
[168] element-construction-rule =
"(" "element" (gi[169] | qualified-gi[170]) construct-expression[166] ")"
Reference {12.4.1} Used in: construction-rule[161]
[169] gi =
string[118] | symbol[74]
Reference {12.4.1} Used in: element-construction-rule[168] qualified-gi[170]
[170] qualified-gi =
("(" gi[169]+ ")")
Reference {12.4.1} Used in: element-construction-rule[168]
[171] default-element-construction-rule =
"(" "default" construct-expression[166] ")"
Reference {12.4.1} Used in: construction-rule[161]
[172] root-construction-rule =
"(" "root" construct-expression[166] ")"
Reference {12.4.1} Used in: construction-rule[161]
[173] id-construction-rule =
"(" "id" unique-id[174] construct-expression[166] ")"
Reference {12.4.1} Used in: construction-rule[161]
[174] unique-id =
symbol[74] | string[118]
Reference {12.4.1} Used in: id-construction-rule[173]

12.4.3 Sosofos

[175] make-expression =
"(" "make" flow-object-class-name[177] keyword-argument-list[98] content-expression[176]* ")"
Reference {12.4.3} Used in: style-language-expression[160]
[176] content-expression =
expression[16=120]
Reference {12.4.3} Used in: make-expression[175]
[177] flow-object-class-name =
identifier[1]
Reference {12.4.3} Used in: make-expression[175]
[178] application-flow-object-class-declaration =
"(" "declare-flow-object-class" identifier[1] string[118] ")"
Reference {12.4.3} Used in: style-language-body[159]
[179] with-mode-expression =
"(" "with-mode" mode-specification[180] expression[16=120] ")"
Reference {12.4.3} Used in: style-language-expression[160]
[180] mode-specification =
mode-name[163] | "#f"
Reference {12.4.3} Used in: with-mode-expression[179]

12.4.5 Styles

[181] style-expression =
"(" "style" keyword-argument-list[98] ")"
Reference {12.4.5} Used in: style-language-expression[160]

12.4.6 Characteristic Specification

[182] application-characteristic-declaration =
"(" "declare-characteristic" identifier[1] string[118] expression[16=120] ")"
Reference {12.4.6} Used in: style-language-body[159]
[183] application-char-characteristic+property-declaration =
"(" "declare-char-characteristic+property" identifier[1] string[118] expression[16=120] ")"
Reference {12.4.6} Used in: style-language-body[159]
[184] initial-value-declaration =
"(" "declare-initial-value" identifier[1] expression[16=120] ")"
Reference {12.4.6} Used in: style-language-body[159]

12.5 Common Data Types and Procedures
12.5.1 Layout-driven Generated Text
12.5.1.3 Reference Values

[185] reference-value-type-declaration =
"(" "declare-reference-value-type" identifier[1] ")"
Reference {12.5.1.3} Used in: style-language-body[159]

12.5.5 Glyph Identifiers

[186] glyph-identifier =
afii-glyph-identifier[187]
Reference {12.5.5} Used in: token[10] simple-datum[25#127] self-evaluating[26#129]
[187] afii-glyph-identifier =
"#A" digit-10[91]+
Reference {12.5.5} Used in: glyph-identifier[186]

12.6 Flow Object Classes
12.6.4 Page-sequence Flow Object Class
12.6.4.1 Page-model

[188] page-model-definition =
"(" "define-page-model" page-model-name[189] [[ page-region-specification[190]+ | width-specification[199] | height-specification[200] | filling-direction-specification[202]? | decoration-specification[201]* ]] ")"
Reference {12.6.4.1} Used in: style-language-body[159]
[189] page-model-name =
variable[19=123]
Reference {12.6.4.1} Used in: page-model-definition[188]
[190] page-region-specification =
"(" "region" [[ x-origin-specification[197] | y-origin-specification[198] | width-specification[199] | height-specification[200] | decoration-specification[201]* | filling-direction-specification[202]? | header-specification[193]? | footer-specification[194]? | page-region-flow-map[191]? ]] ")"
Reference {12.6.4.1} Used in: page-model-definition[188]
[191] page-region-flow-map =
"(" "flow" port-specifier[192]+ ")"
Reference {12.6.4.1} Used in: page-region-specification[190]
[192] port-specifier =
identifier[1] | "#f"
Reference {12.6.4.1} Used in: page-region-flow-map[191] column-subset-flow-map[207]
[193] header-specification =
"(" "header" generated-area-clauses[195] ")"
Reference {12.6.4.1} Used in: page-region-specification[190] column-specification[218]
[194] footer-specification =
"(" "footer" generated-area-clauses[195] ")"
Reference {12.6.4.1} Used in: page-region-specification[190] column-specification[218]
[195] generated-area-clauses =
[[ height-specification[200]? | width-specification[199]? | filling-direction-specification[202]? | contents-alignment-specification[203]? | generate-specification[196] ]]
Reference {12.6.4.1} Used in: header-specification[193] footer-specification[194] footnote-separator-specification[219]
[196] generate-specification =
"(" "generate" expression[16=120] ")"
Reference {12.6.4.1} Used in: generated-area-clauses[195]
[197] x-origin-specification =
"(" "x-origin" expression[16=120] ")"
Reference {12.6.4.1} Used in: page-region-specification[190] column-specification[218]
[198] y-origin-specification =
"(" "y-origin" expression[16=120] ")"
Reference {12.6.4.1} Used in: page-region-specification[190] column-specification[218]
[199] width-specification =
"(" "width" expression[16=120] ")"
Reference {12.6.4.1} Used in: page-model-definition[188] page-region-specification[190] generated-area-clauses[195] column-set-model-definition[204] column-specification[218]
[200] height-specification =
"(" "height" expression[16=120] ")"
Reference {12.6.4.1} Used in: page-model-definition[188] page-region-specification[190] generated-area-clauses[195] column-set-model-definition[204] column-specification[218]
[201] decoration-specification =
"(" "decorate" expression[16=120] ")"
Reference {12.6.4.1} Used in: page-model-definition[188] page-region-specification[190] column-set-model-definition[204]
[202] filling-direction-specification =
"(" "filling-direction" expression[16=120] ")"
Reference {12.6.4.1} Used in: page-model-definition[188] page-region-specification[190] generated-area-clauses[195] column-set-model-definition[204]
[203] contents-alignment-specification =
"(" "contents-alignment" expression[16=120] ")"
Reference {12.6.4.1} Used in: generated-area-clauses[195]

12.6.5 Column-set-sequence Flow Object Class
12.6.5.1 Column-set-model

[204] column-set-model-definition =
"(" "define-column-set-model" variable[19=123] [[ column-subset-specification[206]* | fill-out-specification[205]? | tied-column-subset-specification[220]* | filling-direction-specification[202]? | width-specification[199]? | height-specification[200]? | decoration-specification[201]* ]] ")"
Reference {12.6.5.1} Used in: style-language-body[159]
[205] fill-out-specification =
"(" "fill-out" expression[16=120] ")"
Reference {12.6.5.1} Used in: column-set-model-definition[204]
[206] column-subset-specification =
"(" "column-subset" [[ column-specification[218]+ | column-subset-flow-map[207] | top-float-space-below-specification[209]? | bottom-float-space-above-specification[210]? | balance-specification[211]? | justify-specification[212]? | justify-limit-specification[213]? | justify-last-limit-specification[214]? | length-deviation-specification[215]? | length-decrease-order-specification[216]? | align-lines-specification[217]? ]] ")"
Reference {12.6.5.1} Used in: column-set-model-definition[204] tied-column-subset-specification[220]
[207] column-subset-flow-map =
"(" "flow" ("(" port-specifier[192] zone-name[208]+ ")")+ ")"
Reference {12.6.5.1} Used in: column-subset-specification[206]
[208] zone-name =
"top-float" | "body-text" | "bottom-float" | "footnote"
Reference {12.6.5.1} Used in: column-subset-flow-map[207]
[209] top-float-space-below-specification =
"(" "top-float-space-below" expression[16=120] ")"
Reference {12.6.5.1} Used in: column-subset-specification[206]
[210] bottom-float-space-above-specification =
"(" "bottom-float-space-above" expression[16=120] ")"
Reference {12.6.5.1} Used in: column-subset-specification[206]
[211] balance-specification =
"(" "balance?" expression[16=120] ")"
Reference {12.6.5.1} Used in: column-subset-specification[206]
[212] justify-specification =
"(" "justify?" expression[16=120] ")"
Reference {12.6.5.1} Used in: column-subset-specification[206]
[213] justify-limit-specification =
"(" "justify-limit" expression[16=120] ")"
Reference {12.6.5.1} Used in: column-subset-specification[206]
[214] justify-last-limit-specification =
"(" "justify-last-limit" expression[16=120] ")"
Reference {12.6.5.1} Used in: column-subset-specification[206]
[215] length-deviation-specification =
"(" "length-deviation" expression[16=120] ")"
Reference {12.6.5.1} Used in: column-subset-specification[206]
[216] length-decrease-order-specification =
"(" "length-decrease-order" expression[16=120] ")"
Reference {12.6.5.1} Used in: column-subset-specification[206]
[217] align-lines-specification =
"(" "align-lines?" expression[16=120] ")"
Reference {12.6.5.1} Used in: column-subset-specification[206]
[218] column-specification =
"(" "column" [[ width-specification[199]? | height-specification[200]? | x-origin-specification[197]? | y-origin-specification[198]? | footnote-separator-specification[219]? | header-specification[193]? | footer-specification[194]? ]] ")"
Reference {12.6.5.1} Used in: column-subset-specification[206]
[219] footnote-separator-specification =
"(" "footnote-separator" generated-area-clauses[195] ")"
Reference {12.6.5.1} Used in: column-specification[218]
[220] tied-column-subset-specification =
"(" "tie" column-subset-specification[206] column-subset-specification[206]+ ")"
Reference {12.6.5.1} Used in: column-set-model-definition[204]

Subsidiary Files

DSSSL Syntactic Summary Index to following files

DSSSL Syntax Summary Contents,

DSSSL Terminal Variables alphabetic list,

DSSSL Terminal Constants,

"DSSSL Syntactic Constants",

DSSSL Syntactic Variables alphabetic list,

DSSSL Syntactic Variables Redefined in different productions,

DSSSL Syntactic Variables Unused in any production.

Credits

This document augments and reorganizes information from the DSSSL standard, Sharon Adler, Editor. Contributors to this standard since the start of the DSSSL Draft International Standard 2 include: David Abrahamson, Jun Adachi, Dennis Arnon, Paula Angerstein, Anders Berglund, Harvey Bingham, Jon Bosak, Martin Bryan, James Clark, Charles Goldfarb, Paul Grosso, James Mason, Jim Peterson, and Wayne Wohler.

Other Information

See the related SGML Syntax Summary to ISO 8879-1986.

DSSSL Syntax Summary Index

Original converted to HTML 14 April 1996
Version 1.3 15 May 1996 cosmetic update
Version 1.4 28 May 1996 corrected definitions (added missing occurrence
indicators, meta parentheses, occurrences after the first of
syntactic variables and paired double brackets)
Version 1.6 25 Jun 1996 minor editorial
Version 1.6.1 19 Jul 1997 replaced &lsqb; and &rsqb; by [ and ]
Version 1.6.3 29 Jan 1998 in above substituted the entity &amp; for its char
repaired DD DL nesting for production 95 character-name.
changed specified DTD to HTML 3.2 in doctype.

Version 2.1 2002-10-24 Changed ISP from rcn to hbingham.com.

Harvey Bingham's home page
email hbingham@ACM.org

Copyright restrictions:
This material may be used freely for the purposes of studying DSSSL and promoting its application. This copyright notice shall be included in any subsequent copies. The author reserves the right to update this material and to determine the primary server on which it is available.