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 15:21:36 -0800

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.

Wolfgang.

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

Wolfgang Hoschek wrote:


Variables are important in practise for flexible usage and reusing compiled queries. I'm using a Map to bind and pass variables.

Can you give an example? I'm inclined to think this is not that common and on the wrong side of 80/20. I rarely use XPath variables myself, and when I do it's almost exclusively in passing parameters to XSLT templates, which doesn't apply here. I can always refer people who need fancier XPaths with variabales and such off to NUX or SAXON.

--
Elliotte Rusty Harold elharo AT metalab.unc.edu
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





Archive powered by MHonArc 2.6.24.

Top of Page