DSSSL Online Application Profile

Introduction

This draft describes an application profile of DSSSL designed for
the formatting specification requirements of online SGML browsers and
editors (including HTML browsers and editors). This subset, DSSSL
Online (informally "dsssl-o"), supports the basic features needed to
provide publisher-oriented formatting control of online displays and a
minimum set of page-oriented features needed to provide utility
printouts from browsers and editors.

Note that this draft is based on committee drafts of the
full DSSSL Standard and may not accurately represent the final
DSSSL Standard as published. Also, this document is not intended
as an introduction to DSSSL, but rather as a description of
conformance levels for users and implementors who have already read
the standard. A PostScript copy of the DSSSL standard as published is
available by anonymous FTP from ftp.ornl.gov in the directory
/sgml/wg8/dsssl.

DSSSL Online in context

DSSSL (Document Style Semantics and Specification Language) is an
International Standard, ISO/IEC 10179:1996, for specifying document
transformation and formatting in a platform- and vendor-neutral
manner. DSSSL can be used with any document format for which a
property set can be defined according to the Property Set Definition
Requirements of ISO/IEC 10744. In particular, it can be used to
specify the presentation of documents marked up according to ISO
8879:1986, Standard Generalized Markup Language (SGML).

DSSSL consists of two main components: a transformation language
and a style language. The transformation language is used to specify
structural transformations on SGML source files. For example, a
telephone directory structured as a series of entries ordered by last
name could, by applying a transformation spec, be rendered as a series
of entries sorted by first name instead. The transformation language
can also be used to specify the merging of two or more documents, the
generation of indexes and tables of contents, and other
operations. While the transformation language is a powerful tool for
gaining the maximum use from document databases, the focus in early
DSSSL implementations will be on the style language component.

Within the style language, it is possible to identify a number of
capabilities that for one reason or another should be considered
optional for early implementations. Recognizing this, the designers of
DSSSL designated certain features of the style language as optional
and created a Core Query Language and a Core Expression Language
specifically in order to make more limited implementations
possible. However, they did not define any particular subset of the
style language component within the standard itself, but rather left
that task to industry organizations and standards bodies. This
application profile is intended to be one such specification.

The current document grew out of discussions on the former
DSSSL-Lite mailing list during the period from September through
November 1995. These discussions culminated in a December 9, 1995
meeting of key SGML and DSSSL implementors in Boston hosted by Jon
Bosak of Novell and chaired by the late Yuri Rubinsky of SoftQuad.
The application profile resulting from that meeting was published on
the Internet on December 12, 1995 as the document do951212.htm and
announced at a workshop of the Fourth International World Wide Web
Conference the same day.

In August 1996, the application profile was updated by Jon Bosak
(now an employee of Sun Microsystems) to correct a number of
discrepancies between the summary descriptions of flow object
characteristics, which had been based on the September 1995 committee
draft of the DSSSL specification, and the final DSSSL standard
published in April 1996, and also to add certain optional features
that are by consensus of the active DSSSL implementors now considered
to be part of a minimal DSSSL implementation. These features include
lambda, keywords, and let (including letrec, let*, and named let).
This document is archived at sunsite.unc.edu in the directory
/pub/sun-info/standards/dsssl/dssslo, from which it can be obtained by
anonymous FTP.

DSSSL Online summary

This section summarizes the features and flow object classes that
must be supported by a minimally conformant DSSSL Online
application. Note that the appearance of a flow object class in this
section does not imply that the minimal dsssl-o application supports
all standard values of all characteristics associated with each flow
object class; the extent of this support is detailed in the tables
that appear later. The section numbers refer to sections in the DSSSL
standard.

Core DSSSL components

The following items are mandatory in the DSSSL standard and
therefore in DSSSL Online.

DSSSL Options not required in DSSSL Online

For reference purposes, this section lists those optional
components of the full DSSSL Standard that need not be supported in
applications claiming to minimally conform to the DSSSL Online
application profile. The categorization of features and flow object
classes used here does not appear in the standard itself but is
provided as a possibly useful editorial device.

Complex SGML options

DSSSL Online flow object class synopses

This section describes each flow object class in the DSSSL Online
application profile and specifies minimum support for the
characteristics of each flow object class.

Key to the tables of flow object characteristics

In the tables below, the column headed Inh. indicates
whether the characteristic is inherited (I) or non-inherited (N); the
column headed Standard Values shows the values that are defined
for each class in the full DSSSL standard; the column headed
Standard Init/Default shows the initial or default value, if
any, specified in the DSSSL standard; and the column headed
Dsssl-o shows the minimum level of support to be expected in
applications purporting to follow this application profile.

