Hi All,
I am facing the following problem when trying to use TransformerFactory.newTemplates(). Please find below the issue description:
Line 1.TransformerFactory factory = TransformerFactory.newInstance();
Line 2.Source strSource = new StreamSource(file);
Line 3.Templates templates = factory.newTemplates(strSource);
At line 3, I am getting templates as null. Also in the console of my Eclipse, I am getting the following error:
Fatal Error abc.xsl:4:33: The prefix "xsl" for element "xsl:template" is not bound.
file:///F:/workspace/PDFKARA/VSPDF/bin/abc.xsl; Line #4; Column #33; org.xml.sax.SAXParseException: The prefix "xsl" for element "xsl:template" is not bound.
Note: I have the following jar files in my lib folder related to XML:
a.)xalan 2.4.1.jar
b.)xml-apis.jar
c.)xercesImpl-2.2.1.jar
Please could you help?