I am setting the parameter like this:
Document doc_23 = createDocument(doc_bytes);
XPathExpression xpe = XPathFactory.newInstance().newXPath().compile("/");
transformer.setParameter("document23",xpe.evaluate(doc_23, XPathConstants.NODESET));
I also tried this:
transformer.setParameter("document23",new StreamSource(new StringReader(xml_text)));
In my xslt i am getting the variable like this:
<xsl:variable name="document23" select="/.."></xsl:variable>
And try to use it:
<xsl:for-each select="$document23//Product">
<xsl:message>Test<xsl:value-of select="generalDetails/productCode"/></xsl:message>
</xsl:for-each>
But i dont work (the for-each never get enterd).
The document have the elements speciffied beacasue using 'document(document23.xml)//Product' does work.
Thanks for the help.