I tried to pass a w3c.dom.Document, Element and NodeList as parameters to a xslt transform.
I want to be able to process it within the xslt:
<xsl:param name="links" />
<xsl:template match="/">
<record>
<xsl:for-each select="$links/*">
<test />
</xsl:for-each>
</record>
</xsl:template>
I pass the parameter as: Document params = createLinksParams(links); transformer.setParameter("links", params);
I get this exception: 'Invalid conversion from 'com.sun.org.apache.xerces.internal.dom.DocumentImpl' to 'node-set'.'
I tried also exslt:node-set(), xalan:nodeset() etc, but it doesn't work.
It seems that internally xalan excepts his own implementation of the Node.
How can I do something similar without incurring in this problem?
I cannot use document($param) because I construct the doc on the fly.