TIVI-153: Add as dependency for iputils
[profile/ivi/opensp.git] / doc / sgmlsout.htm
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Strict//EN">
2 <HTML>
3 <HEAD>
4 <TITLE>Onsgmls Output Format</TITLE>
5 </HEAD>
6 <BODY>
7 <H1>Onsgmls Output Format</H1>
8 <P>
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:
18 <DL>
19 <DT>
20 <CODE>\\</CODE>
21 <DD>
22 A
23 <CODE>\</CODE>.
24 <DT>
25 <CODE>\n</CODE>
26 <DD>
27 A record end character.
28 <DT>
29 <CODE>\|</CODE>
30 <DD>
31 Internal SDATA entities are bracketed by these.
32 <DT>
33 <CODE>\<VAR>nnn</VAR></CODE>
34 <DD>
35 The character whose code is
36 <CODE><VAR>nnn</VAR></CODE>
37 octal.
38 <P>
39 A record start character will be represented by
40 <CODE>\012</CODE>.
41 Most applications will need to ignore
42 <CODE>\012</CODE>
43 and translate
44 <CODE>\n</CODE>
45 into newline.
46 <DT>
47 <CODE>\#<VAR>n</VAR>;</CODE>
48 <DD>
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.
57 <DT>
58 <CODE>\%<VAR>n</VAR>;</CODE>
59 <DD>
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>.
68 </DL>
69 <P>
70 The possible command characters and arguments are as follows:
71 <DL>
72 <DT>
73 <CODE>(<VAR>gi</VAR></CODE>
74 <DD>
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
79 <CODE>A</CODE>
80 commands.
81 <DT>
82 <CODE>)<VAR>gi</VAR></CODE>
83 <DD>
84 The end of an element whose generic identifier is
85 <CODE><VAR>gi</VAR></CODE>.
86 <DT>
87 <CODE>-<VAR>data</VAR></CODE>
88 <DD>
89 Data.
90 <DT>
91 <CODE>&amp;<VAR>name</VAR></CODE>
92 <DD>
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
97 <CODE>E</CODE>
98 command.
99 <DT>
100 <CODE>?<VAR>pi</VAR></CODE>
101 <DD>
102 A processing instruction with data
103 <CODE><VAR>pi</VAR></CODE>.
104 <DT>
105 <CODE>A<VAR>name</VAR> <VAR>val</VAR></CODE>
106 <DD>
107 The next element to start has an attribute
108 <CODE><VAR>name</VAR></CODE>
109 with value
110 <CODE><VAR>val</VAR></CODE>
111 which takes one of the following forms:
112 <DL>
113 <DT>
114 <CODE>IMPLIED</CODE>
115 <DD>
116 The value of the attribute is implied.
117 <DT>
118 <CODE>CDATA <VAR>data</VAR></CODE>
119 <DD>
120 The attribute is character data.
121 This is used for attributes whose declared value is
122 <CODE>CDATA</CODE>.
123 <DT>
124 <CODE>NOTATION <VAR>nname</VAR></CODE>
125 <DD>
126 The attribute is a notation name;
127 <CODE><VAR>nname</VAR></CODE>
128 will have been defined using a
129 <CODE>N</CODE>
130 command.
131 This is used for attributes whose declared value is
132 <CODE>NOTATION</CODE>.
133 <DT>
134 <CODE>ENTITY <VAR>name...</VAR></CODE>
135 <DD>
136 The attribute is a list of general entity names.
137 Each entity name will have been defined using an
138 <CODE>I</CODE>,
139 <CODE>E</CODE>
140 or
141 <CODE>S</CODE>
142 command.
143 This is used for attributes whose declared value is
144 <CODE>ENTITY</CODE>
145 or
146 <CODE>ENTITIES</CODE>.
147 <DT>
148 <CODE>TOKEN <VAR>token...</VAR></CODE>
149 <DD>
150 The attribute is a list of tokens.
151 This is used for attributes whose declared value is anything else.
152 <DT>
153 <CODE>ID <VAR>token</VAR></CODE>
154 <DD>
155 The attribute is an ID value.
156 This will be output only if the
157 <CODE>-oid</CODE>
158 option is specified.
159 Otherwise
160 <CODE>TOKEN</CODE>
161 will be used for ID values.
162
163 <DT>
164 <CODE>DATA <VAR>nname</VAR> <VAR>data</VAR></CODE>
165 <DD>
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.
172 <DT>
173
174 </DL>
175 <DT>
176 <CODE>D<VAR>ename</VAR> <VAR>name</VAR> <VAR>val</VAR></CODE>
177 <DD>
178 This is the same as the
179 <CODE>A</CODE>
180 command, except that it specifies a data attribute for an
181 external entity named
182 <CODE><VAR>ename</VAR></CODE>.
183 Any
184 <CODE>D</CODE>
185 commands will come after the
186 <CODE>E</CODE>
187 command that defines the entity to which they apply, but
188 before any
189 <CODE>&amp;</CODE>
190 or
191 <CODE>A</CODE>
192 commands that reference the entity.
193 <DT>
194 <CODE>a<VAR>type</VAR> <VAR>name</VAR> <VAR>val</VAR></CODE>
195 <DD>
196 The next element to start has a link attribute with link type
197 <CODE><VAR>type</VAR></CODE>,
198 name
199 <CODE><VAR>name</VAR></CODE>,
200 and value
201 <CODE><VAR>val</VAR></CODE>,
202 which takes the same form as with the
203 <CODE>A</CODE>
204 command.
205 <DT>
206 <CODE>N<VAR>nname</VAR></CODE>
207 <DD>
208 Define a notation <CODE><VAR>nname</VAR></CODE>.
209 This command will be preceded by a
210 <CODE>p</CODE>
211 command if the notation was declared with a public identifier,
212 and by a
213 <CODE>s</CODE>
214 command if the notation was declared with a system identifier.
215 If the
216 <CODE>-onotation-sysid</CODE>
217 option was specified,
218 this command will also be preceded by an
219 <CODE>f</CODE>
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
223 in an
224 <CODE>E</CODE>
225 command or in an
226 <CODE>A</CODE>
227 command for an attribute with a declared value of
228 <CODE>NOTATION</CODE>.
229 <DT>
230 <CODE>E<VAR>ename</VAR> <VAR>typ</VAR> <VAR>nname</VAR></CODE>
231 <DD>
232 Define an external data entity named
233 <CODE><VAR>ename</VAR></CODE>
234 with type
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
239 <CODE>f</CODE>
240 command giving the system identifier generated by the entity manager
241 (unless it was unable to generate one),
242 by a
243 <CODE>p</CODE>
244 command if a public identifier was declared for the entity,
245 and by a
246 <CODE>s</CODE>
247 command if a system identifier was declared for the entity.
248 <CODE><VAR>not</VAR></CODE>
249 will have been defined using a
250 <CODE>N</CODE>
251 command.
252 Data attributes may be specified for the entity using
253 <CODE>D</CODE>
254 commands.
255 If the
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
259 <CODE>&amp;</CODE>
260 command or in an
261 <CODE>A</CODE>
262 command for an attribute whose declared value is
263 <CODE>ENTITY</CODE>
264 or
265 <CODE>ENTITIES</CODE>.
266 <DT>
267 <CODE>I<VAR>ename</VAR> <VAR>typ</VAR> <VAR>text</VAR></CODE>
268 <DD>
269 Define an internal data entity named
270 <CODE><VAR>ename</VAR></CODE>
271 with type
272 <CODE><VAR>typ</VAR></CODE>
273 and entity text
274 <CODE><VAR>text</VAR></CODE>.
275 The
276 <CODE><VAR>typ</VAR></CODE>
277 will be
278 <CODE>CDATA</CODE>
279 or
280 <CODE>SDATA</CODE>
281 unless the
282 <CODE>-oentity</CODE>
283 option was specified,
284 in which case it can also be
285 <CODE>PI</CODE>
286 or
287 <CODE>TEXT</CODE>
288 (for an SGML text entity).
289 If the
290 <CODE>-oentity</CODE>
291 option is not specified,
292 an internal data entity will only be defined if it is referenced in an
293 <CODE>A</CODE>
294 command for an attribute whose declared value is
295 <CODE>ENTITY</CODE>
296 or
297 <CODE>ENTITIES</CODE>.
298 <DT>
299 <CODE>S<VAR>ename</VAR></CODE>
300 <DD>
301 Define a subdocument entity named
302 <CODE><VAR>ename</VAR></CODE>.
303 This command will be preceded by an
304 <CODE>f</CODE>
305 command giving the system identifier generated by the entity manager
306 (unless it was unable to generate one),
307 by a
308 <CODE>p</CODE>
309 command if a public identifier was declared for the entity,
310 and by a
311 <CODE>s</CODE>
312 command if a system identifier was declared for the entity.
313 If the
314 <CODE>-oentity</CODE>
315 option is not specified,
316 a subdocument entity will only be defined if it is referenced
317 in a
318 <CODE>{</CODE>
319 command
320 or in an
321 <CODE>A</CODE>
322 command for an attribute whose declared value is
323 <CODE>ENTITY</CODE>
324 or
325 <CODE>ENTITIES</CODE>.
326 <DT>
327 <CODE>T<VAR>ename</VAR></CODE>
328 <DD>
329 Define an external SGML text entity named
330 <CODE><VAR>ename</VAR></CODE>.
331 This command will be preceded by an
332 <CODE>f</CODE>
333 command giving the system identifier generated by the entity manager
334 (unless it was unable to generate one),
335 by a
336 <CODE>p</CODE>
337 command if a public identifier was declared for the entity,
338 and by a
339 <CODE>s</CODE>
340 command if a system identifier was declared for the entity.
341 This command will be output only if the
342 <CODE>-oentity</CODE>
343 option is specified.
344 <DT>
345 <CODE>s<VAR>sysid</VAR></CODE>
346 <DD>
347 This command applies to the next
348 <CODE>E</CODE>,
349 <CODE>S</CODE>,
350 <CODE>T</CODE>
351 or
352 <CODE>N</CODE>
353 command and specifies the associated system identifier.
354 <DT>
355 <CODE>p<VAR>pubid</VAR></CODE>
356 <DD>
357 This command applies to the next
358 <CODE>E</CODE>,
359 <CODE>S</CODE>,
360 <CODE>T</CODE>
361 or
362 <CODE>N</CODE>
363 command and specifies the associated public identifier.
364 <DT>
365 <CODE>f<VAR>sysid</VAR></CODE>
366 <DD>
367 This command applies to the next
368 <CODE>E</CODE>,
369 <CODE>S</CODE>,
370 <CODE>T</CODE>
371 or, if the
372 <CODE>-onotation-sysid</CODE>
373 option was specified,
374 <CODE>N</CODE>
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.
378 <DT>
379 <CODE>{<VAR>ename</VAR></CODE>
380 <DD>
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
385 <CODE>S</CODE>
386 command.
387 <DT>
388 <CODE>}<VAR>ename</VAR></CODE>
389 <DD>
390 The end of the SGML subdocument entity
391 <CODE><VAR>ename</VAR></CODE>.
392 <DT>
393 <CODE>L<VAR>lineno</VAR> <VAR>file</VAR></CODE>
394 <DT>
395 <CODE>L<VAR>lineno</VAR></CODE>
396 <DD>
397 Set the current line number and filename.
398 The
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
402 <CODE>-l</CODE>
403 option has been given.
404 <DT>
405 <CODE>#<VAR>text</VAR></CODE>
406 <DD>
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.
412 No
413 <CODE>#</CODE>
414 command will be output if
415 <CODE>APPINFO NONE</CODE>
416 was specified.
417 A
418 <CODE>#</CODE>
419 command will occur at most once,
420 and may be preceded only by a single
421 <CODE>L</CODE>
422 command.
423 <DT>
424 <CODE>C</CODE>
425 <DD>
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.
430 <DT>
431 <CODE>i</CODE>
432 <DD>
433 The next element to start is an included subelement.
434 This will be output only if the
435 <CODE>-oincluded</CODE>
436 option is specified.
437 <DT>
438 <CODE>e</CODE>
439 <DD>
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
443 <CODE>-oempty</CODE>
444 option is specified.
445 <DT>
446 <CODE>_<VAR>comment</VAR></CODE>
447 <DD>
448 A comment with data
449 <CODE><VAR>comment</VAR></CODE>.
450 This will be output only if the
451 <CODE>-ocomment</CODE>
452 option is specified.
453 <DT>
454 <CODE>o</CODE>
455 <DD>
456 The actual markup for the next
457 <CODE>(</CODE>,
458 <CODE>)</CODE>,
459 or
460 <CODE>A</CODE>
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>,
465 or
466 <CODE>-oattromit</CODE>
467 options is specified.
468 </DL>
469 </BODY>
470 </HTML>