XPath has no syntax for defining variables. That's left to the environment
in which the XPath is being invoked.

If you're using XPaths within XSLT, XSLT does have a syntax for defining
variables/parameters.

If you're invoking XPaths directly, you need to look at the APIs to see if
they provide a way to set variables before running the XPath. I don't think
our XPathAPI class currently provides an easy way to do that; this might be
a worthwhile enhancement to request. For now you may be stuck with
manipulating the lower-level classes, in particular building a
VariableStack and setting that into the XPathContext before executing the
path expression.

______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
"The world changed profoundly and unpredictably the day Tim Berners Lee
got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk

Reply via email to