~ubuntu-branches/ubuntu/trusty/openjade1.3/trusty

« back to all changes in this revision

Viewing changes to docsrc/openjade.1

  • Committer: Bazaar Package Importer
  • Author(s): Yann Dirson
  • Date: 2002-04-09 00:01:50 UTC
  • Revision ID: james.westby@ubuntu.com-20020409000150-r9rkyalxlhvf9ba3
Tags: upstream-1.3.1
ImportĀ upstreamĀ versionĀ 1.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.\"Generated by db2man.xsl. Don't modify this, modify the source.
 
2
.de Sh \" Subsection
 
3
.br
 
4
.if t .Sp
 
5
.ne 5
 
6
.PP
 
7
\fB\\$1\fR
 
8
.PP
 
9
..
 
10
.de Sp \" Vertical space (when we can't use .PP)
 
11
.if t .sp .5v
 
12
.if n .sp
 
13
..
 
14
.de Ip \" List item
 
15
.br
 
16
.ie \\n(.$>=3 .ne \\$3
 
17
.el .ne 3
 
18
.IP "\\$1" \\$2
 
19
..
 
20
.TH "OPENJADE" 1 "January 2002" "OpenJade" ""
 
21
.SH NAME
 
22
openjade \- apply a DSSSL stylesheet to an SGML or XML document
 
23
.SH "SYNOPSIS"
 
24
 
 
25
.nf
 
26
\fBopenjade\fR [\fB-vCegG2s\fR] [\fB-b \fIencoding\fR\fR] [\fB-f \fIerror_file\fR\fR]
 
27
         [\fB-c \fIcatalog_sysid\fR\fR] [\fB-D \fIdir\fR\fR] [\fB-a \fIlink_type\fR\fR]
 
28
         [\fB-A \fIarch\fR\fR] [\fB-E \fImax_errors\fR\fR] [\fB-i \fIentity\fR\fR]
 
29
         [\fB-w \fIwarning_type\fR\fR] [\fB-d \fIdsssl_spec\fR\fR] [\fB-V \fIvariable\fB=\fIvalue\fR\fR\fR\fR]
 
30
         [\fB-t \fIoutput_type\fR\fR] [\fB-o \fIoutput_file\fR\fR] [\fB\fIsysid\fR\fR...]
 
31
        
 
32
.fi
 
33
 
 
34
.SH "DESCRIPTION"
 
35
 
 
36
.PP
 
37
\fBopenjade\fR is an implementation of the ISO/IEC 10179:1996 standard DSSSL language. The DSSSL engine receives as input an SGML or XML document and transforms it into formats like:
 
38
 
 
39
.PP
 
40
* XML representation of the flow object tree.
 
41
 
 
42
.PP
 
43
* RTF format that can be rendered and printed with Microsoft's free Word Viewer 97
 
44
 
 
45
.PP
 
46
* TeX format
 
47
 
 
48
.PP
 
49
* MIF format that can be rendered and printed with Framemaker
 
50
 
 
51
.PP
 
52
* SGML or XML format. This is used in conjunction with non-standard flow object classes to generate SGML, thus allowing \fBopenjade\fR to be used for SGML/XML transformations.
 
53
 
 
54
.PP
 
55
The system identifier of the document to be processed is specified as an argument to \fBopenjade\fR. If this is omitted, standard input will be read.
 
56
 
 
57
.PP
 
58
\fBopenjade\fR determines the system identifier for the DSSSL specification as follows:
 
59
 
 
60
.PP
 
61
1. If the -d option is specified, it will use the argument as the system identifier.
 
62
 
 
63
.PP
 
64
2. Otherwise, it will look for processing instructions in the prolog of the document. Two kinds of processing instruction are recognized:
 
65
 
 
66
.PP
 
67
<?stylesheet href="sysid" type="text/dsssl">
 
68
 
 
69
.PP
 
70
The system data of the processing instruction is parsed like an SGML start-tag. It will be parsed using the reference concrete syntax whatever the actual concrete syntax of the document. The name that starts the processing instruction can be either stylesheet, xml-stylesheet or xml:stylesheet. The processing instruction will be ignored unless the value of the type attribute is one of text/dsssl, text/x-dsssl, application/dsssl, or application/x-dsssl. The value of href attribute is the system identifier of the DSSSL specification.
 
71
 
 
72
.PP
 
73
<?dsssl sysid>
 
74
 
 
75
.PP
 
76
The system identifier is the portion of the system data of the processing instruction following the initial name and any whitespace.
 
77
 
 
78
.PP
 
79
Although the processing instruction is only recognized in the prolog, it need not occur in the document entity. For example, it could occur in a DTD. The system identifier will be interpreted relative to where the the processing instruction occurs.
 
80
 
 
81
.PP
 
82
3. Otherwise, it will use the system identifier of the document with any extension changed to .dsl.
 
83
 
 
84
.PP
 
85
A DSSSL specification document can contain more than one style-specification. If the system identifier of the DSSSL specification is followed by #id, then \fBopenjade\fR will use the style-specification whose unique identifier is id. This is allowed both with the \fB-d\fR option and with the processing instructions.
 
86
 
 
87
.PP
 
88
The DSSSL specification must be an SGML document conforming to the DSSSL architecture. For an example, see \fIdsssl/demo.dsl\fR.
 
89
 
 
90
.PP
 
91
\fBopenjade\fR supports the following options in addition to the normal OpenSP (see \fBonsgmls(1)\fR) options (note that all options are case-sensitive, ie \fB-g\fR and \fB-G\fR are different options):
 
92
 
 
93
.TP
 
94
\fB-d \fIdsssl_spec\fR\fR
 
95
This specifies that dsssl_spec is the system identifier of the DSSSL specification to be used.
 
96
 
 
97
.TP
 
98
\fB-G\fR
 
99
Debug mode. When an error occurs in the evaluation of an expression, \fBopenjade\fR will display a stack trace. Note that this disables tail-call optimization.
 
100
 
 
101
.TP
 
102
\fB-c \fIfilename\fR\fR
 
103
The filename arguments specify catalog files rather than the document entity. The document entity is specified by the first DOCUMENT entry in the catalog files.
 
104
 
 
105
.TP
 
106
\fB-s\fR
 
107
Strict compliance mode. Currently the only effect is that jade doesn't use any predefined character names, sdata-entity mappings or name-characters. This is useful for checking that your stylesheet is portable to other DSSSL implementations and that it is strictly compliant to the DSSSL specifications.
 
108
 
 
109
.TP
 
110
\fB-t \fIoutput_type\fR\fR
 
111
\fIoutput_type\fR specifies the type of output as follows:
 
112
 
 
113
\fBfot \fR An XML representation of the flow object tree
 
114
 
 
115
\fBrtf\fR \fBrtf-95 \fR RTF (used for SGML/XML to RTF transformations) Microsoft's Rich Text Format. rtf-95 produces output optimized for Word 95 rather than Word 97.
 
116
 
 
117
\fBtex\fR TeX (used for SGML/XML to TeX transformations)
 
118
 
 
119
\fBsgml\fR \fBsgml-raw\fR SGML (used for SGML/XML to SGML transformations). sgml-raw doesn't emit linebreaks in tags.
 
120
 
 
121
\fBxml\fR \fBxml-raw\fR XML (used for SGML/XML to XML transformations). xml-raw doesn't emit linebreaks in tags.
 
122
 
 
123
\fBhtml \fR HTML (used for SGML/XML to HTML transformations)
 
124
 
 
125
\fBmif\fR MIF (used for SGML/XML to MIF transformations)
 
126
 
 
127
.TP
 
128
\fB-o \fIoutput_file\fR\fR
 
129
Write output to \fIoutput_file\fR instead of the default. The default filename is the name of the last input file with its extension replaced by the name of the type of output. If there is no input filename, then the extension is added onto jade-out.
 
130
 
 
131
.TP
 
132
\fB-V \fIvariable\fR\fR
 
133
This is equivalent to doing (define variable #t) except that this definition will take priority over any definition of variable in a style-sheet.
 
134
 
 
135
.TP
 
136
\fB-V \fIvariable=value\fR\fR
 
137
This is equivalent to doing (define \fIvariable\fR "\fIvalue\fR") except that this definition will take priority over any definition of variable in a style-sheet.
 
138
 
 
139
.TP
 
140
\fB-V (define \fIvariable\fR value)\fR
 
141
This is equivalent to doing (define variable value) except that this definition will take priority over any definition of variable in a style-sheet. Note that you will probably have to use some escaping mechanism for the spaces to get the entire scheme expression parsed as one cmdline argument.
 
142
 
 
143
.TP
 
144
\fB-w\fItype\fR\fR
 
145
Control warnings and errors. Multiple \fB-w\fR options are allowed. The following values of type enable warnings:
 
146
 
 
147
\fBxml\fR Warn about constructs that are not allowed by XML.
 
148
 
 
149
\fBmixed\fR Warn about mixed content models that do not allow #pcdata anywhere.
 
150
 
 
151
\fBsgmldecl\fR Warn about various dubious constructions in the SGML declaration.
 
152
 
 
153
\fBshould\fR Warn about various recommendations made in ISO 8879 that the document does not comply with. (Recommendations are expressed with ``should'', as distinct from requirements which are usually expressed with ``shall''.)
 
154
 
 
155
\fBdefault\fR Warn about defaulted references.
 
156
 
 
157
\fBduplicate\fR Warn about duplicate entity declarations.
 
158
 
 
159
\fBundefined\fR Warn about undefined elements: elements used in the DTD but not defined.
 
160
 
 
161
\fBunclosed\fR Warn about unclosed start and end-tags.
 
162
 
 
163
\fBempty\fR Warn about empty start and end-tags.
 
164
 
 
165
\fBnet\fR Warn about net-enabling start-tags and null end-tags.
 
166
 
 
167
\fBmin-tag\fR Warn about minimized start and end-tags. Equivalent to combination of unclosed, empty and net warnings.
 
168
 
 
169
\fBunused-map\fR Warn about unused short reference maps: maps that are declared with a short reference mapping declaration but never used in a short reference use declaration in the DTD.
 
170
 
 
171
\fBunused-param\fR Warn about parameter entities that are defined but not used in a DTD. Unused internal parameter entities whose text is INCLUDE or IGNORE won't get the warning.
 
172
 
 
173
\fBnotation-sysid\fR Warn about notations for which no system identifier could be generated.
 
174
 
 
175
\fBall\fR Warn about conditions that should usually be avoided (in the opinion of the author). Equivalent to: mixed, should, default, undefined, sgmldecl, unused-map, unused-param, empty and unclosed.
 
176
 
 
177
A warning can be disabled by using its name prefixed with no-. Thus \fB-wall\fR \fB-wno-duplicate\fR will enable all warnings except those about duplicate entity declarations.
 
178
 
 
179
The following values for \fIwarning_type\fR disable errors:
 
180
 
 
181
\fBno-idref\fR Do not give an error for an ID reference value which no element has as its ID. The effect will be as if each attribute declared as an ID reference value had been declared as a name.
 
182
 
 
183
\fBno-significant\fR Do not give an error when a character that is not a significant character in the reference concrete syntax occurs in a literal in the SGML declaration. This may be useful in conjunction with certain buggy test suites.
 
184
 
 
185
\fBno-valid\fR Do not require the document to be type-valid. This has the effect of changing the SGML declaration to specify VALIDITY NOASSERT and IMPLYDEF ATTLIST YES ELEMENT YES. An option of \fB-wvalid\fR has the effect of changing the SGML declaration to specify VALIDITY TYPE and IMPLYDEF ATTLIST NO ELEMENT NO. If neither \fB-wvalid\fR nor \fB-wno-valid\fR are specified, then the VALIDITY and IMPLYDEF specified in the SGML declaration will be used.
 
186
 
 
187
.SH "ENVIRONMENT"
 
188
 
 
189
.PP
 
190
OpenJade ignores the SP_CHARSET_FIXED and SP_SYSTEM_CHARSET environment variables and always uses Unicode as its internal character set, as if SP_CHARSET_FIXED was 1 and SP_SYSTEM_CHARSET was unset. Thus only the SP_ENCODING environment variable is relevant to OpenJade's handling of character sets.
 
191
 
 
192
.SH "OPENJADE EXTENSIONS"
 
193
 
 
194
.PP
 
195
The following external procedures are available. These external procedures are defined by a prototype in the same manner as in the standard. To use one of these external procedures, you must make use of the standard external-procedure procedure, using a public identifier of "UNREGISTERED::James Clark//Procedure::name" where name is the name given here, typically by including the following in the DSSSL specification:
 
196
 
 
197
.PP
 
198
(define name (external-procedure "UNREGISTERED::James Clark//Procedure::name"))
 
199
 
 
200
.PP
 
201
Note that external-procedure returns #f if it doesn't know about the specified public identifier. You can use this to enable your DSSSL specifications to work gracefully with other implementations which do not support these extensions.
 
202
 
 
203
.PP
 
204
For external procedures added by the OpenJade team, use a public identifier of the form "UNREGISTERED::OpenJade//Procedure::name".
 
205
 
 
206
.PP
 
207
An easy way to get access to all external procedures is to use the style specification dsssl/extensions.dsl#procedures. The file dsssl/extensions.dsl also contains style specifications which make the nonstandard flow object classes and inherited characteristics supported by the backends available in a convenient way.
 
208
 
 
209
.PP
 
210
\fBDebugging\fR
 
211
 
 
212
.PP
 
213
(debug obj)
 
214
 
 
215
.PP
 
216
Generates a message including the value of obj and then returns obj.
 
217
 
 
218
.PP
 
219
\fBSimple-page-sequence header/footer control\fR
 
220
 
 
221
.PP
 
222
(if-first-page sosofo1 sosofo2)
 
223
 
 
224
.PP
 
225
This can be used only in the specification of the value of one of the header/footer characteristics of simple-page-sequence. It returns a sosofo that will display as sosofo1 if the page is the first page of the simple-page-sequence and as sosofo2 otherwise.
 
226
 
 
227
.PP
 
228
(if-front-page sosofo1 sosofo2)
 
229
 
 
230
.PP
 
231
This can be used only in the specification of the value of one of the header/footer characteristics of simple-page-sequence. It returns a sosofo that will display as sosofo1 if the page is a front (ie recto, odd-numbered) page and as sosofo2 if it is a back (ie verso, even-numbered) page.
 
232
 
 
233
.PP
 
234
\fBNumbering\fR
 
235
 
 
236
.PP
 
237
(all-element-number)
 
238
 
 
239
.PP
 
240
(all-element-number osnl)
 
241
 
 
242
.PP
 
243
This is the same as element-number except it counts elements with any generic identifier. If osnl is not an element returns #f, otherwise returns 1 plus the number of elements that started before osnl. This provides an efficient way of creating a unique identifier for any element in a document.
 
244
 
 
245
.PP
 
246
\fBExternal entity access\fR
 
247
 
 
248
.PP
 
249
(read-entity string)
 
250
 
 
251
.PP
 
252
This returns a string containing the contents of the external entity with system identifier string. This should be used only for textual entities (CDATA and SDATA), and not for binary entities (NDATA).
 
253
 
 
254
.PP
 
255
\fBPOSIX locale access\fR
 
256
 
 
257
.PP
 
258
(language lang country)
 
259
 
 
260
.PP
 
261
This procedure returns an object of type language, if the system supports the specified language. lang is a string or symbol giving the two letter language code. country is a string or symbol giving the two letter country code.
 
262
 
 
263
.PP
 
264
This procedure uses POSIX locales. It is an OpenJade addition. It is not supported on all operating systems.
 
265
 
 
266
.PP
 
267
\fBExtended standard procedures\fR
 
268
 
 
269
.PP
 
270
(sgml-parse sysid #!key active: parent: architecture:)
 
271
 
 
272
.PP
 
273
This allows you to specify an SGML architecture with respect to which the document should be parsed. It is an OpenJade addition.
 
274
 
 
275
.PP
 
276
(expt q k)
 
277
 
 
278
.PP
 
279
This allows you to raise a quantity to an integral power. It is an OpenJade addition.
 
280
 
 
281
.SH "LIMITATIONS"
 
282
 
 
283
.PP
 
284
This section describes the limitations of the front-end (the general-purpose DSSSL engine); each backend also has its own limitations.
 
285
 
 
286
.PP
 
287
\fBopenjade\fR doesn't allow internal definitions at the beginning of bodies and the (test => recipient) variant of cond clauses.
 
288
 
 
289
.PP
 
290
\fBopenjade\fR supports only a single, fixed grove plan which comprises the following modules:
 
291
 
 
292
.PP
 
293
* baseabs
 
294
 
 
295
.PP
 
296
* prlgabs0
 
297
 
 
298
.PP
 
299
* prlgabs1
 
300
 
 
301
.PP
 
302
* instabs
 
303
 
 
304
.PP
 
305
* basesds0
 
306
 
 
307
.PP
 
308
* instsds0
 
309
 
 
310
.PP
 
311
* subdcabs
 
312
 
 
313
.PP
 
314
It doesn't implement the following parts of SDQL: HyTime support, auxiliary parsing, node regular expressions.
 
315
 
 
316
.PP
 
317
Query rules, sosofo synchronization, indirect sosofos, reference values, decoration areas and font properties are not supported.
 
318
 
 
319
.PP
 
320
Note that only inherited characteristics that are applicable to some supported flow object can be specified.
 
321
 
 
322
.PP
 
323
\fBCharacter/glyph handling\fR
 
324
 
 
325
.PP
 
326
It only supports a single pre-defined character repertoire. A character name of the form U-XXXX where XXXX are four upper-case hexadecimal digits, is recognized as referring to the Unicode character with that code. For many characters, it is also possible to use the ISO/IEC 10646 name in lower-case with words separated by hyphens.
 
327
 
 
328
.PP
 
329
Some common SDATA entity names from the ISO entity sets are recognized and mapped to characters. In addition an SDATA entity name of the form U-XXXX, where XXXX are four upper-case hexadecimal digits, is mapped to the Unicode character with that code.
 
330
 
 
331
.PP
 
332
OpenJade now supports the standard-chars, map-sdata-entity, add-name-chars, add-separator-chars and char-repertoire declaration element forms, allowing a style-sheet to define additional character names, sdata entity mappings, name characters (i.e. characters allowed in identifiers) and separator characters. Currently the only recognized character repertoire is the built-in repertoire. It has the public identifier "UNREGISTERED::OpenJade//Character Repertoire::OpenJade".
 
333
 
 
334
.PP
 
335
\fBValidation\fR
 
336
 
 
337
.PP
 
338
Several things that it would be desirable to have checked aren't checked:
 
339
 
 
340
.PP
 
341
* When the allowed value of an inherited characteristic is a symbol, OpenJade checks only that the value is a symbol that is allowed as the value of some characteristic; #t and #f are treated as a special kind of symbol in this case.
 
342
 
 
343
.PP
 
344
* OpenJade doesn't check whether a flow object is occurring in a context where it is allowed.
 
345
 
 
346
.PP
 
347
* OpenJade does not prevent flow objects being attached to the principal port of a flow object when the flow object shouldn't have a principal port.
 
348
 
 
349
.PP
 
350
* Most type-checking is done at run-time not compile-time.
 
351
 
 
352
.PP
 
353
* OpenJade does not check for non-inherited characteristics that are required to be specified.
 
354
 
 
355
.PP
 
356
* It doesn't check that optional features that have been used were declared in the features form.
 
357
 
 
358
.PP
 
359
\fBOther limitations\fR
 
360
 
 
361
.PP
 
362
The following primitives are just stubs:
 
363
 
 
364
.PP
 
365
\fBchar-script-case\fR Always returns last argument.
 
366
 
 
367
.PP
 
368
\fBaddress-visited?\fR Always returns #f.
 
369
 
 
370
.SH "EXAMPLES"
 
371
 
 
372
.PP
 
373
Given an SGML file \fBfile.sgml\fR, use the stylesheet \fBfile.dsl\fR and publish as an rtf file.
 
374
 
 
375
.PP
 
376
openjade -t rtf file.sgml
 
377
 
 
378
.PP
 
379
Using a different stylesheet:
 
380
 
 
381
.PP
 
382
openjade -t rtf -d docbook.dsl file.sgml
 
383
 
 
384
.PP
 
385
Using the \fBprint\fR style specification contained within the stylesheet
 
386
 
 
387
.PP
 
388
openjade -t rtf -d docbook.dsl#print file.sgml
 
389
 
 
390
.PP
 
391
And use the html specification within the style sheet to convert to html
 
392
 
 
393
.PP
 
394
openjade -t sgml -i html -d docbook.dsl#html file.sgml
 
395
 
 
396
.SH "SEE ALSO"
 
397
 
 
398
.PP
 
399
\fBonsgmls(1)\fR
 
400
 
 
401
.SH AUTHORS
 
402
James Clark, Ian Castle <ian.castle@looksystems.co.uk>.