Dsssl-o support in the last column of each table is described as
Standard, indicating that the characteristic is to be treated
exactly as specified in the DSSSL Standard; Default, indicating
that a minimal DSSSL Online application can, if necessary, substitute
the default value specified in the Standard for any other legal value
provided in a DSSSL style specification; Ignore, indicating
that any value given for the characteristic can be ignored by a
minimal DSSSL Online application; or Partial, indicating that
some of the standard values must be supported, but not all of them.
In the case of characteristics in the Partial category, the
values for which support is not required are marked with asterisks
(*). A minimal DSSSL Online application is allowed to substitute the
standard initial or default value for any characteristic marked with
an asterisk. However, every legal value must be propagated to
inheriting flow objects when support for that value is required in the
inheriting context.

Sequence flow object class [12.6.1]

A sequence flow object class is formatted to produce the
concatenation of the areas produced by each of its children. It has a
single principal port. Its children may be inlined or displayed.

NOTE: A sequence flow object is useful for specifying
inherited characteristics. For example, a sequence flow object with a
specification of a font-posture: characteristic may be
constructed for an emphasized phrase element in a paragraph.

A port of a flow object shall accept a sequence flow object if and
only if it would accept each of the flow objects in that sequence.

Display group flow object class [12.6.2]

A display-group flow object class is formatted to produce the
concatenation of the areas produced by each of its children. It has a
single principal port. Its children shall all be displayed and it is
itself displayed.

NOTE: It will, therefore, cause a line break in a
paragraph even if the display-group has no content.

Display group flow object class characteristics

Characteristic

Inh.

Standard Values

Standard Init/Default

Dsssl-o

coalesce-id

N

#f, string

#f

Ignore

position-preference

N

#f, top, bottom

#f

Ignore

space-before

N

display space

no space before

Standard

space-after

N

display space

no space after

Standard

keep-with-previous?

N

#f, #t

#f

Standard

keep-with-next?

N

#f, #t

#f

Standard

break-before

N

#f, page, page-region*, column*, column-set*

#f

Partial

break-after

N

#f, page, page-region*, column*, column-set*

#f

Partial

keep

N

#f, page, column-set*, column*, #t*

#f

Partial

may-violate-keep-before?

N

#f, #t

#f

Default

may-violate-keep-after?

N

#f, #t

#f

Default

Simple page sequence flow object class [12.6.3]

A simple-page-sequence flow object class is formatted to produce a
sequence of page areas. A simple-page-sequence flow object has a
single principal port that accepts any displayed flow object.

NOTE: The simple-page-sequence flow object is intended
for systems that wish to provide a very simple page layout facility.
More complex page layouts can be obtained with the page-sequence and
column-set-sequence flow object classes.

A simple-page-sequence flow object shall not be allowed within the
content of any other flow object class.

A simple-page-sequence may have a single line header and footer
containing text that is constant except for a page number.

NOTE: A document can contain multiple
simple-page-sequences. For example, each chapter of a document could
be a separate simple-page-sequence; this would allow the chapter title
within a header or footer line.

The page shall be filled from top to bottom. The display size for
the contents of the simple-page-sequence shall be the value of the
page-width: less the value of the
left-margin: and right-margin:
characteristics.

Simple page sequence flow object class characteristics

Characteristic

Inh.

Standard Values

Standard Init/Default

Dsssl-o

page-width

I

length

system-dependent

Standard

page-height

I

length

system-dependent

Standard

left-margin

I

length

0pt

Standard

right-margin

I

length

0pt

Standard

top-margin

I

length

0pt

Standard

bottom-margin

I

length

0pt

Standard

header-margin

I

length

0pt

Standard

footer-margin

I

length

0pt

Standard

left-header

N

unlabeled sosofo

empty sosofo

Standard

center-header

N

unlabeled sosofo

empty sosofo

Standard

right-header

N

unlabeled sosofo

empty sosofo

Standard

left-footer

N

unlabeled sosofo

empty sosofo

Standard

center-footer

N

unlabeled sosofo

empty sosofo

Standard

right-footer

N

unlabeled sosofo

empty sosofo

Standard

writing-mode

I

left-to-right, right-to-left, top-to-bottom

left-to-right

Default

Associated procedures:

(page-number-sosofo)

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.

(current-node-page-number-sosofo)

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.

NOTE: This is intended to handle cross references in
conjunction with process-referent.

Paragraph flow object class [12.6.6]

A paragraph flow object represents a paragraph. It has a single
principal port. The contents of this port may be either inlined or
displayed. Inline flow objects are formatted to produce line areas.
Displayed flow objects implicitly specify a break, and their areas
shall be added to the resulting sequence of areas. A paragraph flow
object may only be displayed.

Paragraph break flow object class [12.6.7]

In conjunction with the paragraph-break flow object class, a
paragraph flow object can be used to represent a sequence of
paragraphs. The paragraphs are separated by paragraph-break flow
objects, which are atomic. Paragraph-break flow objects are allowed
only in paragraph flow objects. All the characteristics that are
applicable to a paragraph flow object are also applicable to a
paragraph-break flow object. The characteristics of a paragraph-break
flow object determine how the portion of the content of the paragraph
flow object following that paragraph-break flow object up to the next
paragraph-break flow object, if any, is formatted.

NOTE: The paragraph-break flow object inherits from its
containing paragraph flow object in the usual way.

The first-line-start-indent: is applicable to the line
following a paragraph-break flow object, and the
last-line-end-indent: is applicable to the line preceding
a paragraph-break flow object.

NOTE: It is recommended that paragraph-break flow
objects are used only if there is no other way of specifying the
desired formatting.

Characteristics: See Paragraph flow object class.

Line field flow object class [12.6.8]

The line-field flow object class is inlined and has inline content.
It produces a single inline area. The width of this area is equal to
the value of the field-width: characteristic. If the
content of line-field area cannot fit in this width, then the area
will grow to accommodate the content and, if the line-field occurs in
the paragraph, there shall be a break after the line-field.

It has a single principal port.

Line field flow object class characteristics

Characteristic

Inh.

Standard Values

Standard Init/Default

Dsssl-o

field-width

I

length-spec

0pt

Standard

field-align

I

start, end, center

start

Default

writing-mode

I

left-to-right, right-to-left, top-to-bottom

left-to-right

Default

inhibit-line-breaks?

I

#f, #t

#f

Standard

break-before-priority

N

integer

0

Ignore

break-after-priority

N

integer

0

Ignore

Sideline flow object class [12.6.9]

A sideline flow object is used to contain flow objects that have an
attachment area consisting of a line parallel to the placement
direction. A sideline flow object has a single principal port which
can contain both inlined and displayed flow objects. For each display
area produced by its content, the sideline flow object adds an
attachment. For each inline area produced by its content, the
sideline flow object annotates that area so as to cause the paragraph
in which the flow object occurs to add an attachment area to the line
in which that inline area occurs.

NOTE: Sidelines are often used to mark changes.

Sidelines on consecutive areas in a single area container which have
no space between them should be drawn as a single line.

Character flow object class [12.6.11]

A character flow object is atomic. Flow objects of this class can
only be inlined.

A character flow object is formatted to produce a single inline
area. This may be merged with adjacent inline areas if the
ligature?: property is true. The position point of the
inline area is the position point property of the glyph specified in
the font resource for the specified writing-mode. The escapement
direction is the direction between the position point and escapement
points as specified in the font resource for the specified
writing-mode. The size of the area in the escapement direction is the
distance between the position and escapement points. The size of the
area before and after the placement path in the line-progression
direction is the smallest that will enclose the extent of the glyph in
those directions as specified in the font resource for the specified
writing-mode. If the nominal alignment mode of the font resource for
the character flow object's writing-mode is not the same as the
paragraph's alignment mode, then the glyph area is automatically
adjusted as specified by the alignment mode property in the font
resource for the specified writing-mode.

Character flow object class characteristics

Characteristic

Inh.

Standard Values

Standard Init/Default

Dsssl-o

char

N

character

value of the current node's char property, if there is one, else the value of applying the char-map characteristic, if there is one

Standard

char-map

I

#f, procedure

#f

Default

glyph-id

N

#f, glyph-id

glyph-id of the nominal glyph specified using the standard-chars architectural form, else #f

the value of the math-class character property of the char: characteristic

Ignore

script

N

#f, formal public identifier

the value of the script character property of the char: characteristic

Ignore

position-point-shift

I

length-spec

0pt

Standard

language

I

#f, ISO 639 language code

#f

Standard

country

I

#f, ISO 3166 country code

#f

Standard

color

I

color

default color in Device Gray color space

Standard

layer

I

integer

0

Default

inhibit-line-breaks?

I

#f, #t

#f

Standard

Leader flow object class [12.6.12]

A leader flow object can only be inlined. A leader flow object has
a single principal port containing the inline flow objects to be
repeated.

Leader flow object class characteristics

Characteristic

Inh.

Standard Values

Standard Init/Default

Dsssl-o

length

N

length-spec

determined by context

Standard

truncate-leader?

I

#f, #t

#f

Standard

align-leader?

I

#f, #t

#t

Standard

min-leader-repeat

I

integer greater than 0

1

Standard

inhibit-line-breaks?

I

#f, #t

#f

Standard

break-before-priority

N

integer

0

Ignore

break-after-priority

N

integer

0

Ignore

Rule flow object class [12.6.14]

A rule is used to specify a straight line. Rules may be inlined or
displayed.

Rule flow object class characteristics

Characteristic

Inh.

Standard Values

Standard Init/Default

Dsssl-o

orientation

N

horizontal, vertical, escapement, line-progression

shall be specified

Standard

length

N

length

determined by context

Standard

color

I

color

