You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Elizabeth Barham <li...@soggytrousers.net> on 2003/08/16 03:46:37 UTC

any xpath tutorials?

Hi Everyone,

   I'm attempting to write a <xalan:component> in Java and I'd like to
pass an XPath for function to evaluate but unfortunately I have not
found too much information regarding working with XPath's in Xalan.

   Does anyone know of a tuturial for this type of thing? I did find
this one:

    http://www.javaworld.com/javaworld/jw-09-2000/jw-0908-xpath_p.html

but its from 2000 so I believe that it does not apply to Xalan-2.

   Basically, I'm having a hard time seeing the big picture with
XPathParser, XObject, xpath.Compiler, etc. All I'm interested in doing
is passing an ExpressionContext, a node-set, two XPath strings, and
one integer into a function. It then evaluates the two XPaths (one
becomes a string and another becomes a nodeset).

   Thank you,
   Elizabeth

Re: any xpath tutorials?

Posted by Joseph Kesselman <ke...@us.ibm.com>.



In most cases, what you'll want to do is just call our XPathAPI (or
XPathAPICached), and let us worry about all the details of translating the
XPath and applying it to the document...

______________________________________
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