r11859: Canonicalize whitespace
[xmlutils.git] / pxml.htm
1 <html>
2
3 <head>
4 <title>A Lisp Based XML Parser</title>
5 <meta name="GENERATOR" content="Microsoft FrontPage 3.0">
6 </head>
7
8 <body>
9
10 <p><strong><big><big>A Lisp Based XML Parser</big></big></strong></p>
11
12 <p><a href="#intro">Introduction/Simple Example</a><br>
13 <a href="#lxml">LXML parse output format</a><br>
14 <a href="#props">parse-xml non-validating parser properties</a><br>
15 <a href="#modern">case and international character support issues</a><br>
16 <a href="#keyword">parse-xml and packages</a><br>
17 <a href="#namespace">parse-xml, the XML Namespace specification, and packages</a><br>
18 <a href="#unicode-scalar">ACL does not support Unicode 4 byte scalar values</a><br>
19 <a href="#big-endian">only little-endian Unicode tested in ACL 6.0 beta</a><br>
20 <a href="#debug">debugging aids</a><br>
21 <a href="#conformance">XML Conformance test results</a><br>
22 <a href="#build">Compiling and Loading the parser</a><br>
23 <a href="#reference">parse-xml reference</a></p>
24
25 <p><a name="intro"></a>The <strong>parse-xml </strong>generic function processes XML
26 input, returning a list of XML tags,<br>
27 attributes, and text. Here is a simple example:<br>
28 <br>
29 (parse-xml &quot;&lt;item1&gt;&lt;item2 att1='one'/&gt;this is some
30 text&lt;/item1&gt;&quot;)<br>
31 <br>
32 --&gt;<br>
33 <br>
34 ((item1 ((item2 att1 &quot;one&quot;)) &quot;this is some text&quot;))<br>
35 <br>
36 The output format is known as LXML format.<br>
37 <br>
38 <a name="lxml"></a><strong>LXML Format</strong><br>
39 <br>
40 LXML is a list representation of XML tags and content.<br>
41 <br>
42 Each list member may be:<br>
43 <br>
44 a. a string containing text content, such as &quot;Here is some text with a &quot;<br>
45 <br>
46 b. a list representing a XML tag with associated attributes and/or content,
47 such as ('item1 &quot;text&quot;) or (('item1 :att1 &quot;help.html&quot;)
48 &quot;link&quot;). If the XML tag
49 does not have associated attributes, then the first list member will be a
50 symbol representing the XML tag, and the other elements will
51 represent the content, which can be a string (text content), a symbol (XML
52 tag with no attributes or content), or list (nested XML tag with
53 associated attributes and/or content). If there are associated attributes,
54 then the first list member will be a list containing a symbol
55 followed by two list members for each associated attribute; the first member is a
56 symbol representing the attribute, and the next member is a string corresponding
57 to the attribute value.<br>
58 <br>
59 c. XML comments and or processing instructions - see the more detailed example below for
60 further information.</p>
61
62 <p><a name="props"></a><strong>Non Validating Parser Properties</strong></p>
63
64 <p>Parse-xml is a non-validating XML parser. It will detect non-well-formed XML input.
65 When<br>
66 processing valid XML input, parse-xml will optionally produce the same output as a
67 validating <br>
68 parser would, including the processing of an external DTD subset and external entity
69 declarations.<br>
70 <br>
71 By default, parse-xml outputs a DTD parse along with the parsed XML contents. The DTD
72 parse may<br>
73 be optionally suppressed. The following example shows DTD parsed output components:</p>
74
75 <p>(defvar *xml-example-external-url*<br>
76 &nbsp;&nbsp; &quot;&lt;!ENTITY ext1 'this is some external entity %param1;'&gt;&quot;)<br>
77 <br>
78 (defun example-callback (var-name token &amp;optional public)<br>
79 &nbsp; (declare (ignorable token public))<br>
80 &nbsp; (setf var-name (uri-path var-name))<br>
81 &nbsp; (if* (equal var-name &quot;null&quot;) then nil<br>
82 &nbsp;&nbsp;&nbsp; else<br>
83 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (let ((string (eval (intern var-name (find-package
84 :user)))))<br>
85 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (make-string-input-stream string))))<br>
86 <br>
87 (defvar *xml-example-string*<br>
88 &quot;&lt;?xml version='1.0' encoding='utf-8'?&gt;<br>
89 &lt;!-- the following XML input is well-formed but its validity has not been checked ...
90 --&gt;<br>
91 &lt;?piexample this is an example processing instruction tag ?&gt;<br>
92 &lt;!DOCTYPE example SYSTEM '*xml-example-external-url*' [<br>
93 &nbsp;&nbsp; &lt;!ELEMENT item1 (item2* | (item3+ , item4))&gt;<br>
94 &nbsp;&nbsp; &lt;!ELEMENT item2 ANY&gt;<br>
95 &nbsp;&nbsp; &lt;!ELEMENT item3 (#PCDATA)&gt;<br>
96 &nbsp;&nbsp; &lt;!ELEMENT item4 (#PCDATA)&gt;<br>
97 &nbsp;&nbsp; &lt;!ATTLIST item1<br>
98 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; att1 CDATA #FIXED 'att1-default'<br>
99 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; att2 ID #REQUIRED<br>
100 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; att3 ( one | two | three ) 'one'<br>
101 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; att4 NOTATION ( four | five ) 'four' &gt;<br>
102 &nbsp;&nbsp; &lt;!ENTITY % param1 'text'&gt;<br>
103 &nbsp;&nbsp; &lt;!ENTITY nentity SYSTEM 'null' NDATA somedata&gt;<br>
104 &nbsp;&nbsp; &lt;!NOTATION notation SYSTEM 'notation-processor'&gt;<br>
105 &nbsp;&nbsp; ]&gt;<br>
106 &lt;item1 att2='1'&gt;&lt;item3&gt;&amp;ext1;&lt;/item3&gt;&lt;/item1&gt;&quot;)<br>
107 <br>
108 (pprint (parse-xml *xml-example-string* :external-callback 'example-callback))<br>
109 <br>
110 --&gt;<br>
111 <br>
112 ((:xml :version &quot;1.0&quot; :encoding &quot;utf-8&quot;)<br>
113 &nbsp; (:comment &quot; the following XML input is well-formed but may or may not be valid
114 &quot;)<br>
115 &nbsp; (:pi :piexample &quot;this is an example processing instruction tag &quot;)<br>
116 &nbsp; (:DOCTYPE :example<br>
117 &nbsp;&nbsp;&nbsp; (:[ (:ELEMENT :item1 (:choice (:* :item2) (:seq (:+ :item3) :item4))) <br>
118 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (:ELEMENT :item2 :ANY)<br>
119 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (:ELEMENT :item3 :PCDATA) (:ELEMENT :item4
120 :PCDATA)<br>
121 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (:ATTLIST item1 (att1 :CDATA :FIXED
122 &quot;att1-default&quot;) (att2 :ID :REQUIRED)<br>
123 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (att3
124 (:enumeration :one :two :three) &quot;one&quot;) <br>
125 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (att4 (:NOTATION
126 :four :five) &quot;four&quot;))<br>
127 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (:ENTITY :param1 :param &quot;text&quot;) <br>
128 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (:ENTITY :nentity :SYSTEM &quot;null&quot;
129 :NDATA :somedata)<br>
130 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (:NOTATION :notation :SYSTEM
131 &quot;notation-processor&quot;))<br>
132 &nbsp;&nbsp;&nbsp; (:external (:ENTITY :ext1 &quot;this is some external entity
133 text&quot;)))<br>
134 &nbsp;&nbsp; ((item1 att1 &quot;att1-default&quot; att2 &quot;1&quot; att3 &quot;one&quot;
135 att4 &quot;four&quot;) <br>
136 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (item3 &quot;this is some external entity
137 text&quot;)))<br>
138 <br>
139 <br>
140 <strong><big>Usage Notes</big></strong><br>
141 <br>
142 <ol>
143 <li><a name="modern"></a>The parse-xml function has been primarily compiled and tested in a
144 modern ACL. However, in an ANSI Lisp with wide character support, it DOES pass the valid
145 component of the conformance suite in the same manner as it does in a Modern Lisp. The
146 parser's successful operation in all potential situations depends on wide character support.
147 <br><br>
148 </li>
149 <li><a name="keyword"></a>The parser uses the keyword package for DTD tokens and other
150 special XML tokens. Since element and attribute token symbols are usually interned
151 in the current package, it is not recommended to execute parse-xml
152 when the current package is the keyword package.
153 <br><br>
154 </li>
155 <li><a name="namespace"></a>The XML parser supports the XML Namespaces specification. The
156 parser recognizes a &quot;xmlns&quot; attribute and attribute names starting with
157 &quot;xmlns:&quot;.
158 As per the specification, the parser expects that the associated value
159 is an URI string. The parser then associates XML Namespace prefixes with a
160 Lisp package provided via the parse-xml :uri-to-package option or, if
161 necessary, a package created on the fly. The following example demonstrates
162 this behavior:<br>
163
164 <p>(setf *xml-example-string4*<br>
165 &nbsp;&nbsp; &quot;&lt;bibliography<br>
166 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmlns:bib='http://www.bibliography.org/XML/bib.ns'<br>
167 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmlns='urn:com:books-r-us'&gt;<br>
168 &nbsp;&nbsp; &lt;bib:book owner='Smith'&gt;<br>
169 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;bib:title&gt;A Tale of Two Cities&lt;/bib:title&gt;<br>
170 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;bib:bibliography<br>
171 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmlns:bib='http://www.franz.com/XML/bib.ns'<br>
172 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmlns='urn:com:books-r-us'&gt;<br>
173 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;bib:library branch='Main'&gt;UK
174 Library&lt;/bib:library&gt;<br>
175 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;bib:date calendar='Julian'&gt;1999&lt;/bib:date&gt;<br>
176 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/bib:bibliography&gt;<br>
177 &nbsp;&nbsp; &lt;bib:date calendar='Julian'&gt;1999&lt;/bib:date&gt;<br>
178 &nbsp;&nbsp; &lt;/bib:book&gt;<br>
179 &lt;/bibliography&gt;&quot;)<br>
180 <br>
181 (setf *uri-to-package* nil)<br>
182 (setf *uri-to-package*<br>
183 &nbsp;&nbsp; (acons (parse-uri <a href="http://www.bibliography.org/XML/bib.ns">&quot;http://www.bibliography.org/XML/bib.ns&quot;</a>)<br>
184 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (make-package &quot;bib&quot;) *uri-to-package*))<br>
185 (setf *uri-to-package*<br>
186 &nbsp;&nbsp; (acons (parse-uri <a href="http://www.bibliography.org/XML/bib.ns">&quot;</a>urn:com:books-r-us<a
187 href="http://www.bibliography.org/XML/bib.ns">&quot;</a>)<br>
188 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (make-package &quot;royal&quot;) *uri-to-package*))<br>
189 (setf *uri-to-package*<br>
190 &nbsp;&nbsp; (acons (parse-uri <a href="http://www.bibliography.org/XML/bib.ns">&quot;</a>http://www.franz.com/XML/bib.ns<a
191 href="http://www.bibliography.org/XML/bib.ns">&quot;</a>)<br>
192 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (make-package &quot;franz-ns&quot;) *uri-to-package*))<br>
193 (pprint (multiple-value-list<br>
194 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (parse-xml
195 *xml-example-string4*<br>
196 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :uri-to-package
197 *uri-to-package*)))<br>
198 <br>
199 --&gt;<br>
200 ((((bibliography |xmlns:bib| <a href="http://www.bibliography.org/XML/bib.ns">&quot;http://www.bibliography.org/XML/bib.ns&quot;</a><br>
201 &nbsp;&nbsp;&nbsp;&nbsp; xmlns &quot;urn:com:books-r-us&quot;)<br>
202 &nbsp;&nbsp;&nbsp; &quot;<br>
203 &nbsp;&nbsp;&nbsp; &quot;<br>
204 &nbsp;&nbsp; ((bib::book royal::owner &quot;Smith&quot;) &quot;<br>
205 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot; (bib::title &quot;A Tale of Two
206 Cities&quot;) &quot;<br>
207 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;<br>
208 &nbsp;&nbsp;&nbsp; ((bib::bibliography royal::|xmlns:bib|<br>
209 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;http://www.franz.com/XML/bib.ns&quot; royal::xmlns<br>
210 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;urn:com:books-r-us&quot;)<br>
211 &nbsp;&nbsp;&nbsp;&nbsp; &quot;<br>
212 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot; ((franz-ns::library royal::branch
213 &quot;Main&quot;) &quot;UK Library&quot;) &quot;<br>
214 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot; ((franz-ns::date royal::calendar
215 &quot;Julian&quot;) &quot;1999&quot;) &quot;<br>
216 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;)<br>
217 &nbsp;&nbsp;&nbsp;&nbsp; &quot;<br>
218 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot; ((bib::date royal::calendar
219 &quot;Julian&quot;) &quot;1999&quot;) &quot;<br>
220 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;)<br>
221 &nbsp;&nbsp;&nbsp;&nbsp; &quot;<br>
222 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;))<br>
223 ((#&lt;uri http://www.franz.com/XML/bib.ns&gt; . #&lt;The franz-ns package&gt;)<br>
224 &nbsp; (#&lt;uri urn:com:books-r-us&gt; . #&lt;The royal package&gt;)<br>
225 &nbsp; (#&lt;uri http://www.bibliography.org/XML/bib.ns&gt; . #&lt;The bib package&gt;)))<br>
226 <br>
227 </li>
228 <li>In the absence of XML Namespace attributes, element and attribute symbols are interned
229 in the current package. Note that this implies that attributes and elements referenced
230 in DTD content will be interned in the current package.
231 </li>
232 <li>The parse-xml function has been tested using the OASIS conformance test suite (see
233 details below). The test suite has wide coverage across possible XML and DTD syntax,
234 but there may be some syntax paths that have not yet been tested or completely
235 supported. Here is a list of currently known syntax parsing issues:
236 <ul>
237 <li><a name="unicode-scalar"></a>ACL does not support 4 byte Unicode scalar values, so
238 input containing such data
239 will not be processed correctly. (Note, however, that parse-xml does correctly detect
240 and process wide Unicode input.)
241 </li>
242 <li><a name="big-endian"></a>The OASIS tests that contain wide Unicode all use a
243 little-endian encoded Unicode.
244 Changes to the unicode-check function are required to also support big-endian encoded
245 Unicode. (Note also that this issue may be resolved by an ACL 6.0 final release change.)
246 </li>
247 <li>An initial &lt;?xml declaration in external entity files is skipped without a check
248 being made to see if the &lt;?xml declaration is itself incorrect.
249 </li>
250 </ul>
251 </li>
252 <li><a name="debug"></a>When investigating possible parser errors or examining more closely
253 where the parser
254 determined that the input was non-well-formed, the net.xml.parser internal symbols
255 *debug-xml* and *debug-dtd* are useful. When not bound to nil, these variables cause
256 lexical analysis and intermediate parsing results to be output to *standard-output*.
257 </li>
258 <li><a name="loading"></a>It is necessary to load the <b>pxml</b> module before using it.
259 Typically this can be done by evaluating <b>(require&nbsp;:pxml)</b>.
260 </li>
261 </ol>
262 <a name="conformance"></a><strong>XML Conformance Test Suite</strong><br>
263 <br>
264 Using the OASIS test suite <a href="http://www.oasis-open.org">(http://www.oasis-open.org)</a>,
265 here are the current parse-xml results:<br>
266 <br>
267 xmltest/invalid:&nbsp;&nbsp;&nbsp; Not tested, since parse-xml is a non-validating parser<br>
268 <br>
269 not-wf/<br>
270 <br>
271 &nbsp;&nbsp;&nbsp; ext.sa: 3 tests; all pass<br>
272 &nbsp;&nbsp;&nbsp; not-sa: 8 tests; all pass<br>
273 &nbsp;&nbsp;&nbsp; sa: 186 tests; the following fail:<br>
274 <br>
275 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 170.xml: fails because ACL does not support 4
276 byte Unicode scalar values<br>
277 <br>
278 valid/<br>
279 <br>
280 &nbsp;&nbsp;&nbsp; ext-sa: 14 tests; all pass<br>
281 &nbsp;&nbsp;&nbsp; not-sa: 31 tests; all pass<br>
282 &nbsp;&nbsp;&nbsp; sa: 119 tests: the following fail:<br>
283 <br>
284 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 052.xml, 064.xml, 089.xml: fails because ACL
285 does not support 4 byte <br>
286 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
287 Unicode scalar values<br>
288 <br>
289 <a name="build"></a><big><strong>Compiling and Loading</strong></big><br>
290 <br>
291 Load build.cl into a modern ACL session will result in a pxml.fasl file that can
292 subsequently be<br>
293 loaded in a modern ACL to provide XML parsing functionality.<br>
294 <br>
295 -------------------------------------------------------------------------------------------<br>
296 <br>
297 <a name="reference"></a><big><strong>parse-xml reference</strong></big><br>
298 <br>
299 parse-xml&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Generic
300 function]<br>
301 <br>
302 Arguments: input-source &amp;key external-callback content-only <br>
303 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; general-entities
304 parameter-entities<br>
305 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uri-to-package<br>
306 <br>
307 Returns multiple values:<br>
308 <ol>
309 <li>LXML and parsed DTD output, as described above.</li>
310 <li>An association list containing the uri-to-package argument conses (if any)
311 and conses associated with any XML Namespace packages created during the
312 parse (see uri-to-package argument description, below).</li>
313 </ol>
314 The external-callback argument, if specified, is a function object or symbol
315 that parse-xml will execute when encountering an external DTD subset
316 or external entity DTD declaration. Here is an example which shows that
317 arguments the function should expect, and the value it should return:
318 <br><pre>
319 (defun file-callback (uri-object token &amp;optional public)
320   ;; The uri-object is an ACL URI object created from
321   ;; the XML input. In this example, this function
322   ;; assumes that all uri's will be file specifications.
323   ;;
324   ;; The token argument identifies what token is associated
325   ;; with the external parse (for example :DOCTYPE for external
326   ;; DTD subset
327   ;;
328   ;; The public argument contains the associated PUBLIC string,
329   ;; when present
330   ;;
331   (declare (ignorable token public))
332   ;; An open stream is returned on success,
333   ;; a nil return value indicates that the external
334   ;; parse should not occur.
335   ;; Note that parse-xml will close the open stream before exiting.
336   (ignore-errors (open (uri-path uri-object))))
337 </pre>
338 <p>
339 The general-entities argument is an association list containing general entity symbol
340 and replacement text pairs. The entity symbols should be in the keyword package.
341 Note that this option may be useful in generating desirable parse results in
342 situations where you do not wish to parse external entities or the external DTD subset.
343 <p>
344 The parameter-entities argument is an association list containing parameter entity symbol
345 and replacement text pairs. The entity symbols should be in the keyword package.
346 Note that this option may be useful in generating desirable parse results in
347 situations where you do not wish to parse external entities or the external DTD subset.
348 <p>
349 The uri-to-package argument is an association list containing uri objects and package
350 objects. Typically, the uri objects correspond to XML Namespace attribute values, and
351 the package objects correspond to the desired package for interning symbols associated
352 with the uri namespace. If the parser encounters an uri object not contained in this list,
353 it will generate a new package. The first generated package will be named
354 net.xml.namespace.0,
355 the second will be named net.xml.namespace.1, and so on.
356 <h3>parse-xml methods</h3>
357 <pre>
358 (parse-xml (p stream) &amp;key
359                       external-callback content-only
360                       general-entities
361                       parameter-entities
362                       uri-to-package)
363
364 (parse-xml (str string) &amp;key
365                         external-callback content-only
366                         general-entities
367                         parameter-entities
368                         uri-to-package)
369 </pre>
370 An easy way to parse a file containing XML input:
371 <pre>
372 (with-open-file (p &quot;example.xml&quot;)
373   (parse-xml p :content-only p))
374 </pre>
375 <h3>net.xml.parser unexported special variables:</h3>
376 <p>
377 *debug-xml*<br>
378 <br>
379 When true, parse-xml generates XML lexical state and intermediary
380 parse result debugging output.
381 <p>
382 *debug-dtd*<br>
383 <br>
384 When true, parse-xml generates DTD lexical state and intermediary
385 parse result debugging output.
386 </body>
387 </html>