default color in Device Gray color space

Standard

layer

I

integer

0

Default

line-cap

I

butt, round, square

butt

Default

line-dash

I

list of lengths

list containing the length 0pt

Default

line-thickness

I

length

1pt

Standard

line-repeat

I

integer

1

Default

line-sep

I

length

1pt

Ignore

position-point-shift

I

length-spec

0pt

Standard

inhibit-line-breaks?

I

#f, #t

#f

Standard

break-before-priority

N

integer

0

Ignore

break-after-priority

N

integer

0

Ignore

position-preference

N

#f, top, bottom

#f

Ignore

display-alignment

I

start, center, end, inside*, outside*

start

Partial

start-indent

I

length-spec

0pt

Standard

end-indent

I

length-spec

0pt

Standard

writing-mode

I

left-to-right, right-to-left, top-to-bottom

left-to-right

Default

span

I

integer greater than zero

1

Default

span-weak?

I

#f, #t

#f

Default

space-before

N

display space

no space before

Standard

space-after

N

display space

no space after

Standard

keep-with-previous?

N

#f, #t

#f

Standard

keep-with-next?

N

#f, #t

#f

Standard

break-before

N

#f, page, page-region*, column*, column-set*

#f

Partial

break-after

N

#f, page, page-region*, column*, column-set*

#f

Partial

keep

N

#f, page, column-set*, column*, #t*

#f

Partial

may-violate-keep-before?

N

#f, #t

#f

Default

may-violate-keep-after?

N

#f, #t

#f

Default

External graphic flow object class [12.6.15]

The external-graphic flow object class is used for graphics
contained in an external entity. Flow objects of this class may be
inlined or displayed. This flow object is atomic.

External graphic flow object class characteristics

Characteristic

Inh.

Standard Values

Standard Init/Default

Dsssl-o

display?

N

#f, #t

#f

Standard

scale

N

number, list of two numbers, max, max-uniform

max-uniform

Standard

max-width

N

length-spec

Standard

max-height

N

length-spec

Standard

entity-system-id

N

#f, system identifier

shall be specified

Standard

notation-system-id

N

system identifier

shall be specified

Standard

color

I

color

default color in Device Gray color space

Standard

layer

I

integer

0

Default

position-preference

N

#f, top, bottom

#f

Ignore

display-alignment

I

start, center, end, inside*, outside*

start

Partial

start-indent

I

length-spec

0pt

Standard

end-indent

I

length-spec

0pt

Standard

writing-mode

I

left-to-right, right-to-left, top-to-bottom

left-to-right

Default

span

I

integer greater than zero

1

Default

span-weak?

I

#f, #t

#f

Default

space-before

N

display space

no space before

Standard

space-after

N

display space

no space after

Standard

keep-with-previous?

N

#f, #t

#f

Standard

keep-with-next?

N

#f, #t

#f

Standard

break-before

N

#f, page, page-region*, column*, column-set*

#f

Partial

break-after

N

#f, page, page-region*, column*, column-set*

#f

Partial

keep

N

#f, page, column-set*, column*, #t*

#f

Partial

may-violate-keep-before?

N

#f, #t

#f

Default

may-violate-keep-after?

N

#f, #t

#f

Default

position-point-x

N

length-spec

0 if writing-mode is left-to-right or right-to-left

Standard

position-point-y

N

length-spec

0 if writing-mode is top-to-bottom

Standard

escapement-direction

N

top-to-bottom, left-to-right, right-to-left

the value of writing-mode

Default

inhibit-line-breaks?

I

#f, #t

#f

Standard

break-before-priority

N

integer

0

Ignore

break-after-priority

N

integer

0

Ignore

Score flow object class [12.6.17]

The score flow object has a single principal port. The content of
this port is scored. The port can contain only inlined flow objects.

NOTE: Kendot scoring in Japanese is achieved using the
emphasizing-mark flow object class of full DSSSL.

Score flow object class characteristics

Characteristic

Inh.

Standard Values

Standard Init/Default

Dsssl-o

type

N

before, through, after, length-spec, character

shall be specified

Standard

score-spaces?

I

#f, #t

#t

Standard

color

I

color

default color in Device Gray color space

Standard

layer

I

integer

0

Default

line-cap

I

butt, round, square

butt

Default

line-dash

I

list of lengths

list containing the length 0pt

Default

line-thickness

I

length

1pt

Standard

line-repeat

I

integer

1

Default

line-sep

I

length

1pt

Ignore

inhibit-line-breaks?

I

#f, #t

#f

Standard

Box flow object class [12.6.18]

The box flow object may be used to put a box around a sequence of
flow objects. The box flow object is either displayed or inlined
depending on the value of the display?: characteristic.
The box flow object has a single principal port. If the box is
displayed, then the port shall accept any displayed flow objects. If
the box is inlined, then the port shall accept any inline flow
objects.

