Michael Glavassevich wrote:

That *could* all be done with XMLReader and XMLReaderFactory if standard features and properties were defined, but they're not. Perhaps JAXP 1.3 should have used features and properties but it didn't so the only implementation neutral way of enabling these things is to use SAXParser and SAXParserFactory.

This doesn't have to be done in JAXP or through the JCP. SAX has never been a JCP standard, and there's no particular reason to make it one. It would take about two weeks on sax-dev to define a a few new standard names for features and properties. The feature and property mechanism in SAX is designed precisely to allow such extension without a major revision to the API. All existing parsers will continue to work.

Second, let's realize that cross-implementation compatibility is not a sine qua non. It's nice to have, but it's far from the most important feature. At extremes, the desire for cross-implementation compatibility has led to API disasters like DOM. SAX does a much better job by trying to do less and by restricting itself to Java. SAX actually is a pretty nice cross-implementation API (Some of its design decisions are starting to show their flaws, but not seriously so; and anyway that's a subject for another thread.) However, we do not need to insure that every single parser recognize and support every single feature and property anyone supports.

The simple fact is that most applications stick with one of a very few well-known parsers. It's extremely unusual to encounter any Java developer using any parser other than SAX or Crimson. For the two weeks it would take to define a few new standard features and properties, pretty much everyone who needs standard features and properties could get by using vendor-specific feature/property URIs. Certainly I've never encountered a problem with that. Most of the time if I need anything weird like XInclude or revalidation, my parser choice is so limited that I'm effectively locked into one vendor anyway, regardless of the domain in the URI I use to name the feature.

--
Elliotte Rusty Harold  [EMAIL PROTECTED]
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to