Thanks Kay.
To your first point, Are you saying that there are good reasons to stay with Saxon6? We are considering an upgrade to 8 but not in the next four months.
I tried your solution. My code looks something like this:
Code:
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
org.w3c.dom.Document document = builder.parse(new InputSource(new StringReader(result1.getWriter().toString())));
transformer2.setParameter("param11", document.getDocumentElement());
and in my XSL,
Code:
<xsl:param name="param11" />
<xsl:template match="/">
<xsl:message><xsl:value-of select="concat('name: ',$param11/Root/@Name)" /></xsl:message>
</xsl:template>
But this gives me the following errror:
Error at xsl:value-of on line 10 of file:/Data.xsl:
The value is not a node-set
javax.xml.transform.TransformerException: The value is not a node-set
at com.icl.saxon.style.StyleElement.styleError(StyleE lement.java:818)
at com.icl.saxon.style.StyleElement.processChildren(S tyleElement.java:645)
at com.icl.saxon.style.XSLMessage.process(XSLMessage. java:87)
I also tried using exslt:node-set() around the param, but got a similar error(exslt:node-set(): argument must be a node-set or tree)
Can you please tell me where i am going wrong?