The box flow object may result in more than one area. In this
case, the border of the box adjacent to the break may be omitted if
the box-open-end?: characteristic is true.

If the box is inlined, then this border shall be perpendicular to
the writing-mode. If the box is displayed, then this border shall be
parallel to the writing-mode.

When the box is displayed, the size of the box (that is, the
distance between the positions of the borders) in the direction
determined by the writing-mode shall be equal to the display size of
the box less the start and end indents. The display size for the
content of the box shall be equal to the size of the box.

NOTE: Thus, the start-indent: and
end-indent: characteristics for the content of the box
shall be set to give the desired separation between the border of the
box and its content. There is no automatic separation to take account
of the thickness of border.

Box flow object class characteristics

Characteristic

Inh.

Standard Values

Standard Init/Default

Dsssl-o

display?

N

#f, #t

#f

Standard

box-type

I

border, background, both

border

Standard

box-open-end?

I

#f, #t

#f

Standard

background-color

I

color

#f

Standard

background-layer

I

integer

-1

Default

box-corner-rounded

I

#f, #t, list of corner specs

#f

Default

box-corner-radius

I

length-spec

3pt

Ignore

box-border-alignment

I

center, outside, inside

outside

Default

box-size-before

I

length

8pt

Standard

box-size-after

I

length

4pt

Standard

color

I

color

default color in Device Gray color space

Standard

layer

I

integer

0

Default

line-cap

I

butt, round, square

butt

Default

line-dash

I

list of lengths

list containing the length 0pt

Default

line-thickness

I

length

1pt

Standard

line-repeat

I

integer

1

Default

line-sep

I

length

1pt

Ignore

line-miter-limit

I

number

10

Default

line-join

I

miter, round, bevel

miter

Default

writing-mode

I

left-to-right, right-to-left, top-to-bottom

left-to-right

Default

position-preference

N

#f, top, bottom

#f

Ignore

inhibit-line-breaks?

I

#f, #t

#f

Standard

break-before-priority

N

integer

0

Ignore

break-after-priority

N

integer

0

Ignore

start-indent

I

length-spec

0pt

Standard

end-indent

I

length-spec

0pt

Standard

span

I

integer greater than zero

1

Default

span-weak?

I

#f, #t

#f

Default

space-before

N

display space

no space before

Standard

space-after

N

display space

no space after

Standard

keep-with-previous?

N

#f, #t

#f

Standard

keep-with-next?

N

#f, #t

#f

Standard

break-before

N

#f, page, page-region*, column*, column-set*

#f

Partial

break-after

N

#f, page, page-region*, column*, column-set*

#f

Partial

keep

N

#f, page, column-set*, column*, #t*

#f

Partial

may-violate-keep-before?

N

#f, #t

#f

Default

may-violate-keep-after?

N

#f, #t

#f

Default

Alignment point flow object class [12.6.22]

An alignment-point flow object class specifies an explicit
alignment point for paragraphs with a first-line-align:
characteristic equal to #t. It is atomic and inlined.

Aligned column flow object class [12.6.23]

An aligned-column flow object is used for grouping together
externally aligned paragraphs. An aligned-column is displayed. It
has a single principal port that may contain any displayed flow
objects. Displayed flow objects in the port that are not externally
aligned paragraphs shall be formatted normally. The externally
aligned paragraphs in the content or in side-by-side flow objects in
the content are aligned in the direction of the writing-mode so that
their alignment points lie on a line in the placement direction. The
resulting group of aligned lines is then positioned according to the
display-alignment:, start-indent:, and
end-indent: characteristics.

Aligned column flow object class characteristics

Characteristic

Inh.

Standard Values

Standard Init/Default

Dsssl-o

display-alignment

I

start, center, end, inside*, outside*

start

Partial

start-indent

I

length-spec

0pt

Standard

end-indent

I

length-spec

0pt

Standard

writing-mode

I

left-to-right, right-to-left, top-to-bottom

left-to-right

Default

position-preference

N

#f, top, bottom

#f

Ignore

space-before

N

display space

no space before

Standard

space-after

N

display space

no space after

Standard

keep-with-previous?

N

#f, #t

#f

Standard

keep-with-next?

N

#f, #t

#f

Standard

break-before

N

#f, page, page-region*, column*, column-set*

#f

Partial

break-after

N

#f, page, page-region*, column*, column-set*

#f

Partial

keep

N

#f, page, column-set*, column*, #t*

#f

Partial

may-violate-keep-before?

N

#f, #t

#f

Default

may-violate-keep-after?

N

#f, #t

#f

Default

Table flow object class [12.6.27.1]

A table flow object has a single principal port. The contents of
this port shall be either:

all of class table-part, or

all of class table-column, table-row, or table-cell

If it contains flow objects of class table-column, they shall occur
before all flow objects of other classes. A table flow object can
only be displayed.

A table has two directions associated with it, a
row-progression direction and a column-progression direction. The
row-progression direction is equal to the placement direction of the
table flow object. The column-progression direction is given by the
value of the writing-mode: characteristic of the table
flow object. These are required to be perpendicular.

Table flow object class characteristics

Characteristic

Inh.

Standard Values

Standard Init/Default

Dsssl-o

table-width

N

#f, length-spec

display-size less applicable indent

Standard

table-auto-width-method

I

#f, public identifier

#f

Standard

table-border

I

#f, #t, unlabeled sosofo

#f

Standard

before-row-border

N

#f, #t, unlabeled sosofo

value of the table-border characteristic

Standard

after-row-border

N

#f, #t, unlabeled sosofo

value of the table-border characteristic

Standard

before-column-border

N

#f, #t, unlabeled sosofo

value of the table-border characteristic

Standard

after-column-border

N

#f, #t, unlabeled sosofo

value of the table-border characteristic

Standard

table-corner-rounded

I

#f, #t, list of x-y pairs

#f

Default

table-corner-radius

I

length-spec

3pt

Ignore

position-preference

N

#f, top, bottom

#f

Ignore

display-alignment

I

start, center, end, inside*, outside*

start

Partial

start-indent

I

length-spec

0pt

Standard

end-indent

I

length-spec

0pt

Standard

writing-mode

I

left-to-right, right-to-left, top-to-bottom

left-to-right

Default

span

I

integer greater than zero

1

Default

span-weak?

I

#f, #t

#f

Default

space-before

N

display space

no space before

Standard

space-after

N

display space

no space after

Standard

keep-with-previous?

N

#f, #t

#f

Standard

keep-with-next?

N

#f, #t

#f

Standard

break-before

N

#f, page, page-region*, column*, column-set*

#f

Partial

break-after

N

#f, page, page-region*, column*, column-set*

#f

Partial

keep

N

#f, page, column-set*, column*, #t*

#f

Partial

may-violate-keep-before?

N

#f, #t

#f

Default

may-violate-keep-after?

N

#f, #t

#f

Default

Table part flow object class [12.6.27.2]

A table-part flow object is allowed only within a table flow
object. A table-part flow object has three ports:

the principal port is used for the table body.

header is used for the table header.

footer is used for the table footer.

The only flow objects that are allowed in the ports of a table-part
flow object shall be only those explicitly specified herein. Flow
objects of class table-column are allowed in the principal port; they
shall occur before flow objects of any other class. All ports shall
accept flow objects of class table-row and table-cell.

The result of formatting a table-part flow object is a sequence of
areas. Each area consists of the content of the header port (unless
omitted because of the table-part-omit-middle-header?:
characteristic), followed by some portion of the content of the
principal port, followed by the content of the footer port (unless
omitted because of the table-part-omit-middle-footer?:
characteristic). Each row in the principal port occurs exactly once
and the order of the rows shall be preserved. The rows in the header
and footer ports shall be replicated for each result area.

All
table-parts in a table have the same width.

Table part flow object class characteristics

Characteristic

Inh.

Standard Values

Standard Init/Default

Dsssl-o

table-part-omit-middle-header?

I

#f, #t

#f

Default

table-part-omit-middle-footer?

I

#f, #t

#f

Default

space-before

N

display space

no space before

Standard

space-after

N

display space

no space after

Standard

keep-with-previous?

N

#f, #t

#f

Standard

keep-with-next?

N

#f, #t

#f

Standard

break-before

N

#f, page, page-region*, column*, column-set*

#f

Partial

break-after

N

#f, page, page-region*, column*, column-set*

#f

Partial

keep

N

#f, page, column-set*, column*, #t*

#f

Partial

may-violate-keep-before?

N

#f, #t

#f

Default

may-violate-keep-after?

N

#f, #t

#f

Default

Table column flow object class [12.6.27.3]

A table-column flow object is an atomic flow object that specifies
characteristics applicable to table cells that have the same column
and span.

Returns a length-spec that specifies k units of
proportional measure. This can 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.

NOTE: This allows the width of a column to be
specified proportionally.

Automatic table width computation [12.6.27.4]

The width of a column for which no width is specified shall be at
least as great as the maximum of the minimum possible widths of the
content of any table cells that span exactly that column.

NOTE: When a table-cell includes a paragraph for which
the lines: characteristic has a value of
wrap, the minimum possible width of that paragraph is
determined in a system-dependent manner. It might, for example, be
the length of the longest word.

If a table cell spans more than one column, then the sum of the
widths of the columns that it spans shall be at least as great as the
width of the content of the table cell.

If a length-spec is specified for a column's width, then the column
shall be exactly that wide.

If a length-spec is specified for a column-width, then that length
shall be used as the display size for any table-cells which span
exactly that column.

