Hi @mhkay,
I need some help dealing with saxon api :)
I create a pipeline with 2 XsltTransform of the same xslt and when i run transform i get this error :
2019-01-24 11:32:15,673 [pool-2-thread-1] INFO e.s.e.x.XsltListener - file
2019-01-24 11:32:15,674 [pool-2-thread-1] INFO e.s.e.x.XsltListener - Error XPDY0002 while evaluating xsl:message content: The context item for axis step fn:root(...)/element() is absent
here is my xslt :
<xsl:variable name="supp" as="xs:string" select="root()/*/name()"/> <xsl:template match="/"> <xsl:message select="$supp"/> <file/> </xsl:template>
the first XsltTransform work fine but It seems that i have no context node during the second XstTransform running.
I use :
transformer1.setSource(source) : source is a SAXSource
transformer1.setDestination(transformr2)
transformr2.setDestination(serialiser)
According to documentation (XsltTransform.setInitialContextNode):
This value is ignored in the case where the XsltTransformer is used as the Destination of another process. In that case the initial context node will always be the document node of the document that is being streamed to this destination.
Thanks for your Help
</xsl:stylesheet>
Anonymous
Sorry, but we don't use SourceForge for issue tracking. Please raise this again at http://saxonica.plan.io -- or if you prefer, on StackOverflow with a "saxon" tag.
Done https://stackoverflow.com/questions/54345559/xslt-pipeline-error-xpdy0002-the-context-item-for-axis-step-fnroot-ele !
Thanks a lot