transform method: Does it do Read only operation on the source?

Prabu <[email protected]> Thu, 11 Nov 2010 05:53:42 +0000 (UTC)
Newsgroups gmane.text.xml.xalan.java.user
Message-ID <[email protected]>
Am using xalan-java to apply xsl rules on xml files. Initially I create 
a DOM node (call it doc) from xml by using the DocumentBuilder. 
My intention is to apply multiple rules on the same xml file
in multiple threads, one thread per rule - I create separate 
Transformer objects in each thread as seen below.

=====Code snippet - Thread's Run method ====

...
...
TransformerFactory tFactory = TransformerFactory.newInstance();            
Transformer transformer = tFactory.newTransformer
                                                        (new StreamSource(ruleLocation));
DOMResult domResult = new DOMResult();
transformer.transform(new DOMSource(doc), domResult);
...
...

==================

In the above code, I want to know whether the transform method
does only read-only operation on the document source "doc".
If it affects the source, then it will not be thread safe to run rules
on the same xml.


--

Thanks,
Prabu D