Title: Message
Saxon will probably expect the parameter to be a DOM node so you can use DOMWriter (in org.dom4j.io) to create a W3C DOM node.
 
e.g.
 
Document doc = ...;
 
DOMWriter writer = new DOMWriter();
org.w3c.dom.Document domDoc = writer.write ( doc );
 
 
You can also use a DOMDocumentFactory (in org.dom4j.dom) to create dom4j documents which are also W3C DOM trees as well - though this DOM implementation still needs a bit more work to be fully conformant so the above is probably the safest option for now.

James
----- Original Message -----
Sent: Friday, April 12, 2002 11:15 PM
Subject: [dom4j-user] Passing parameters to xslt

I need to pass a dom4J Document to an xslt transformation as an xslt parameter.  I'm using Saxon.  Does anyone know if I can just pass the dom4J Document object  using Transformer.setParameter() from TrAX, or do I have to convert it into a w3c DOM first?
 
Also, how do I convert a dom4j Document into a w3c DOM?

Reply via email to