Other aspects of the width computation method
can be controlled with the table-auto-width-method:
characteristic.

Table row flow object class [12.6.27.5]

A table-row flow object serves to group table cells into rows: all
table cells in a table-row start in the same geometric row.

A table-row has a single principal port, which accepts flow objects
of class table-cell.

A table-row flow object can only occur as the child of a table-part
or table flow object.

When flow objects of class table-cell occur directly in a
table-part or table, then cells are grouped into rows using the
starts-row?: and ends-row?: characteristics.

Table cell flow object class [12.6.27.6]

A table-cell has a single principal port. It shall accept any flow
object that can be displayed. A table-cell flow object shall only
occur as the child of a table-row, table-part, or table flow object.

NOTE: The alignment of the content of a table-cell in
the column-progression direction (e.g., horizontal alignment for
left-to-right, top-to-bottom text) shall be controlled by the
display-alignment: or quadding:
characteristics of the content of the table-cell.

Table cell flow object class characteristics

Characteristic

Inh.

Standard Values

Standard Init/Default

Dsssl-o

column-number

N

integer greater than zero

current column number

Standard

n-columns-spanned

N

integer greater than zero

1

Standard

n-rows-spanned

N

integer greater than zero

1

Standard

cell-before-row-margin

I

length

0pt

Standard

cell-after-row-margin

I

length

0pt

Standard

cell-before-column-margin

I

length

0pt

Standard

cell-after-column-margin

I

length

0pt

Standard

cell-row-alignment

I

start, end, center

start

Standard

cell-background?

I

#f, #t

#f

Standard

background-color

I

color

#f

Standard

background-layer

I

integer

-1

Default

cell-before-row-border

I

#f, #t, unlabeled sosofo

#f

Standard

cell-after-row-border

I

#f, #t, unlabeled sosofo

#f

Standard

cell-before-column-border

I

#f, #t, unlabeled sosofo

#f

Standard

cell-after-column-border

I

#f, #t, unlabeled sosofo

#f

Standard

starts-row?

N

#f, #t

#f

Standard

ends-row?

N

#f, #t

#f

Standard

cell-crossed

I

#f, with, across, both

#f

Default

line-cap

I

butt, round, square

butt

Default

line-dash

I

list of lengths

list containing the length 0pt

Default

line-thickness

I

length

1pt

Standard

line-repeat

I

integer

1

Default

line-sep

I

length

1pt

Ignore

float-out-sidelines?

I

#f, #t

#f

Default

float-out-marginalia?

I

#f, #t

#f

Default

float-out-line-numbers?

I

#f, #t

#f

Default

Table border flow object class [12.6.27.7]

A table-border flow object is an atomic flow object used to specify
the border of a table cell or of the table as a whole. A table-border
flow object is not allowed in the content of any flow object.

The width of borders does not affect the width of cells, nor the
positioning of the contents of cells, nor the width of the table, nor
the size of the area produced by the table. In particular the width
of the table, as specified by the table-width:
characteristic on the table, is equal to the sum of the widths of the
cells.

Table-border flow object class characteristics

Characteristic

Inh.

Standard Values

Standard Init/Default

Dsssl-o

border-priority

I

integer

0

Default

border-alignment

I

center, start, end, outside, inside

center

Default

border-present?

I

#f, #t

#t

Standard

border-omit-at-break?

I

#f, #t

#f

Standard

color

I

color

default color in Device Gray color space

Standard

layer

I

integer

0

Default

line-cap

I

butt, round, square

butt

Default

line-dash

I

list of lengths

list containing the length 0pt

Default

line-thickness

I

length

1pt

Standard

line-repeat

I

integer

1

Default

line-sep

I

length

1pt

Ignore

line-miter-limit

I

number

10

Default

line-join

I

miter, round, bevel

miter

Default

Scroll flow object class [12.6.28.1]

A scroll flow object class is used as the top-level flow object for
online display that does not divide output into pages. It has a
single principal port, which accepts displayed flow objects. The size
of the flow object in the direction perpendicular to the
filling-direction is determined by the viewing environment.

Scroll flow object class characteristics

Characteristic

Inh.

Standard Values

Standard Init/Default

Dsssl-o

filling-direction

I

top-to-bottom, left-to-right, right-to-left

top-to-bottom

Default

writing-mode

I

left-to-right, right-to-left, top-to-bottom

left-to-right

Default

background-color

I

color

#f

Standard

background-layer

I

integer

-1

Default

background-tile

I

#f, external graphic

#f

Standard

start-margin

I

length-spec

0pt

Standard

end-margin

I

length-spec

0pt

Standard

Multi-mode flow object class [12.6.28.2]

A multi-mode flow object is a flow object with two or more modes of
presentation. The flow object can be switched between these modes of
presentation in a system-dependent way.

