Reputation: 11
I am using Saxon HE 10 (using Xslt30Transformer)
How to pass input stream as a parameter to XSL?
I see there is a setStylesheetParameters . How to send input stream , as this expects object of type XdmValue?
I used to set the file name parameter , trying to pass the stream instead <xsl:param name="test" select="'test.xml'"/>
Upvotes: 0
Views: 342
Reputation: 163595
You can pass any Java object (including a Stream
) by wrapping it in an XdmExternalObject
(which is a subclass of XdmValue
). But is it a good idea? What are you actually trying to achieve? A Stream is a mutable object (reading from the stream changes its state) and mutable objects and XSLT don't really play very well together. If we knew what you wanted to achieve we might be able to suggest a better design.
Upvotes: 0