Subject:XSLT transformations with JDK1.5 and Tomcat 5.5 Author:princy Mathew Date:21 Oct 2008 10:31 AM
Greetings to all,
I have an application that converts XSL to PDF using FOP. This application works fine in JDK 1.4 and Tomcat5.0.
But when I moved this application into JDK1.5 and Tomcat 5.5 I am getting errors
Initially,the error was related to serializer.jar. I heard that JDK 1.5 has inbuilt version of xalan, which requires serializer.jar. So I downloaded the serializer.jar and I had put it in lib folder of my application.
Upon doing this, the error related to serializer.jar dissappeared. But now I am getting error for str:tokenize.
In my XSL file, I am using the following code snippet:
Subject:XSLT transformations with JDK1.5 and Tomcat 5.5 Author:mj ash Date:23 Oct 2008 02:44 PM
Do you realize that when you assign a variable using the VALUE rather than the SELECT attribute the variable is assigned a Result Tree Fragment and you cannot access elements from a Result Tree Fragment. Try using the select="..." in your variable assignment.
Subject:XSLT transformations with JDK1.5 and Tomcat 5.5 Author:mj ash Date:30 Oct 2008 09:30 AM
Have you tried the debugger? Check out the type and value held in $tokens. Maybe you can manipulate it directly, however that sounds more fragile than re factoring things as they should have been.
Subject:XSLT transformations with JDK1.5 and Tomcat 5.5 Author:mj ash Date:31 Oct 2008 08:41 PM
Don't know of any but...
though I don't know or care to know specifically the issue that you are having or how to solve it to minimize your re-work, all of these technologies have moved forward and it behooves you to stay current or even jump ahead and resolve the issue within a known boundary.
I suggest you don't try to patch the pieces together (ranging from Java 1.4, xalan 2.4, DOM2, SAX, JAXP to Java 1.5, xalan 2.7, DOM3, SAX2, JAXP/JAXB not to mention Java6) from what was working with your "old" environment to what you might get to work in the "new" but won't know why it stops working next week.
Try moving ahead and working with the pieces that have also moved ahead. Check out this link and the others around it to get a feel for the progression of each and all of the pieces that need to play together.
note the links...
XML Documentation: J2SE 1.4.2 | J2SE 5.0 | Java SE 6
and the details and differences
Remember too, to use the <xsl:variable name="myVar">value of myval</xsl:variable> leaves $myVar with a Result Tree Fragment with its parts not accessible in the way you try, this I do know! (See Tennison's Beginning XSLT) Find and replacing 300 files is nothing! And the good unit testing I know you spent time on early in the development process should still work to quickly test the change ;-)