• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem when trying to use TransformerFactory.newTemplates().

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?

 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ajit Amitav Das wrote: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.



That's saying something about the contents of that file, namely that it doesn't declare a namespace for the "xsl" prefix.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic