You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by "Devlin, Kurt" <Ku...@westgroup.com> on 2002/05/09 14:29:36 UTC

XNodeSet with JDK 1.4 and Xalan-J 2.3.1

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