[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: The subsetting has begun


from 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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.