RE: XPath and XSLT processor

Subject: RE: XPath and XSLT processor
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Fri, 1 Dec 2000 11:06:10 -0000
>   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


Current Thread