1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
4 <TITLE>Onsgmls Output Format</TITLE>
7 <H1>Onsgmls Output Format</H1>
9 The output is a series of lines.
10 Lines can be arbitrarily long.
11 Each line consists of an initial command character
12 and one or more arguments.
13 Arguments are separated by a single space,
14 but when a command takes a fixed number of arguments
15 the last argument can contain spaces.
16 There is no space between the command character and the first argument.
17 Arguments can contain the following escape sequences:
27 A record end character.
31 Internal SDATA entities are bracketed by these.
33 <CODE>\<VAR>nnn</VAR></CODE>
35 The character whose code is
36 <CODE><VAR>nnn</VAR></CODE>
39 A record start character will be represented by
41 Most applications will need to ignore
47 <CODE>\#<VAR>n</VAR>;</CODE>
49 The character whose number is
50 <CODE><VAR>n</VAR></CODE>
51 decimal in the internal character set.
52 <CODE><VAR>n</VAR></CODE>
53 can have any number of digits.
54 This is used for characters that are not representable by the
55 encoding used for output.
56 This will only occur with the multibyte version of nsgmls.
58 <CODE>\%<VAR>n</VAR>;</CODE>
60 The character whose number is
61 <CODE><VAR>n</VAR></CODE>
62 decimal in the document character set.
63 <CODE><VAR>n</VAR></CODE>
64 can have any number of digits.
65 This is used for data characters resulting from numeric
66 character references to non-SGML characters
67 in <A HREF="charset.htm#fixed">fixed character set mode</A>.
70 The possible command characters and arguments are as follows:
73 <CODE>(<VAR>gi</VAR></CODE>
75 The start of an element whose generic identifier is
76 <CODE><VAR>gi</VAR></CODE>.
77 Any attributes for this element
78 will have been specified with
82 <CODE>)<VAR>gi</VAR></CODE>
84 The end of an element whose generic identifier is
85 <CODE><VAR>gi</VAR></CODE>.
87 <CODE>-<VAR>data</VAR></CODE>
91 <CODE>&<VAR>name</VAR></CODE>
93 A reference to an external data entity
94 <CODE><VAR>name</VAR></CODE>;
95 <CODE><VAR>name</VAR></CODE>
96 will have been defined using an
100 <CODE>?<VAR>pi</VAR></CODE>
102 A processing instruction with data
103 <CODE><VAR>pi</VAR></CODE>.
105 <CODE>A<VAR>name</VAR> <VAR>val</VAR></CODE>
107 The next element to start has an attribute
108 <CODE><VAR>name</VAR></CODE>
110 <CODE><VAR>val</VAR></CODE>
111 which takes one of the following forms:
116 The value of the attribute is implied.
118 <CODE>CDATA <VAR>data</VAR></CODE>
120 The attribute is character data.
121 This is used for attributes whose declared value is
124 <CODE>NOTATION <VAR>nname</VAR></CODE>
126 The attribute is a notation name;
127 <CODE><VAR>nname</VAR></CODE>
128 will have been defined using a
131 This is used for attributes whose declared value is
132 <CODE>NOTATION</CODE>.
134 <CODE>ENTITY <VAR>name...</VAR></CODE>
136 The attribute is a list of general entity names.
137 Each entity name will have been defined using an
143 This is used for attributes whose declared value is
146 <CODE>ENTITIES</CODE>.
148 <CODE>TOKEN <VAR>token...</VAR></CODE>
150 The attribute is a list of tokens.
151 This is used for attributes whose declared value is anything else.
153 <CODE>ID <VAR>token</VAR></CODE>
155 The attribute is an ID value.
156 This will be output only if the
161 will be used for ID values.
164 <CODE>DATA <VAR>nname</VAR> <VAR>data</VAR></CODE>
166 The attribute is character data with an associated notation.
167 The definition of the notation and any applicable attributes of the notation
168 will be given using subsequent <CODE>D<VAR>name</VAR> <VAR>val</VAR></CODE>
169 lines. This is used for attributes whose declared value is <CODE>DATA</CODE>.
170 It will be output only if the <CODE>-odata-attribute</CODE>
171 option is specified. Otherwise <CODE>CDATA</CODE> will be used for DATA values.
176 <CODE>D<VAR>ename</VAR> <VAR>name</VAR> <VAR>val</VAR></CODE>
178 This is the same as the
180 command, except that it specifies a data attribute for an
181 external entity named
182 <CODE><VAR>ename</VAR></CODE>.
185 commands will come after the
187 command that defines the entity to which they apply, but
192 commands that reference the entity.
194 <CODE>a<VAR>type</VAR> <VAR>name</VAR> <VAR>val</VAR></CODE>
196 The next element to start has a link attribute with link type
197 <CODE><VAR>type</VAR></CODE>,
199 <CODE><VAR>name</VAR></CODE>,
201 <CODE><VAR>val</VAR></CODE>,
202 which takes the same form as with the
206 <CODE>N<VAR>nname</VAR></CODE>
208 Define a notation <CODE><VAR>nname</VAR></CODE>.
209 This command will be preceded by a
211 command if the notation was declared with a public identifier,
214 command if the notation was declared with a system identifier.
216 <CODE>-onotation-sysid</CODE>
217 option was specified,
218 this command will also be preceded by an
220 command giving the system identifier generated by the entity manager
221 (unless it was unable to generate one).
222 A notation will only be defined if it is to be referenced
227 command for an attribute with a declared value of
228 <CODE>NOTATION</CODE>.
230 <CODE>E<VAR>ename</VAR> <VAR>typ</VAR> <VAR>nname</VAR></CODE>
232 Define an external data entity named
233 <CODE><VAR>ename</VAR></CODE>
235 <CODE><VAR>typ</VAR></CODE>
236 (<CODE>CDATA</CODE>, <CODE>NDATA</CODE> or <CODE>SDATA</CODE>)
237 and notation <CODE><VAR>not</VAR></CODE>.
238 Thiscommand will be preceded by an
240 command giving the system identifier generated by the entity manager
241 (unless it was unable to generate one),
244 command if a public identifier was declared for the entity,
247 command if a system identifier was declared for the entity.
248 <CODE><VAR>not</VAR></CODE>
249 will have been defined using a
252 Data attributes may be specified for the entity using
256 <CODE>-oentity</CODE>
257 option is not specified,
258 an external data entity will only be defined if it is to be referenced in a
262 command for an attribute whose declared value is
265 <CODE>ENTITIES</CODE>.
267 <CODE>I<VAR>ename</VAR> <VAR>typ</VAR> <VAR>text</VAR></CODE>
269 Define an internal data entity named
270 <CODE><VAR>ename</VAR></CODE>
272 <CODE><VAR>typ</VAR></CODE>
274 <CODE><VAR>text</VAR></CODE>.
276 <CODE><VAR>typ</VAR></CODE>
282 <CODE>-oentity</CODE>
283 option was specified,
284 in which case it can also be
288 (for an SGML text entity).
290 <CODE>-oentity</CODE>
291 option is not specified,
292 an internal data entity will only be defined if it is referenced in an
294 command for an attribute whose declared value is
297 <CODE>ENTITIES</CODE>.
299 <CODE>S<VAR>ename</VAR></CODE>
301 Define a subdocument entity named
302 <CODE><VAR>ename</VAR></CODE>.
303 This command will be preceded by an
305 command giving the system identifier generated by the entity manager
306 (unless it was unable to generate one),
309 command if a public identifier was declared for the entity,
312 command if a system identifier was declared for the entity.
314 <CODE>-oentity</CODE>
315 option is not specified,
316 a subdocument entity will only be defined if it is referenced
322 command for an attribute whose declared value is
325 <CODE>ENTITIES</CODE>.
327 <CODE>T<VAR>ename</VAR></CODE>
329 Define an external SGML text entity named
330 <CODE><VAR>ename</VAR></CODE>.
331 This command will be preceded by an
333 command giving the system identifier generated by the entity manager
334 (unless it was unable to generate one),
337 command if a public identifier was declared for the entity,
340 command if a system identifier was declared for the entity.
341 This command will be output only if the
342 <CODE>-oentity</CODE>
345 <CODE>s<VAR>sysid</VAR></CODE>
347 This command applies to the next
353 command and specifies the associated system identifier.
355 <CODE>p<VAR>pubid</VAR></CODE>
357 This command applies to the next
363 command and specifies the associated public identifier.
365 <CODE>f<VAR>sysid</VAR></CODE>
367 This command applies to the next
372 <CODE>-onotation-sysid</CODE>
373 option was specified,
375 command and specifies the system identifier
376 generated by the entity manager from the specified external identifier
377 and other information about the entity or notation.
379 <CODE>{<VAR>ename</VAR></CODE>
381 The start of the SGML subdocument entity
382 <CODE><VAR>ename</VAR></CODE>;
383 <CODE><VAR>ename</VAR></CODE>
384 will have been defined using a
388 <CODE>}<VAR>ename</VAR></CODE>
390 The end of the SGML subdocument entity
391 <CODE><VAR>ename</VAR></CODE>.
393 <CODE>L<VAR>lineno</VAR> <VAR>file</VAR></CODE>
395 <CODE>L<VAR>lineno</VAR></CODE>
397 Set the current line number and filename.
399 <CODE><VAR>file</VAR></CODE>
400 argument will be omitted if only the line number has changed.
401 This will be output only if the
403 option has been given.
405 <CODE>#<VAR>text</VAR></CODE>
407 An APPINFO parameter of
408 <CODE><VAR>text</VAR></CODE>
409 was specified in the SGML declaration.
410 This is not strictly part of the ESIS, but a structure-controlled
411 application is permitted to act on it.
414 command will be output if
415 <CODE>APPINFO NONE</CODE>
419 command will occur at most once,
420 and may be preceded only by a single
426 This command indicates that the document was a conforming SGML document.
427 If this command is output, it will be the last command.
428 An SGML document is not conforming if it references a subdocument entity
429 that is not conforming.
433 The next element to start is an included subelement.
434 This will be output only if the
435 <CODE>-oincluded</CODE>
440 The next element to start has a declared content of EMPTY or a content
441 reference attribute, and so its end-tag must be omitted.
442 This will be output only if the
446 <CODE>_<VAR>comment</VAR></CODE>
449 <CODE><VAR>comment</VAR></CODE>.
450 This will be output only if the
451 <CODE>-ocomment</CODE>
456 The actual markup for the next
461 command was omitted from the input.
462 This will be output only if one of the
463 <CODE>-oomitted</CODE>,
464 <CODE>-otagomit</CODE>,
466 <CODE>-oattromit</CODE>
467 options is specified.