Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] XOM 1.1: XPath

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Wolfgang Hoschek <whoschek AT lbl.gov>
  • To: Elliotte Harold <elharo AT metalab.unc.edu>
  • Cc: xom-interest <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] XOM 1.1: XPath
  • Date: Thu, 6 Jan 2005 21:29:43 -0800

On Jan 6, 2005, at 3:28 PM, Elliotte Harold wrote:

Wolfgang Hoschek wrote:

Take JDBC PreparedStatements as an analogy. A query is compiled and optimized once (an expensive process in particular for optimizing engines such as Nux/Saxon), then executed many times, each time with different variables aka parameters. Say variables customerID, SSN, sectionTitle, timeRange, etc. For example, the Nux XQueryPool addresses such usage scenarios in a easy-to-use thread-safe manner.

But you notice I'm not preparing statements. I'm just passing in strings. I think I'll leave such advanced usage to NUX. :-)

Assembling the query via string concatenations of fixed parts and variable parts isn't particularly easy to use, IMHO.

The other aspect is that repetitive query parsing and optimization often takes considerable time which would make XPath navigation less appealing over hand crafted tree navigation code. For example, consider complex queries over many tiny documents. Here, parsing and optimization can be a large fraction of overall execution time. Minimizing XPath/XQuery overhead leads to fewer arguments in favour of manual navigation.

Wolfgang.





Archive powered by MHonArc 2.6.24.

Top of Page