Re: XMLReaderFactory.createXMLReader()
Elliotte Rusty Harold <[email protected]> Mon, 26 Apr 2004 15:35:44 -0400
| Newsgroups | gmane.text.xml.sax.devel |
|---|---|
| Message-ID | <p06010201bcb3148a9c43@[192.168.254.88]> |
At 1:57 PM -0400 4/26/04, David Megginson wrote: >Elliotte Harold wrote: > >> The failure of the no-args version of >>XMLReaderFactory.createXMLReader() has long been a problem for >>users. Parser vendors are supposed to rewrite this method so that >>it works with their parser. In practice they don't. This patch >>fixes that problem in two ways: >> 1. It modifies the JavaDoc to make it blindingly obvious that >>parser vendors are expected to rewrite this method and rewrite the >>class. >> 2. It changes the default implementation so that if the parser >>vendor does not rewrite this method, and none of the usual >>mechanisms for finding parsers succeed, then it attempts to load >>one of nine known parser classes whose names are hard coded into >>the source. If the user has some common parser somewhere in their >>classpath, this method will now find it, even if no META-INFO or >>system properties have been set. > >I'll add this one to the post-release queue as well. > If you want to add the code that searches for the known parsers to post-release queue, that's fine. However, we really, really need to update the JavaDoc to leave no doubt that vendors are expected to modify this class before shipping SAX with their product. There's just been too much trouble with this in the past, including some who thought that it was wrong to modify the source code of a standard API. The current comment in the source code is too obscure. We need to smack people in the face with this. -- Elliotte Rusty Harold [email protected] Effective XML (Addison-Wesley, 2003) http://www.cafeconleche.org/books/effectivexml http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA ------------------------------------------------------- This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek For a limited time only, get FREE Ground shipping on all orders of $35 or more. Hurry up and shop folks, this offer expires April 30th! http://www.thinkgeek.com/freeshipping/?cpg=12297 _______________________________________________ List: sax-devel, [email protected] See: http://www.saxproject.org/ https://lists.sourceforge.net/lists/listinfo/sax-devel