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

Re: The subsetting has begun


sax validator
Jeff Rafter wrote:

>>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).
>>
>You make it sound like this isn't possible using SAX when in fact it is very
>possible. But lets suppose you wanted to avoid it anyway and pass the whole
>DTD back to the application-- in many cases this would be a huge burden on
>memory-- which is one of the reason everyone says they can't include the DTD
>parsing logic to begin with.
>
Handling validation as a separate layer is possible with SAX, as you 
point out below. I don't know how it is possible to perform full DTD 
processing as an added layer with the existing SAX interface. SAX could 
certainly be extended to support this, but AFAIK is missing at least two 
necessary mechanism right now (one to pass the internal DTD subset in 
unparsed form, the other to set entity definitions for use by the 
parser). As for memory size of the DTD, it's easy enough to make 
reporting it an option - if an applications wants to process the DTD it 
leaves reporting enabled, if an application doesn't want to it disables 
DTD reporting.

>In GNU JAXP there is a pipeline interface called ValidationConsumer that
>handles DTD validation layered cleanly on top of SAX. So you can apply the
>best validator to the best parser (assuming you are talking the same
>language). Also, I believe RNG has a layered SAX validator. Maybe this
>wasn't the point... but it is layered. The fundamental checks for
>wellformedness however are not-- but SAX was designed for XML 1.0/1.1 there
>should be no surprise that wellformedness is a must for it.
>
ValidationConsumer 
(http://www.gnu.org/software/classpathx/jaxp/apidoc/gnu/xml/pipeline/ValidationConsumer.html) 
looks great - thanks for pointing out this nice piece of work from David 
Brownell! I wasn't aware of anyone handling validation for SAX-based 
parsers as a layer. This still requires the basic DTD processing to be 
done by the parser, though. I'd like to see things taken a step further 
in order to separate the DTD handling completely from the parsing core.

  - Dennis


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.