Subject:XSLT & Java Author:joe j Date:10 Aug 2005 09:32 AM
Hello,
I am doing a Java application where I do some XSLT transformations on SVG files. The thing is that Its hard to do string manipulation on XSLT such as long d attribute on SVG files. Is it possible, through XSLT stylesheet to pass d attribute to a Java method where it does some string manipulation and returns the result to the XSLT stylesheet on path, d matching?
I would like to be able to send the d attribute data to a Java method in my Java application which will make life easier! If it is possible to do such thing, please can you tell me where I can find such examples, a link will do?
Subject:XSLT & Java Author:Tony Lavinio Date:10 Aug 2005 11:32 PM
Each XSLT engine supports them differently.
You can do them in XSLT 1 with Saxon or Xalan for example.
But if you use Saxon 8 and use XSLT 2, you don't need to call out to
Java and your whole program can just be in one language.
If you do want to call out, there is an example in the Stylus Studio
examples project of doing just that. Or you can look up the relevant
information on Xalan at xml.apache.org or on Saxon at www.saxonica.com.