/usr/share/doc/openjade1.3/dsssl2.htm is in openjade1.3 1.3.2-11ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 | <!-- -*- sgml -*- -->
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>Experimental DSSSL extensions for XSL</title>
</head>
<body background="images/background.gif" bgcolor="#FFFFFF">
<p><font face="Arial"><img src="images/dsssltitle.gif"
alt="OpenJade" vspace="10" width="750" height="60"> </font></p>
<div align="left">
<table border="0" width="780">
<tr>
<td valign="top"><font face="Arial"><img
src="images/space.gif" alt="" width="145" height="10"></font></td>
<td><h1><font face="Arial">Experimental DSSSL extensions</font></h1>
<h2><font face="Arial">Contents</font></h2>
<ul>
<li><a href="#Introduction"><font face="Arial">Introduction</font></a><font
face="Arial"> </font></li>
<li><a href="#Imperative programming"><font
face="Arial">Imperative programming</font></a><font
face="Arial"> </font></li>
<li><a href="#Style rules"><font face="Arial">Style
rules</font></a><font face="Arial"> </font></li>
<li><a href="#ExtendedPatterns"><font face="Arial">Extended
Patterns</font></a><font face="Arial"> </font></li>
<li><a href="#Multiple patterns per rule"><font
face="Arial">Multiple patterns per rule</font></a><font
face="Arial"> </font></li>
<li><a href="#Flow object macros"><font face="Arial">Flow
object macros</font></a><font face="Arial"> </font></li>
<li><a href="#Characteristic value conversion"><font
face="Arial">Characteristic value convertion</font></a><font
face="Arial"> </font></li>
<li><a href="#Characteristic names"><font
face="Arial">Characteristic names</font></a><font
face="Arial"> </font></li>
</ul>
<h2><a name="Introduction"><font face="Arial">Introduction</font></a></h2>
<p><font face="Arial">This document descibes some
experimental extensions to DSSSL that are implemented in OpenJade.
These are designed so that, with these extensions, DSSSL provides a
superset of the semantics </font><a
href="http://www.w3.org/TR/NOTE-XSL-970910"><font
face="Arial">XSL</font></a><font face="Arial"> for flow
object tree construction. OpenJade has a <code>-2</code>
option that enables these extensions. </font></p>
<p><font face="Arial">These extensions do not include the
additional flow object classes and characteristics that
will be needed for XSL; in particular they do not include
the HTML/CSS flow object classes. </font></p>
<p><a href="#top"><font face="Arial"><img
src="images/top-of-page.gif" alt="Up" border="0"
width="11" height="15"></font></a><a href="#top"><font
size="2" face="Arial">Back to top</font></a><font
size="2" face="Arial"> </font><font face="Arial"> </font></p>
<h2><a name="Imperative programming"><font face="Arial">Imperative
programming</font></a></h2>
<p><font face="Arial">The following features come from R4RS:
</font></p>
<ul>
<li><font face="Arial">assignment (<code>set!</code>)
expressions (with </font><a href="#read-only"><font
face="Arial">restrictions</font></a><font
face="Arial">) </font></li>
<li><font face="Arial">vectors (with </font><a
href="#read-only"><font face="Arial">restrictions</font></a><font
face="Arial">) </font></li>
<li><font face="Arial"><code>call-with-current-continuation</code>
(with </font><a href="#call/cc"><font
face="Arial">restrictions</font></a><font
face="Arial">) </font></li>
<li><font face="Arial"><code>begin</code> expressions
</font></li>
<li><font face="Arial">multiple expressions in
procedure bodies, <code>cond</code> clauses </font></li>
<li><font face="Arial">alternate in <code>if</code>
expression optional </font></li>
<li><font face="Arial">it is not an error when
nothing matches in <code>cond</code> or <code>case</code>
expression </font></li>
<li><font face="Arial"><code>eqv?</code> and <code>memv</code>
procedures; these behave as specified in R4RS for
vectors but behave the same as <code>equal?</code>
for strings and lists </font><p><font
face="Arial">This is so that case expressions can
use <code>eqv?</code> as required by R4RS without
breaking compatibility with existing DSSSL code
which assumes case expressions with strings and
lists will use <code>equal?</code>. R4RS
specifies that <code>eqv?</code> should return #t
when its arguments "should normally be
regarded as the same object". R4RS treats
strings and lists as mutable and its
specification of <code>eqv?</code> for strings
and lists is consistent with this. So long as
DSSSL keeps strings and lists as immutable data-types
with value semantics, it is more consistent to
define <code>eqv?</code> to behave like <code>equal?</code>
for them. </font></p>
</li>
</ul>
<p><font face="Arial">The use of side-effects is
restricted. Assignment to top-level variables is not
allowed. There is also the concept that a memory location
can be read-only. When a memory location is read-only, it
is an error to change that location. An memory location
can be recursively marked as read-only; this means that
the memory location along with all memory locations
reachable from that memory location become read-only. A
memory location is recursively marked as read-only when: </font></p>
<ul>
<li><font face="Arial">an object stored in that
memory location is bound to a top-level variable </font></li>
<li><font face="Arial">an expression specifying a
characteristic is evaluated and a variable that
names that memory location occurs free in that
expression; for example, this would be an error: </font><pre><font
face="Arial">
(let ((x 10pt))
(make paragraph
font-size: (begin (set! x 12pt) x)))
</font></pre>
</li>
<li><font face="Arial">an object stored in that
memory location is returned by a <code>(inherited-</code><code><var>C</var></code><code>)</code>
or <code>(actual-</code><code><var>C</var></code><code>)</code>
procedure </font></li>
<li><font face="Arial">an object stored in that
memory location is passed as the first argument
to the <code>node-list-map</code> procedure </font></li>
</ul>
<p><font face="Arial">A continuation created with <code>call-with-current-continuation</code>
cannot be called if it is read-only, and can only be used
to return to a stack frame in the current call chain (sometimes
referred to as upwards only). </font></p>
<p><font face="Arial">There's a <code>void</code> data
type with a single value which can be written as <code>#v</code>.
This is returned by <code>cond</code>, <code>case</code>
and <code>if</code> expressions which don't match. </font></p>
<p><a href="#top"><font face="Arial"><img
src="images/top-of-page.gif" alt="Up" border="0"
width="11" height="15"></font></a><a href="#top"><font
size="2" face="Arial">Back to top</font></a><font
size="2" face="Arial"> </font><font face="Arial"> </font></p>
<h2><a name="Style rules"><font face="Arial">Style rules</font></a></h2>
<p><font face="Arial">When a construction rule has a
keyword argument list instead of a construct expression
it is treated as a style rule. For example, </font></p>
<pre><font face="Arial">
(element H1
font-size: 14pt
font-weight: 'bold)
</font></pre>
<p><font face="Arial">The keyword argument list can
include a <code>use:</code> keyword just as with <code>style</code>
expressions. See the </font><a
href="http://www.w3.org/TR/NOTE-XSL-970910"><font
face="Arial">XSL proposal</font></a><font face="Arial">
for the semantics of style rules. </font></p>
<p><a href="#top"><font face="Arial"><img
src="images/top-of-page.gif" alt="Up" border="0"
width="11" height="15"></font></a><a href="#top"><font
size="2" face="Arial">Back to top</font></a><font
size="2" face="Arial"> </font><font face="Arial"> </font></p>
<h2><a name="ExtendedPatterns"><font face="Arial">Extended
patterns</font></a></h2>
<p><font face="Arial">The syntax for element patterns is
extended. These provide provide a superset of the
semantics of XSL patterns. They are allowed both in
element construction rules and in contexts where a <code>match-element?</code>
pattern is currently allowed (eg <code>select-elements</code>,
<code>process-matching-children</code>, <code>process-first-descendant</code>).
</font></p>
<p><font face="Arial">A pattern is either a single gi or
a list. A list consists of a sequence of gis, where each
gi can be followed by one or more keyword/value pairs (where
the value is always a single datum). A gi can be #t, a
string or a symbol. The following keywords are allowed: </font></p>
<dl>
<dt><font face="Arial"><code>id:</code> </font></dt>
<dd><font face="Arial">followed by a string or symbol
</font></dd>
<dt><font face="Arial"><code>class:</code> </font></dt>
<dd><font face="Arial">followed by a string or symbol
</font></dd>
<dt><font face="Arial"><code>repeat:</code> </font></dt>
<dd><font face="Arial">followed by one of the symbols
<code>*</code>, <code>+</code>, <code>?</code> </font></dd>
<dt><font face="Arial"><code>only:</code> </font></dt>
<dd><font face="Arial">followed by one of the symbols
<code>of-type</code>, <code>of-any</code> </font></dd>
<dt><font face="Arial"><code>position:</code> </font></dt>
<dd><font face="Arial">followed by one of the symbols
<code>first-of-type</code>, <code>first-of-any</code>,
<code>last-of-type</code>, <code>last-of-any</code>
</font></dd>
<dt><font face="Arial"><code>attributes:</code> </font></dt>
<dd><font face="Arial">followed by a list of name/value
pairs; for backward compatibility with <code>match-element?</code>
patterns in the current DSSSL standard the <code>attributes:</code>
keyword can be omitted; #t and #f can be used as
a value to test for presence or absence of
attributes. </font></dd>
<dt><font face="Arial"><code>children:</code> </font></dt>
<dd><font face="Arial">followed by a pattern; each of
the elements in the pattern must occur as child; <code>repeat:</code>
is not allowed in children patterns; the <code>children:</code>
qualifier is allowed on any gi in a pattern not
just the last element </font></dd>
<dt><font face="Arial"><code>priority:</code> </font></dt>
<dd><font face="Arial">followed by an integer;
multiple <code>priority:</code> qualifiers are
allowed in a pattern and will be added together </font></dd>
<dt><font face="Arial"><code>importance:</code> </font></dt>
<dd><font face="Arial">followed by an integer;
multiple <code>importance:</code> qualifiers are
allowed and will be added together </font></dd>
</dl>
<p><font face="Arial">Class attribute names are declared
using </font></p>
<pre><font face="Arial">
(declare-class-attribute "<var>class</var>")
</font></pre>
<p><font face="Arial">or </font></p>
<pre><font face="Arial">
(declare-class-attribute <var>class</var>)
</font></pre>
<p><font face="Arial">Id attribute names can be declared
similarily using <code>declare-id-attribute</code>. </font></p>
<p><font face="Arial">Some examples: </font></p>
<pre><font face="Arial">
(element (E importance: 42) <var>...</var>)
(element (E attributes: (A1 V1)) <var>...</var>)
(element (P E children: C) <var>...</var>)
(element (P children: C priority: -11
E children: C attributes: (A1 V1 A2 V2))
<var>...</var>)
(element (P E children: (A children: C B children: C)) <var>...</var>)
</font></pre>
<p><font face="Arial">The last is equivalent to the
following in XSL syntax: </font></p>
<pre><font face="Arial">
<element type="P">
<target-element type="E">
<element type="A">
<element type="C"/>
</element>
<element type="B">
<element type="C"/>
</element>
</target-element>
</element>
</font></pre>
<pre><a href="#top"><font face="Arial"><img
src="images/top-of-page.gif" alt="Up" border="0" width="11"
height="15"></font></a><a href="#top"><font size="3" face="Arial">Back to top</font></a><font
size="3" face="Arial"> </font></pre>
<h2><a name="Multiple patterns per rule"><font
face="Arial">Multiple patterns per rule</font></a></h2>
<p><font face="Arial">An <code>or-element</code>
construction rule has the syntax </font></p>
<pre><font face="Arial">
(or-element (<var>pattern</var>+) <var>expression</var>)
</font></pre>
<p><font face="Arial">where <code><var>pattern</var></code>
is any pattern that could be allowed in an element
construction rule. It is equivalent to a sequence of
element construction rules. </font></p>
<p><font face="Arial">For example, </font></p>
<pre><font face="Arial">
(or-element (H1 H2 H3)
font-weight: 'bold)
(or-element ((H1 TITLE) (H2 TITLE) (H3 TITLE))
font-weight: 'bold)
</font></pre>
<p><font face="Arial">is equivalent to </font></p>
<pre><font face="Arial">
(element H1
font-weight: 'bold)
(element H2
font-weight: 'bold)
(element H3
font-weight: 'bold)
(element (H1 TITLE)
font-weight: 'bold)
(element (H2 TITLE)
font-weight: 'bold)
(element (H3 TITLE)
font-weight: 'bold)
</font></pre>
<pre><a href="#top"><font face="Arial"><img
src="images/top-of-page.gif" alt="Up" border="0" width="11"
height="15"></font></a><a href="#top"><font size="3" face="Arial">Back to top</font></a><font
size="2" face="Arial"> </font></pre>
<h2><a name="Flow object macros"><font face="Arial">Flow
object macros</font></a></h2>
<p><font face="Arial">A flow object macro can be defined
like this: </font></p>
<p align="left"><font face="Arial"> </font></p>
<div align="left"><table border="0" width="546"
bgcolor="#FFFFBB">
<tr>
<td width="542"><dl>
<dt><font face="Arial">(declare-flow-object-macro
list-item ((indent 1in) (marker "\bullet")
#!contents contents)<br>
(make paragraph<br>
first-line-start-indent: (- indent)<br>
start-indent: (+ indent (inherited-start-indent))<br>
(make
line-field<br>
field-width: indent<br>
(literal marker)</font></dt>
<dt><font face="Arial">
)<br>
contents</font></dt>
<dt><font face="Arial"> )</font></dt>
<dt><font face="Arial">)<br>
<br>
(root<br>
(make simple-page-sequence<br>
(make paragraph<br>
(literal "Para 1")</font></dt>
<dt><font face="Arial">
)<br>
(make list-item<br>
(literal "Item 1")<br>
(make list-item<br>
indent: .5in<br>
marker: "\black-circle"<br>
(literal "Sub item 1.1")</font></dt>
<dt><font face="Arial">
)</font></dt>
<dt><font face="Arial">
)<br>
(make list-item<br>
font-weight: 'bold<br>
(literal "Item 2")<br>
(make list-item<br>
(literal "Sub item 2.1")</font></dt>
<dt><font face="Arial">
)</font></dt>
<dt><font face="Arial">
)<br>
(make paragraph<br>
(literal "Para 2")</font></dt>
<dt><font face="Arial">
)</font></dt>
<dt><font face="Arial"> )</font></dt>
<dt><font face="Arial">)</font></dt>
</dl>
</td>
</tr>
</table>
</div><p><font face="Arial">If the formal argument list
includes <code>#!contents</code> the flow object behaves
like a compound flow object, otherwise like an atomic
flow object. Inherited characteristics can be specified;
these are applied to a sequence flow object which is
automatically wrapped around what is returned by the body
of the flow object macro. The preceding formal arguments
are the non-inherited characteristics; like keyword
arguments they can be specified either as <code><var>id</var></code>
(in which case they default to #f), or as <code>(</code><code><var>id</var></code><code>
</code><code><var>init-expression</var></code><code>)</code>.
</font></p>
<p><font face="Arial">Note that flow object macros are
quite different from ordinary procedures in that the
macro body is not evaluated when the make expression is
evaluated, but rather when the flow object is to be added
to the tree; this allows <code>(inherited-</code><code><var>c</var></code><code>)</code>
and <code>(actual-</code><code><var>c</var></code><code>)</code>
procedures to be used in flow object macro
characteristics, non-inherited as well as inherited, just
as with normal flow objects. It is also possible to use <code>(inherited-</code><code><var>c</var></code><code>)</code>
and <code>(actual-</code><code><var>c</var></code><code>)</code>
procedures in the body of the flow object macro; they
will return the same result as if they were used in the
specification of a characteristic on the invocation of
the flow object macro. </font></p>
<p><font face="Arial">For an example of a library built
with the macro facility read: </font><a
href="../DSSSL/HTML%20Sample.html"><font face="Arial">Simple
XML to HTML Conversion and Rendition Example</font></a><font
face="Arial"> </font></p>
<p><a href="#top"><font face="Arial"><img
src="images/top-of-page.gif" alt="Up" border="0"
width="11" height="15"></font></a><a href="#top"><font
size="2" face="Arial">Back to top</font></a><font
size="2" face="Arial"> </font><font face="Arial"> </font></p>
<h2><a name="Characteristic value conversion"><font
face="Arial">Characteristic value conversion</font></a></h2>
<p><font face="Arial">Most characteristic values can now
be specified as strings and will be converted
appropriately. For boolean valued characteristics any of
the strings <code>"true"</code>, <code>"false"</code>,
<code>"yes"</code> and <code>"no"</code>
are acceptable. </font></p>
<p><a href="#top"><font face="Arial"><img
src="images/top-of-page.gif" alt="Up" border="0"
width="11" height="15"></font></a><a href="#top"><font
size="2" face="Arial">Back to top</font></a><font
size="2" face="Arial"> </font><font face="Arial"> </font></p>
<h2><a name="Characteristic names"><font face="Arial">Characteristic
names</font></a></h2>
<p><font face="Arial">The question mark that can be
omitted from those DSSSL characteristic names that end
with a question mark. This is because the question mark
is not (and cannot reasonably be made) a legal XML name
character. </font></p>
<p><a href="#top"><font face="Arial"><img
src="images/top-of-page.gif" alt="Up" border="0"
width="11" height="15"></font></a><a href="#top"><font
size="2" face="Arial">Back to top</font></a><font
size="2" face="Arial"> </font><font face="Arial"> </font></p>
</td>
</tr>
</table>
</div>
</body>
</html>
|