Hi Han!
It seems your question contains the answer too.
If you want to change DOM, use Xerces DOM. If you need to make
transformations, wrap Xerces DOM into Xalan classes( but Xalan inputs are
always immutable).
If you are changing the XalanNode, you are using internal Xalan API, not
intended for "external" users.
And the result will be unpredictable.
Probably you need a tool supporting XQuery .
Cheers
Dmitry
Han Ming Ong
<[EMAIL PROTECTED]> To:
[email protected]
cc:
07/07/2003 02:54 Subject: Can I change the
nodeset that is returned by Xalan XPath?
AM
Hi all,
I'm new to Xalan-C but have experience in using Xalan-J.
The FAQ says that if I want modify a transformed tree, I would
have
start with a Xerces DOM instead. I'm studying the TransformToXercesDOM
example now.
Actually, I'm only interested in the XPath APIs for now. I
want to use
use XPath to get a certain node and then modify that node's content
model. In the Java API, I deal only with the W3C Node but here I have
to deal with XalanNode and (Xerces') DOMNode. So XalanNode is optimized
for transformation but I can't modify it. So from my basic
understanding, I got to start with the XercesDOMSupport so that the
underlying DOM is Xerces DOM, is that right? BUT if I look at the API
docs for XalanNode, I see methods like insertBefore() etc. So it seems
like I can modify a XalanNode directly...Can I just start with
XalanSourceTreeDOMSupport (XPathWrapper example) and assume that a
XalanNode is modifiable?
How would one make use of XercesElementWrapper, by the way?
I would like to get my bearings right, pointers to other
documents or
explanation are greatly appreciated.
Thank you for your time.