<DIV>Hi all..</DIV>
<DIV>&nbsp;</DIV>
<DIV>With the following code for transforming a xml file to&nbsp;html</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;public Document transform(Document sourceDoc, File stylesheetFile)<BR>&nbsp;{<BR>&nbsp;&nbsp;<BR>&nbsp; // Set up the XSLT stylesheet for use with Xalan-J 2<BR>&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp; TransformerFactory transformerFactory = TransformerFactory.newInstance();<BR>&nbsp; Templates stylesheet = transformerFactory.newTemplates(new StreamSource(stylesheetFile));<BR>&nbsp; Transformer processor = stylesheet.newTransformer();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;//Output the Document to File<BR>&nbsp; FileOutputStream sourceOut = new FileOutputStream(new File("c:\\in.xml"));<BR>&nbsp; XMLOutputter xmlOutputter = new XMLOutputter();<BR>&nbsp; xmlOutputter.output(sourceDoc, sourceOut);<BR>&nbsp; sourceOut.close();<BR>&nbsp;<BR>&nbsp;//Take input Stream<BR>&nbsp; FileInputStream sourceIn = new FileInputStream(new File("c:\\in.xml"));<BR>&nbsp; StreamSource source = new StreamSource(sourceIn);<BR>&nbsp; <BR>&nbsp;//Make Output Stream<BR>&nbsp; FileOutputStream resultOut = new FileOutputStream("c:\\out.html");<BR>&nbsp; StreamResult result = new StreamResult(resultOut);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;// Feed the resultant I/O stream into the XSLT processor<BR>&nbsp;&nbsp; processor.transform(source, result);<BR>&nbsp;&nbsp; resultOut.close();<BR>&nbsp;&nbsp;&nbsp; }</DIV>
<DIV>&nbsp;</DIV>
<DIV>I get this exception</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;A '(' character or an element type is required in the declaration of element type "JavaXML:Title".</DIV>
<DIV>&nbsp;</DIV>
<DIV>But if i am transforming without jdom that is by using org.apache....Process class from console the transformation works fine.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Regards</DIV>
<DIV>Himank Gupta.</DIV><p>
                <hr size=1>Yahoo! for Good<br> 
<a href="http://store.yahoo.com/redcross-donate3/">Click here to donate</a> to the Hurricane Katrina relief effort.