Altova Mailing List Archives


Re: [xsl] XPathEvaluator in SAXON?

From: Liu Shuai <shuai@----------------->
To:
Date: 3/5/2003 7:05:00 AM
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

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.