OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] The subsetting has begun

[ Lists Home | Date Index | Thread Index ]

Jon.Ellis@Sun.COM wrote:

>Mike Champion <mc@xegesis.org> wrote: 
>>--- Evan Lenz <evan@evanlenz.net> wrote:
>>So why do you think they are bothering to implement
>>only a subset if full compliance is "hardly onerous?" 
>Makes you wonder doesn't it ;-)
>The footprint requirements just don't appear allow it. There are more productions to process the DTD than the XML document, and that's before you have to deal with what you find there.
With the advantage of hindsight I think the XML *recommendation* (which 
is all it is, after all - not some form of legally binding definition) 
erred in requiring too much of XML processors. The problem now is that 
many interfaces (especially SAX/SAX2) were designed around the 
recommendation requirements and ignored ways of possibly structuring 
processing to be more modular. In particular, validation and related 
issues could probably be better handled as a layer above the basic 
parser rather than as an integrated part of the parser.

With this type of breakdown it'd be sensible to take *all* the DTD 
processing out of the parser. All a parser would have to do is report 
document type declarations to the application, and make the internal 
subset (if present) available as text. If an application wanted to 
support DTD processing it could add the appropriate layer on top of the 
parser interface (as the equivalent of a SAX filter). The same holds for 
validation. This would have avoided all the problems with different 
levels of validation support using different parsers - just take the 
best parser for your purposes and combine it with the best validator.

This is the approach taken with the XMLPull interface 
(http://www.xmlpull.org), though I don't think anyone has built a higher 
layer on top of it yet to handle DTD processing and/or validation. 
Perhaps something like this should be used as the basis of XML handling 
in J2ME, rather than the SAX-based JAXP. That way applications wanting 
full XML support would be able to get it by layering, which would not be 
possible with the XML-subset JAXP being discussed now (SAX doesn't allow 
the necessary information to be reported to a higher layer, and also 
doesn't allow a higher layer to define entities for the parser to use).

And yes, I see the subsetting as a good thing. For a growing number of 
XML applications DTDs and entity declarations just don't fit (and I say 
this as someone who likes DTDs and uses them often in my own work). 
Rather than throwing tantrums over this evolutionary change in usage the 
XML community would be better off recognizing it and defining an 
approved subset, then pressuring other groups (such as the SOAP 
community) to use that subset. That way at least there's a chance of 
holding the line at *one* standard subset.

  - Dennis


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS