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] JSR 206 and SAX

[ Lists Home | Date Index | Thread Index ]

> 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





 

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

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