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