Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] Custom XPath functions

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Guilherme Germoglio" <germoglio AT gmail.com>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: [XOM-interest] Custom XPath functions
  • Date: Fri, 15 Sep 2006 16:04:45 -0300

Hello,

I'm planning to start a project that should use XOM to process XML. However
a must use customized XPath functions in this project.

I've searched for some information about custom XPath functions in XOM and
didn't find anything. Since XOM uses Jaxen for XPath processing, I looked
into adding custom functions to it and actually is quite easy to do so
(simply by getting the org.jaxen.XPathFunctionContext used and registering a
new Function on it).

However, the JaxenConnector class instead of using a singleton
XPathFunctionContext - that could be provided through
XPathFunctionContext.getInstance() and be able to be obtained the same
instance all over the code in order to customize it -, it creates a new one,
what makes more difficult for customization.

So, my question is: Is there any reason to create a new XPathFunctionContext
in JaxenConnector or I can modify it in order to use the singleton pattern
without any side-effects?

Thank you,
Guilherme




Archive powered by MHonArc 2.6.24.

Top of Page