NOTE: An implementation might present a menu of the
different modes. Alternatively, clicking on the formatted flow object
might cycle through the modes.

This flow object is inlined or displayed according to its content
and mode of presentation.

The flow object has one port for each mode. The content of that
port specifies the presentation in the corresponding mode. Initially,
the flow object shall be displayed using the principal mode.

NOTE: For example, an icon which when clicked causes a
window to be popped up could be represented by a multi-mode flow
object with two ports, the first containing an icon flow object and
the second containing a vertical-scroll flow object. In this case,
the principal-mode-simultaneous?: characteristic would be
true.

Multi-mode flow object class characteristics

Characteristic

Inh.

Standard Values

Standard Init/Default

Dsssl-o

multi-modes

N

list

must be specified

Standard

principal-mode-simultaneous?

I

#f, #t

#f

Standard

Link flow object class [12.6.28.3]

A link flow object represents a hypertext link that can be
interactively traversed typically by clicking on the areas
representing the flow object and its content. A link has a single
principal port, which can contain both inlined and displayed flow
objects. Link flow objects can be nested and the innermost link is
effective.

Link flow object class characteristics

Characteristic

Inh.

Standard Values

Standard Init/Default

Dsssl-o

destination

N

#f, address, list of addresses

shall be specified

Standard

Marginalia flow object class [12.6.28.4]

The marginalia flow object class is used to contain flow objects
whose resulting areas shall be attachment areas for the line in which
the marginalia flow object occurs. The marginalia flow object has a
single principal port which shall contain only inlined flow objects.
A marginalia flow object shall have an ancestor flow object that is of
class paragraph.

The behavior when there is more than one marginalia area attached
to a single line is system-dependent.

Marginalia flow object class characteristics

Characteristic

Inh.

Standard Values

Standard Init/Default

Dsssl-o

marginalia-sep

I

length-spec

0pt

Standard

marginalia-side

I

start, end

start

Standard

marginalia-keep-with-previous?

I

#f, #t

#f

Standard

Summary tables of characteristics

The following tables show standard values and minimum dsssl-o
support for all characteristics that can be specified for the flow
object classes in the DSSSL Online subset.

DSSSL Online extensions

In addition to the Core Expression Language, DSSSL Online is now
considered to include lambda, #!key, and let (including letrec, let*,
and named let). See the full DSSSL standard for details.

Core query language

The core query language is a subset of SDQL, the Standard Document
Query Language. In addition to the procedures defined in the core
query language subclause, the current-node, node-list-empty?,
node-list?, parent, and node-list-error procedures are allowed in the
subset. This subset is designed so that a node-list never contains
more than one node, and so that any node that it does contain is
always of type element.

In the following procedures, the argument that is of type node-list
can be omitted, and defaults to (current-node).
osnl (optional singleton node-list) denotes an
argument that must be a node-list containing zero or one nodes.

Navigation

(ancestor stringosnl)

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

(gi osnl)

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.

(id osnl)

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.

(element stringsnl)

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. This procedures requires the
random-access feature.

Counting

(child-number snl)

Returns the child number of snl. The child
number of an element is the number of element siblings of the
current element that are before or equal in tree order to the current
element and that have the same generic identifier as the current
element.

(ancestor-child-number stringsnl)

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

(hierarchical-number listsnl)

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

Returns a list of non-negative integers. The last member of list is
the child number of the nearest ancestor of 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.

(element-number snl)

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

(element-number-list listsnl)

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:

are
before or equal to snl

have a generic
identifier equal to the i-th member of
list, and

if i is greater
than 1, are after the last element before snl
whose generic identifier is equal to the i - 1-th member
of list.

NOTE: In effect the counter for each argument is reset
at the start of the element referred to by the previous argument.

NOTE: An element is considered to be after its parent.

NOTE: This procedure could be used to number footnotes
sequentially within a chapter (by using the last number in the list).
It could also be used to number headings in a DTD which lacks
container elements.

Accessing attribute values

In the following procedures attribute values are represented as
strings by applying the data procedure to the
attribute-assignment node.

(attribute-string stringosnl)

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.

(inherited-attribute-string stringosnl)

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.

(inherited-element-attribute-string string1string2osnl )

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.

Testing current location

(first-sibling? snl)

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

(absolute-first-sibling? snl)

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

(last-sibling? snl)

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

(absolute-last-sibling? snl)

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

(have-ancestor? objsnl)

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.

Entities and notations

snl here determines the document in which to
find the entity.

(entity-public-id stringsnl)

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

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-generated-system-id stringsnl)

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

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

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-attribute-string string1string2snl)

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

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.

(notation-public-id stringsnl)

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

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.

(notation-generated-system-id stringsnl)

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.

Name normalization

(general-name-normalize stringsnl)

Returns string transformed using the general
namecase substitution string normalization rule of the grove in which
snl occurs. This could be defined as follows: