1ONSGMLS(1) Reference ONSGMLS(1)
2
3
4
6 onsgmls - An SGML/XML parser and validator
7
9 onsgmls [-BCdeghlnpRrsuvx] [-alinktype] [-Aarchitecture] [-bbctf]
10 [-csysid...] [-Ddirectory] [-Emax_errors] [-ffile] [-iname]
11 [-ooutput_option...] [-tfile] [-wwarning_type...] [sysid...]
12
14 onsgmls parses and validates the SGML document whose document entity is
15 specified by the system identifiers
16
17 and prints on the standard output a simple text representation of its
18 Element Structure Information Set. (This is the information set which
19 a structure-controlled conforming SGML application should act upon.)
20 If more than one system identifier is specified, then the
21 corresponding entities will be concatenated to form the document
22 entity. Thus the document entity may be spread among several files;
23 for example, the SGML declaration, prolog and document instance set
24 could each be in a separate file. If no system identifiers are
25 specified, then onsgmls will read the document entity from the
26 standard input. A command line system identifier of - can be used to
27 refer to the standard input. (Normally in a system identifier, <OSFD>0
28 is used to refer to standard input.)
29
30 Part of an SGML System Conforming to International Standard ISO 8879 --
31 Standard Generalized Markup Language. An SGML Extended Facilities
32 system conforming to Annex A of Internal Standard ISO/IEC 10744 --
33 Hypermedia/Time-based Structuring Language
34
35 The following options are available:
36
37 -alinktype, --activate=linktype
38 Make link type linktype active. Not all ESIS information is output
39 in this case: the active LPDs are not explicitly reported, although
40 each link attribute is qualified with its link type name; there is
41 no information about result elements; when there are multiple link
42 rules applicable to the current element, onsgmls always chooses the
43 first.
44
45 -Aarchitecture, --architecture=architecture
46 Parse with respect to architecture architecture.
47
48 -bbctf, --bctf=bctf, -bencoding, --encoding=encoding
49 This determines the encoding used for output. If in fixed character
50 set mode it specifies the name of an encoding; if not, it specifies
51 the name of a BCTF.
52
53 -B, --batch_mode
54 Batch mode. Parse each
55
56 specified on the command line separately, rather than concatenating
57 them. This is useful mainly with -s.
58
59 If -tfilename is also specified, then the specified filename will
60 be prefixed to the sysid to make the filename for the RAST result
61 for each sysid.
62
63 -csysid, --catalog=sysid
64 Map public identifiers and entity names to system identifiers using
65 the catalog entry file whose system identifier is sysid. Multiple
66 -c options are allowed. If there is a catalog entry file called
67 catalog in the same place as the document entity, it will be
68 searched for immediately after those specified by -c.
69
70 -C, --catalogs
71 The
72
73 arguments specify catalog files rather than the document entity.
74 The document entity is specified by the first DOCUMENT entry in
75 the catalog files.
76
77 -Ddirectory, --directory=directory
78 Search directory for files specified in system identifiers.
79 Multiple -D options are allowed. See the description of the osfile
80 storage manager for more information about file searching.
81
82 -e, --open-entities
83 Describe open entities in error messages. Error messages always
84 include the position of the most recently opened external entity.
85
86 -Emax_errors, --max-errors=max_errors
87 onsgmls will exit after max_errors errors. If max_errors is 0,
88 there is no limit on the number of errors. The default is 200.
89
90 -ffile, --error-file=file
91 Redirect errors to file. This is useful mainly with shells that do
92 not support redirection of stderr.
93
94 -g, --open-elements
95 Show the generic identifiers of open elements in error messages.
96
97 -h, --help
98 Show a help message and exit.
99
100 -iname, --include=name
101 Pretend that
102
103 <!ENTITY % name "INCLUDE">
104
105 occurs at the start of the document type declaration subset in the
106 SGML document entity. Since repeated definitions of an entity are
107 ignored, this definition will take precedence over any other
108 definitions of this entity in the document type declaration.
109 Multiple -i options are allowed. If the SGML declaration replaces
110 the reserved name INCLUDE then the new reserved name will be the
111 replacement text of the entity. Typically the document type
112 declaration will contain
113
114 <!ENTITY % name "IGNORE">
115
116 and will use %name; in the status keyword specification of a marked
117 section declaration. In this case the effect of the option will be
118 to cause the marked section not to be ignored.
119
120 -n, --error-numbers
121 Show message numbers in error messages.
122
123 -ooutput_option, --option=output_option
124 Output additional information according to output_option:
125
126 entity Output definitions of all general entities not just for data
127 or subdoc entities that are referenced or named in an ENTITY or
128 ENTITIES attribute.
129
130 id Distinguish attributes whose declared value is ID.
131
132 line Output L commands giving the current line number and filename.
133
134 included Output an i command for included sub-elements.
135
136 empty Output an e command for elements which are not allowed to
137 have an end-tag, that is those with a declared content of empty or
138 with a content reference attribute.
139
140 notation-sysid Output an f command before an N command, if a system
141 identifier could be generated for that notation.
142
143 nonsgml In fixed character set mode, output \% escape sequences for
144 non-SGML data characters. Non-SGML data characters can result from
145 numeric character references.
146
147 data-attribute Output the notation name and attributes for DATA
148 attributes. Otherwise, DATA attributes are treated like CDATA
149 attributes. For more details see clause 4.4.3 of Annex K of ISO
150 8879.
151
152 comment Output an _ command with the contents of a comment.
153 Multiple comments in a single comment declaration will result in
154 multiple distinct _ commands, just as if the comments were each in
155 a separate comment declaration.
156
157 omitted Output an o command before a command which was implied by
158 the input document, but omitted from the actual markup. This
159 currently affects (,), and A commands.
160
161 tagomit As omitted, but only for ( and ) commands.
162
163 attromit As omitted, but only for A commands.
164
165 Multiple -o options are allowed.
166
167 -p, --only-prolog
168 Parse only the prolog. onsgmls will exit after parsing the
169 document type declaration. Implies -s.
170
171 -R, --restricted
172 Restrict file reading. This option is intended for use with
173 onsgmls-based Web tools (e.g. CGI scripts) to prevent reading of
174 arbitrary files on the Web server. With this option enabled,
175 onsgmls will not read any local files unless they are located in a
176 directory (or subdirectory) specified by the -D option or included
177 in the SGML_SEARCH_PATH environment variable. As a further security
178 precaution, this option limits filesnames to the characters A-Z,
179 a-z, 0-9, ´?´, ´.´, ´_´, ´-´ and does not allow filenames
180 containing "..". On systems with MS-DOS file names ´:´ and ´\´ are
181 also allowed.
182
183 -s, --no-output
184 Suppress output. Error messages will still be printed.
185
186 -tfile, --rast-file=file
187 Output to file the RAST result as defined by ISO/IEC 13673:1995
188 (actually this isn´t quite an IS yet; this implements the
189 Intermediate Editor´s Draft of 1994/08/29, with changes to
190 implement ISO/IEC JTC1/SC18/WG8 N1777). The normal output is not
191 produced.
192
193 -v, --version
194 Print the version number.
195
196 -wtype, --warning=type
197 Control warnings and errors. Multiple -w options are allowed. The
198 following values of type enable warnings:
199
200 xml Warn about constructs that are not allowed by XML.
201
202 mixed Warn about mixed content models that do not allow #PCDATA
203 anywhere.
204
205 sgmldecl Warn about various dubious constructions in the SGML
206 declaration.
207
208 should Warn about various recommendations made in ISO 8879 that the
209 document does not comply with. (Recommendations are expressed with
210 "should", as distinct from requirements which are usually expressed
211 with "shall".)
212
213 default Warn about defaulted references.
214
215 duplicate Warn about duplicate entity declarations.
216
217 undefined Warn about undefined elements: elements used in the DTD
218 but not defined.
219
220 unclosed Warn about unclosed start and end-tags.
221
222 empty Warn about empty start and end-tags.
223
224 net Warn about net-enabling start-tags and null end-tags.
225
226 min-tag Warn about minimized start and end-tags. Equivalent to
227 combination of unclosed, empty and net warnings.
228
229 unused-map Warn about unused short reference maps: maps that are
230 declared with a short reference mapping declaration but never used
231 in a short reference use declaration in the DTD.
232
233 unused-param Warn about parameter entities that are defined but not
234 used in a DTD. Unused internal parameter entities whose text is
235 INCLUDE or IGNORE won´t get the warning.
236
237 notation-sysid Warn about notations for which no system identifier
238 could be generated.
239
240 all Warn about conditions that should usually be avoided (in the
241 opinion of the author). Equivalent to: mixed, should, default,
242 undefined, sgmldecl, unused-map, unused-param, empty and unclosed.
243
244 immediate-recursion Warn about immediately recursive elements. For
245 more detais see clause 2.2.5 of Annex K of ISO 8879.
246
247 fully-declared Warn if the document instance fails to be fully
248 declared. This has the effect of changing the SGML declaration to
249 specify IMPLYDEF ATTLIST NO ELEMENT NO ENTITY NO NOTATION NO. For
250 more details see clause 2.2.1 of Annex K of ISO 8879.
251
252 fully-tagged Warn if the document instance fails to be
253 fully-tagged. This has the effect of changing the SGML declaration
254 to specify DATATAG NO, RANK NO, OMITTAG NO, SHORTTAG STARTTAG EMPTY
255 NO and SHORTTAG ATTRIB OMITNAME NO. For more details see clause
256 2.2.2 of Annex K of ISO 8879.
257
258 amply-tagged, amply-tagged-recursive Warn if the doucment instance
259 fails to be amply-tagged. Implicitly defined elements may be
260 immediately recurisve if amply-tagged-recursive is specified. This
261 has the effect of changing the SGML declaration to specify DATATAG
262 NO, RANK NO, OMITTAG NO, SHORTTAG ATTRIB OMITNAME NO and either
263 IMPLYDEF ELEMENT ANYOTHER or IMPLYDEF ELEMENT YES. For more details
264 see clause 2.2.4 of Annex K of ISO 8879.
265
266 type-valid Warn if the document instance fails to be type-valid.
267 This has the effect of changing the SGML declaration to specify
268 VALIDITY YES. For more details see clause 2.2.3 of Annex K of ISO
269 8879.
270
271 entity-ref Warn about references to non-predefined entities. This
272 has the effect of changing the SGML declaration to specify ENTITIES
273 REF NONE. For more details see clause 2.3.2 of Annex K of ISO 8879.
274
275 external-entity-ref Warn about references to external entities.
276 This includes references to an external DTD subset. This has the
277 effect of changing the SGML declaration to specify ENTITIES REF
278 INTERNAL. For more details see clause 2.3.3 of Annex K of ISO 8879.
279
280 integral Warn if the document instance is not integrally stored.
281 This has the effect of changing the SGML declaration to specify
282 ENTITIES INTEGRAL YES. For more details see clause 2.3.1 of Annex K
283 of ISO 8879.
284
285 A warning can be disabled by using its name prefixed with no-. Thus
286 -wall -wno-duplicate will enable all warnings except those about
287 duplicate entity declarations.
288
289 The following values for warning_type disable errors:
290
291 no-idref Do not give an error for an ID reference value which no
292 element has as its ID. The effect will be as if each attribute
293 declared as an ID reference value had been declared as a name.
294
295 no-significant Do not give an error when a character that is not a
296 significant character in the reference concrete syntax occurs in a
297 literal in the SGML declaration. This may be useful in conjunction
298 with certain buggy test suites.
299
300 no-valid Do not require the document to be type-valid. This has the
301 effect of changing the SGML declaration to specify VALIDITY
302 NOASSERT and IMPLYDEF ATTLIST YES ELEMENT YES. An option of -wvalid
303 has the effect of changing the SGML declaration to specify VALIDITY
304 TYPE and IMPLYDEF ATTLIST NO ELEMENT NO. If neither -wvalid nor
305 -wno-valid are specified, then the VALIDITY and IMPLYDEF specified
306 in the SGML declaration will be used.
307
308 no-afdr Do not give errors when AFDR meta-DTD notation features are
309 used in the DTD. These errors are normally produced when parsing
310 the DTD, but suppressed when parsing meta-DTDs.
311
312 -x, --references
313 Show information about relevant clauses (from ISO 8879:1986) in
314 error messages.
315
316 The following options are also supported for backward compatibility
317 with sgmls:
318
319 -d
320 Same as -wduplicate.
321
322 -l
323 Same as -oline.
324
325 -msysid
326 Same as -c.
327
328 -r
329 Same as -wdefault.
330
331 -u
332 Same as -wundef.
333
335 ospent(1), ospam(1), onsgmlnorm(1), osx(1)
336
338 James Clark
339 Author.
340
341 Ian Castle <ian.castle@openjade.org>
342 Author.
343
345OpenSP November 2002 ONSGMLS(1)