[Home] [By Thread] [By Date] [Recent Entries]


At 11:20 AM -0500 10/30/02, Seairth Jacobs wrote:


>But all that presuposes that the parser will be encountering these parts of
>XML.  As I mentioned, if the parser will never encounter a particular part
>of XML, then it should be okay to leave that code out.  For instance, if a
>parser handles only "standalone" documents, why should it need code to handl
>DTDs?

Because standalone documents can contain DTDs in the internal DTD subset.

>I absolutely agree that a parser should not ignore parts of the XML
>spec that it will encounter, but that is not what I said above.

You never know at compile time what documents you or may not 
encounter. Just because the spec says a SOAP request can't contain a 
processing instruction or a document type declaration doesn't mean 
one won't.

In order to be a conformant XML parser, a parser must adhere to the 
minimum requirements of XML 1.0. It is not enough to work correctly 
for only some subset of well-formed XML 1.0 documents.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@m... | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|          XML in a  Nutshell, 2nd Edition (O'Reilly, 2002)          |
|              http://www.cafeconleche.org/books/xian2/              |
|  http://www.amazon.com/exec/obidos/ISBN%3D0596002920/cafeaulaitA/  |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
+----------------------------------+---------------------------------+

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member