Re: Article: "The horror of XML"
From: "Elliotte Rusty Harold" <elharo@m...> > > At 10:26 AM -0500 10/30/02, Seairth Jacobs wrote: > > >2) I see no problem with having a parser that ignores portions of XML spec > >if it will never encounter those portions, such as DTDs or PIs (CDATA in his > >example). He claims this would cause interoperability issues. Where and > >How? > > It depends on what you mean by "ignore". If they simply don't report > them to the client app that's one thing. However, they are absolutely > required to read processing instructions and the document type > declaration and report any well-formedness errors in these > constructs. A parser that does not do this is not an XML parser. I > have seen more than one parser vendor try to leave this required > functionality out of their toolkit. > > With regard to the internal DTD subset, it goes a little further. > Even at the minimum conformance level, parsers are required to apply > default attribute values and expand internal entity references > declared in the internal DTD subset, at least up to the first > external entity they don't resolve. Parsers that don't do this can > cause real interoperability problems. 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? 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. --- Seairth Jacobs seairth@s...
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format