cybernerdsx2 wrote:
I am new to XSLT and I would like to use Java to read up the XSLT
content and add in a few tags in into the template below:
<xsl:template name="hwSpecs">
<!-- adding new tags into here from Java -->
</xsl:template>
So, what kind of parser or tools can I use in my Java source code to
deal with this?
Java 1.4 and later has XSLT 1.0 support so one way to do that is to
write an XSLT 1.0 stylesheet that processes an input stylesheet and
generates a new output stylesheet. After all, XSLT is XML so you can use
XSLT itself to process and to generate XSLT.
Or you could write a Java program using the W3C DOM to parse the input
stylesheet into a DOM tree and then use the DOM API to add elements.
Then you need to serialize to DOM tree to get a new XML document file.
Besides those tools built-in for Java 1.4 or 1.5 you can of course have
a look at the various third party implementations for XSLT, DOM.
--
Martin Honnen
http://JavaScript.FAQTs.com/