Hello All,
 
I am looking for a solution to get a standard way to pass DOM (Node, Document etc) as param to xsl param.
 
Problem : I have a Dom4j Document Object which I am using to convert to W3C Document object and pass it as a param fro xsl tranformation. Using xalan it works perfactly fine but when I switch to saxon 9 it doesnt work.
 
I tried as below and it worked. But I dont know if this is the strandard  way of handling.
 

                              Object applicationXML = getServletContext().getAttribute("applicationXML"); // Dom4j Document object

String tranformer = System.getProperty("javax.xml.transform.TransformerFactory");
if(tranformer != null && tranformer.equalsIgnoreCase("net.sf.saxon.TransformerFactoryImpl"))
{
       applicationXML = new net.sf.saxon.dom4j.DocumentWrapper((org.dom4j.Document)applicationXML,"", new net.sf.saxon.Configuration());
}
else
{
       applicationXML = DOM4JHelper.getW3CDom((org.dom4j.Document) applicationXML);
}
 
Any suggestions?
 
Thanks
 
Swapnil