Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

style/xslt task problems

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, all I am trying to do is to apply style sheet to an xml file in ant (1.5) as part of my web site build.
The manual says that <xslt> and <style> are the same, but <xslt> is not recognized, so I am doing
<style in="movies.xml"
out="movies.html"
style="movies.xsl"
processor="xalan"/>
First of all it says that xalan is deprecated, then says:
java.lang.NoClassDefFoundError: org/apache/xalan/xslt/XSLTInputSource
And I can't find this class in xalan.jar.
Now when I replace xalan processor with trax I get:
javax.xml.transform.TransformerFactoryConfigurationError: org.apache.xalan.proce
ssor.TransformerFactoryImpl
at javax.xml.transform.TransformerFactory.newInstance(TransformerFactory
.java:94)

This is such a simple thing, and turned out to be such a pain....
Please help.
Thanks in advance,
Alex
 
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use nested classpath instead of processor attribute. Here is my working example
 
Alexander Iskold
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Roseanne, thank you for your reply.
That still does not work. I get:
javax.xml.transform.TransformerFactoryConfigurationError: org.apache.xalan.proce
ssor.TransformerFactoryImpl
at javax.xml.transform.TransformerFactory.newInstance(TransformerFactory
.java:94)
What version of Ant and Xalan are you using?
Did you have to set any special config options for Ant?
Thanks!
 
Alexander Iskold
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found what the problem was. I had JAVA_HOME variable set to 1.3 jdk instead of 1.4 and Ant was picking it up.
Alex
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, my code works with both j2sdk1.3.1 and 1.4.1. I use it at work(1.3.1_07) and home(1.4.1_02)
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic