We've been using JDK 1.3 and Xalan 2.0.1 to pass an XNodeSet (created from a
string of XML) from a Java application to an XSL style sheet as a parameter
and then matching templates to process it (see below snippet). This has
worked successfully until we tried the same thing with JDK 1.4 and Xalan
2.3.1. 

I haven't been able to figure how or if the same functionality is available
with the new DTM interface. Also, a lot of the "In Progress" javadoc
comments make me wonder if I'm trying this too soon.


Java snippet
        DOMParser myParser = new DOMParser();
        InputSource myInput = new InputSource("<name>World</name>");
        myParser.parse(myInput);
        Document myDoc = myParser.getDocument();
        Element rootElement = myDoc.getDocumentElement();
        ...
        transformer.setParameter( "input", new XNodeSet(rootElement) );

XSL Snippet
        <xsl:apply-templates select="$input" />


Any help or extra information would be greatly appreciated.

Regards,
Kurt

Reply via email to