This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: XPath and XSLT processor
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: XPath and XSLT processor
- From: Kay Michael <Michael dot Kay at icl dot com>
- Date: Fri, 1 Dec 2000 11:06:10 -0000
- Reply-To: xsl-list at mulberrytech dot com
> Can you give me an example of using XPath with Saxon. There
> was no example with the code I download.
There are some simple examples in the ShowBooks.java program, but for more
complex things, such as setting the namespace context, you'll need to scout
around the API documentation. To get you started:
Expression exp = Expression.make(xpath)
turns a string containing an XPath expression into an Expression object
Expression exp = Expression.make(xpath, staticContext)
allows you to supply a staticContext object which is capable of resolving
namespaces, variable references, etc
Value v = exp.evaluate(context)
evaluates an expression in a specific run-time context. The run-time context
defines the context node, etc.
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list