This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Saxon/Xalan Transformer.setParameter() problems
- To: xsl-list <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] Saxon/Xalan Transformer.setParameter() problems
- From: "Shakeel Mahate" <shakeelmahate at hotmail dot com> (by way of MulberryTechnologies List Owner)
- Date: Fri, 23 Mar 2001 14:34:25 -0500
- Reply-To: xsl-list at lists dot mulberrytech dot com
I want to send a NodeSet to a Saxon or Xalan transformer via the
setParameter() function.
I have a org.w3c.dom.Document object in memory which I need to send to the
transformer before calling transform.
So, here's the problem, I have not been able to figure out how to transform
org.w3c.dom.Document into a node set as required by either of the two
transformers.
For Xalan, I have tried the following:
XNodeSet nodeSet = new XNodeSet(dom.getDocumentElement());
transformer.setParameter("referenceXml", nodeSet);
but the xalan:evaluate or any XPath expr on the the parameter referenceXml
do not work.
I know the problem isnt with my XPath expressions because if I set the value
of the parameter, via
<xsl:parameter name="referenceXml">
<xsl:value-of select="document('ref.xml')"/>
</xsl:parameter>
then all of my XPath expressions and xalan:evaluate(....) work correctly
But now when I send the parameter value as shown above, none of the XPath
expressions evaluate.
I want to give up on Xalan and try Saxon 6.22, but I dont know how to
convert the org.w3c.dom.Document into a node-set expression as expected by
Saxon.
Mike, please help me.
-Shakeel
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list