[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: The subsetting has begun
On Fri, 21 Feb 2003 10:13:00 -0500, Elliotte Rusty Harold <elharo@m...> wrote: > > This is not a decision that should be made at the parser level though. > Parsers do need to process documents that contain document type > declarations. No one should ship a parser that simply gives up when it > encounters a document type declaration. I'm not sure what "processing" a DTD means in a technical sense. Accepting the entity declarations, setting the default attribute values, etc. but not enforcing any content model constraints? Or just parsing DTDs and ignoring everthing in there. (IIRC either would be "legal" for a non- validating parser). What would you suggest J2ME parsers do? Perhaps the reasoning for throwing an exception is that processing DTDs but not fully performing all the actions that a validating parser do is an interoperability rathole; better to handle it in a "draconian" fashion rather than raise expectations that cannot be realistically met in the J2ME target environment. (I don't have any knowledge of what is truly realistic or what the target constraints are, but I'll accept on faith that they J2ME folks wouldn't bother subsetting if they didn't see some real technical barrier to full conformance.) Again IIRC from sml-dev days, there are a significant number of MAY clauses in XML 1.0 that define something like 128 permutations of features that a non-validating XML 1.0 parser could support or not support. Empirically this has created interop headaches (entity references being the most notorious). I can, without claiming to know much about the people writing the J2ME spec or the requirements they're operating under, feel sympathy if their intent was to just throw an exception when a user steps into terra incognita rather than trying to provide a detailed map. Channeling my inner newbie, I'd rather get slapped down on line 2 when a DTD reference or subset is rejected than on line 666 when I referenced an entity whose declaration was "processed" but not actually defined by the parser. Conformance to XML 1.0 by J2ME is cold comfort to someone with a bug to fix and an incomprehensible message from the XML library to work with.
|
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
|