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

Re: JSR 206 and SAX


206 sax
> So just recently, when Michael Glavassevich pointed out[1] on the
> sax-devel list why the extension framework is insufficient for our
> needs, I became deeply concerned.

I don't know that I agree with all of Michael's points. He refers to SAX not
accepting the Namespace errata-- I think it does accept it-- it just doesn't
like it [1]:

"Some SAX2 parsers may support using an optional feature flag
(http://xml.org/sax/features/xmlns-uris) to request that those attributes be
given URIs, conforming to a later backwards-incompatible revision of that
recommendation. (The attribute's "local name" will be the prefix, or the
empty string when defining a default element namespace.) For portability,
handler code should always resolve that conflict, rather than requiring
parsers that can change the setting of that feature flag."

From this I see two approaches-- legislate that the feature must allow
"true", or simply provide a filter for producing patching the events from a
parser, which should be a snap (albeit adding overhead).

The QName wording is easily changed to allow the reporting of 1.0 or 1.1
QNames. This appears to only affect the Attributes, Attributes2 and
startElement/endElement definitions. Even elsewhere (such as DeclHandler)
the wording about allowable names is not version specific. The harm in
allowing a wider range of values comes when you consider downstream XML
writers... which may assume version 1.0. This would be problematic if they
were passed a 1.1 style name and output blindly expecting 1.0.

The wording for getXMLVersion would need to be updated as well.

To be honest, I think that the minimal victory is to finalize the SAX specs
as they are (or simply change the qName wording and getXMLVersion wording).
If they were finalized as is, JAXP could add a feature which permitted the
use of 1.1 names. The feature mechanism is perfect for this. Of course then
you would need to seek out support for that feature from all of the usual
suspects... but JAXP would technically be 1.1 compliant and could be
finished before such support was in the market. Xerces and AElfred2 would
likely support the feature.

Just some thoughts..

Jeff Rafter


[1] http://www.saxproject.org/apidoc/org/xml/sax/Attributes.html


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.