Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] xerces version problems with XML1_0ParserConfiguration

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • To: Wolfgang Hoschek <whoschek AT lbl.gov>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] xerces version problems with XML1_0ParserConfiguration
  • Date: Mon, 2 Feb 2004 17:38:44 -0500

In d23, nu.xom.xerces.XML1_0ParserConfiguration throws exceptions (see below) on older xerces versions such as xerces-2.3.0 because certain methods or fields are missing there. It works fine with xerces-2.6.1.

One would hope that people have that latest xerces version, but in servlet containers and other deployed middleware one cannot assume that, because often the xerces version gets automatically "inherited" from the whatever the container ships with. Since these old xerces versions don't implement xml 1.1 anyway, I think xom should silently ignore the exception with try-catch and just move on undisturbed.


That's a reasonable idea. Let me see if I can implement it. You should note though, that every version of Xerces prior to 2.6.1 has noticeable bugs in XML parsing and other areas. It's completely possible you won't trip over any of those bugs, but it is something to be aware of.

Hmm, OK I looked at the problem. It's trickier than I thought. The XML1_0ParserConfiguration.parse method is not a no-op. It returns something, and I'm not sure how to do that with an earlier version of Xerces. Possibly I need to check the Xerces version and only set the property in the first place if it's 2.5 or later or some such. (Does anyone happen to know the first version of Xerces to turn on XML 1.1 by default?) Or I may just have to work my way back through the Xerces CVS tree to see what the code looked like in 2.3. I'll add it to the TODO list. It may be a few a while before I can get to it though.
--

Elliotte Rusty Harold
elharo AT metalab.unc.edu
Effective XML (Addison-Wesley, 2003)
http://www.cafeconleche.org/books/effectivexml
http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA




Archive powered by MHonArc 2.6.24.

Top of Page