private ByteArrayOutputStream transform(org.w3c.dom.Document domDoc)
throws TransformerException,TransformerConfigurationException
, FileNotFoundException,IOException{
//System.out.println("\nTransforming...");
ConverterInfo ci = pluginFactory.getConverterInfo();
//DOMResult xmlDomResult = new DOMResult();
ByteArrayOutputStream baos= new ByteArrayOutputStream();
try{
DocumentBuilderFactory dFactory = DocumentBuilderFactory.newInstance();
dFactory.setNamespaceAware(true);
DocumentBuilder dBuilder = dFactory.newDocumentBuilder();
String teststr = ci.getXsltSerial();
teststr= teststr.substring(0,6);
org.w3c.dom.Document xslDoc=null;
if ((teststr.equals("http:/"))||(teststr.equals("file:/"))
||(teststr.equals("jar://"))){
System.out.println(ci.getXsltSerial());
xslDoc= dBuilder.parse(ci.getXsltSerial());
}
else{
//System.out.println(ci.getJarName()+"!/"+ci.getXsltSerial());
xslDoc = dBuilder.parse(
"jar:"+ci.getJarName()+"!/"+ci.getXsltSerial());
}
DOMSource xslDomSource = new DOMSource(xslDoc);
DOMSource xmlDomSource = new DOMSource(domDoc);