File: sgml2xml.xml

package info (click to toggle)
docbook2x 0.8.8-18
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,740 kB
  • sloc: xml: 16,229; sh: 3,674; perl: 3,461; ansic: 639; makefile: 409; sed: 11
file content (315 lines) | stat: -rw-r--r-- 11,637 bytes parent folder | download | duplicates (6)
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
<?xml version="1.0"?>
<!-- vim: sw=2 sta et
-->


<!DOCTYPE refentry
  PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
         "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [

  <!ENTITY nsgmls1 "
    <citerefentry>
      <refentrytitle><command>nsgmls</command></refentrytitle>
      <manvolnum>1</manvolnum>
    </citerefentry>">
]>

<refentry>
  <refentryinfo>
    <date>05 July 1999</date>
  </refentryinfo>

  <refmeta>
    <refentrytitle>sgml2xml</refentrytitle>
    <manvolnum>1</manvolnum>
    <refmiscinfo>SP</refmiscinfo>
  </refmeta>
  
  <refnamediv>
    <refname>sgml2xml</refname>
    <refpurpose>convert SGML to XML</refpurpose>
    <refclass>
      An SGML System Conforming to International Standard ISO 8879 &mdash;
      Standard Generalized Markup Language
    </refclass>
  </refnamediv>
  
  <refsynopsisdiv>
    <cmdsynopsis>
      <command>sgml2xml</command>
      <arg choice="opt" rep="norepeat"><option>-Cehilprvx</option></arg>
      <arg choice="opt" rep="norepeat"><option>-b<replaceable>encoding</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-c<replaceable>catalog</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-D<replaceable>dir</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-f<replaceable>file</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-i<replaceable>name</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-w<replaceable>warning</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-x<replaceable>xml-output-option</replaceable></option></arg>
      <arg choice="req" rep="repeat"><replaceable >sysid</replaceable></arg>
    </cmdsynopsis>
  </refsynopsisdiv>
  
  <refsect1>
    <title>Description</title>
    
    <para>
      <command>sgml2xml</command> converts <acronym>SGML</acronym> to 
      <acronym>XML</acronym>. <command>sgml2xml</command> parses and validates
      the SGML document contained in <replaceable>sysid...</replaceable> and 
      writes an equivalent XML document to the standard output.  <command>
      sgml2xml</command> will warn about SGML constructs which have no XML 
      equivalent.
    </para>
  </refsect1>
  
  <refsect1>
    <title>Options</title>
    
    <variablelist>
      <varlistentry>
        <term><option>-b<replaceable>encoding</replaceable></option></term>
        <listitem>
          <para>
            Use <replaceable>encoding</replaceable> for output.  
            The default is UTF-8.  See &nsgmls1; for the possible encoding 
            types.
          </para>
        </listitem>
      </varlistentry>
      
      <varlistentry>
        <term><option>-c<replaceable>catalog</replaceable></option></term>
        <listitem>
          <para>
            Use the catalog entry file <replaceable>file</replaceable>.  
          </para>
        </listitem>
      </varlistentry>
      
      <varlistentry>
        <term><option>-C</option></term>
        <listitem>
          <para>
            The <replaceable>filename...</replaceable> arguments specify 
            catalog files rather than the document entity. The document entity
            is specified by the first <sgmltag>DOCUMENT</sgmltag> entry in the
            catalog files.
          </para>
        </listitem>
      </varlistentry>
      
      <varlistentry>
        <term><option>-D<replaceable>directory</replaceable></option></term>
        <listitem>
          <para>
            Search <replaceable>directory</replaceable> for files specified in
            system identifiers.  Multiple <option>-D</option> options are 
            allowed.  See &nsgmls1; for more information about this option.
          </para>
        </listitem>
      </varlistentry>
      
      <varlistentry>
        <term><option>-e</option></term>
        <listitem>
          <para>Describe open entities in error messages.</para>
        </listitem>
      </varlistentry>
      
      <varlistentry>
        <term><option>-f<replaceable>file</replaceable></option></term>
        <listitem>
          <para>
            Redirect errors to <replaceable>file</replaceable>. 
            This is useful only for shells that do not support redirection 
            of stderr.
          </para>
        </listitem>
      </varlistentry>
      
      <varlistentry>
        <term><option>-i<replaceable>name</replaceable></option></term>
        <listitem>
          <para>
            Pretend that <literal>&lt;!ENTITY % <replaceable>name</replaceable> "INCLUDE"&gt;</literal>

            occurs at the start of the document type declaration subset
            in the SGML document entity. Since repeated definitions of
            an entity are ignored, this definition will take precedence
            over any other definitions of this entity in the document
            type declaration. Multiple <option>-i</option> options are
            allowed.  If the SGML declaration replaces the reserved name
            <sgmltag>INCLUDE</sgmltag> then the new reserved name will
            be the replacement text of the entity.  Typically the
            document type declaration will contain
          
            <literal>&lt;!ENTITY % <replaceable>name</replaceable> "IGNORE"&gt;</literal>
            and will use <sgmltag>%<replaceable>name</replaceable>;</sgmltag>
            
            in the status keyword specification of a marked section
            declaration. In this case the effect of the option will be
            to cause the marked section not to be ignored.
          </para>
        </listitem>
      </varlistentry>
      
      <varlistentry>
        <term><option>-v</option></term>
        <listitem>
          <para>Print the version number.</para>
        </listitem>
      </varlistentry>
      
      <varlistentry>
        <term><option>-w<replaceable>type</replaceable></option></term>
        <listitem>
          <para>
            Control warnings and errors according to 
            <replaceable>type</replaceable>.  See &nsgmls1;
            for the allowed values of <replaceable>type</replaceable>.
          </para>
        </listitem>
      </varlistentry>
      
      <varlistentry>
        <term><option>-x<replaceable>xml-output-option</replaceable></option></term>
        <listitem>
          <para>
            Control the XML output, according to the value of
            <replaceable>xml_output_option</replaceable> as follows:

            <variablelist>
              <varlistentry>
                <term><literal>no-nl-in-tag</literal></term>
                <listitem>
                  <para>
                    Don't use newlines inside start-tags. Usually 
                    <command>sgml2xml</command> uses newlines inside 
                    start-tags so as to reduce the probability of
                    excessively long lines.
                  </para>
                </listitem>
              </varlistentry>
              
              <varlistentry>
                <term><literal>id</literal></term>
                <listitem>
                  <para>
                    Output attribute declarations for <sgmltag>ID</sgmltag>
                    attributes. 
                  </para>
                </listitem>
              </varlistentry>
              
              <varlistentry>
                <term><literal>notation</literal></term>
                <listitem>
                  <para>Output declarations for notations.</para>
                </listitem>
              </varlistentry>
              
              <varlistentry>
                <term><literal>ndata</literal></term>
                <listitem>
                  <para>
                    Output declarations for external data entities. XML 
                    requires these to be <sgmltag>NDATA</sgmltag>. 
                    <command>sgml2xml</command> will warn about 
                    <sgmltag>CDATA</sgmltag> and <sgmltag>SDATA</sgmltag> 
                    external data entities and output them as NDATA entities.
                  </para>
                </listitem>
              </varlistentry>
              
              <varlistentry>
                <term><literal>cdata</literal></term>
                <listitem>
                  <para>
                    Use XML <sgmltag>CDATA</sgmltag> sections for 
                    <sgmltag>CDATA</sgmltag> marked sections and for elements
                    with a declared content of <sgmltag>CDATA</sgmltag>.
                  </para>
                </listitem>
              </varlistentry>
              
              <varlistentry>
                <term><literal>comment</literal></term>
                <listitem>
                  <para>
                    Output comment declarations. Comment declarations in
                    the DTD will not be output.
                  </para>
                </listitem>
              </varlistentry>
              
              <varlistentry>
                <term><literal>lower</literal></term>
                <listitem>
                  <para>
                    Prefer lower case. Names that were subjected to
                    upper-case substitution by SGML will be folded to
                    lower case. This does not include reserved names;
                    XML requires these to be in upper-case.
                  </para>
                </listitem>
              </varlistentry>

              <varlistentry>
                <term><literal>pi-escape</literal></term>
                <listitem>
                  <para>
                    Escape <literal>&amp;&lt;&gt;</literal> in the contents 
                    of processing instructions using the 
                    <sgmltag>amp</sgmltag>, <sgmltag>lt</sgmltag> and
                    <sgmltag>gt</sgmltag> entities.  This allows processing 
                    instructions to contain the string 
                    <literal>&gt;?</literal>, but requires that applications 
                    handle the escapes.
                  </para>
                </listitem>
              </varlistentry>
              
              <varlistentry>
                <term><literal>empty</literal></term>
                <listitem>
                  <para>
                    Use the <markup>&lt;<replaceable>e</replaceable>/&gt;</markup> 
                    syntax for element types <replaceable>e</replaceable> 
                    declared as <sgmltag>EMPTY</sgmltag>.
                  </para>
                </listitem>
              </varlistentry>
              
              <varlistentry>
                <term><literal>attlist</literal></term>
                <listitem>
                  <para>
                    Output a <sgmltag>ATTLIST</sgmltag> declaration for
                    every element specifying the type of all attributes.
                    The default will always be <sgmltag>#IMPLIED</sgmltag>.
                  </para>
                </listitem>
              </varlistentry>
            </variablelist>
          
            Multiple <option>-x</option> options are allowed.
          </para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsect1>
  
  <refsect1>
    <title>Author</title>
    <simpara>James Clark <email>jjc@jclark.com</email></simpara>
  </refsect1>
  
  <refsect1>
    <title>See Also</title>
    
    <simplelist type="vert">
      <member>&nsgmls1;</member>
      <member><filename>/usr/share/doc/sp/sx.htm</filename></member>
    </simplelist>
  </refsect1>
</refentry>