|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
S9APIXpath and namespaces and variablesHi,
I am trying to
improve performance of my app by using the saxon API on JDOM documents rather
than JAXEN.
In the
process I have a number of questions?
1) Do I need
to explicitly set up namespace context?
2) If I do
when should I do it? Can it be done before the load of the compiled
xpath?
3) When do I
set up variables? Can I do this before the load()?
The reason
for wanting to do this before the load is that I want to reduce the amount of
setup for each new XPATH as I have literally hundreds to process against the
same document with the same namespace and variable contexts?
Martin
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ saxon-help@... https://lists.sourceforge.net/lists/listinfo/saxon-help |
|
|
Re: S9APIXpath and namespaces and variablesNamespaces and variables both need to be declared (on the
XPathCompiler) before the XPath expression is compiled. You can reuse the
XPathCompiler to compile many XPath expressions, and its state (including
declared variables and namespaces) is retained between
compilations.
Value for variables need to be set up on the XPathSelector
before the expression is evaluated. You can reuse the XPathSelector (and it
retains the variable values) provided that you don't try to use it concurrently
in different threads.
Hope this answers the question!
Michael Kay
http://www.saxonica.com/
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ saxon-help@... https://lists.sourceforge.net/lists/listinfo/saxon-help |
| Free Forum Powered by Nabble | Forum Help |