[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XPathEvaluator in SAXON?

Subject: Re: XPathEvaluator in SAXON?
From: Liu Shuai <shuai@xxxxxxxxxxxxxxxxx>
Date: Wed, 05 Mar 2003 12:08:02 -0500
xpathexpress query
Michael Kay wrote:

What I was looking for is some class that takes in a Docment object and a XPathExpress object, then evaluate the document against the xpath and then return a collection of matching Node objects, sothat I can change the value of the nodes and save them back to the document file.



Saxon's two native tree implementations (the standard tree and the tiny tree) are both read-only - they are designed for XSLT processing, where node-level updates are not a requirement, and making the structures read-only allows higher XSLT performance.

Yes, I can understand that.
The reason I wanted to do that is because I want to use xslt to manage the xml content in addtion to just display it.
Since it's really easy to "query" a xml file using a xpath expression, it will be handy that I can update the value in the result nodes and then save the document.



The only mutable tree structure that Saxon supports is the JDOM structure.

I believe that some Saxon users have written drivers that allow Saxon to
be used with third-party DOM implementations, but there's no such driver
included with the product.


Great, but how do I specify which implementaion to use?


In the case of JDOM, you build the tree using JDOM interfaces.


In the case of Saxon's two tree implementations, you can control it
using a property of the TransformerFactory.

I will give that a try.
Thank you for your help.
LS


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.