Should Saxon 9.8 HE execute a stylesheet with an xsl:function with attribute streamable other than unclassified?
Added by Martin Honnen over 7 years ago
With the move from @xsl:stream@ to @xsl:source-document@ it is possible to write XSLT 3.0 stylesheets that work with streaming in Saxon 9.8 EE and without in Saxon 9.8 HE, without needing to change the code.
Furthermore Saxon 9.8 HE for e.g. @<xsl:mode streamable="yes"/>@ also only emits a warning "Request for streaming ignored" that it ignores the streaming mode or construct and processes the code without streaming.
I am wondering whether the statement
A processor that does not claim conformance with the streaming feature is not required to use streamed processing and is not required to determine whether any construct is guaranteed streamable. Such a processor must, however, implement the semantics of all constructs in the language provided that enough memory is available to perform the processing without streaming.
in https://www.w3.org/TR/xslt-30/#streaming-feature can not be read as requiring Saxon HE to ignore an attribute like @streamable="absorbing"@ on a user -defined function and compile and execute a stylesheet with such a function as if it had the default value @unclassified@.
I currently get an error "XTSE3430: Streamable stylesheet functions are not supported in Saxon-HE" and execution is aborted in an example like
List with {f:count-descendants(.)} descendant element(s).
I have found I can rewrite the function with a shadow attribute as
to make it work with EE and HE at the same time but I wonder whether that is necessary as other streaming features like streamed modes or streamed source documents are simply ignored in HE and executed without streaming.
Altova XMLSpy's XSLT processor which does not support streaming executes the code with
without giving errors.
Replies (3)
Please register to reply
RE: Should Saxon 9.8 HE execute a stylesheet with an xsl:function with attribute streamable other than unclassified? - Added by Michael Kay over 7 years ago
Yes, the request for streaming should be ignored, possibly with a warning, both in Saxon-HE and in Saxon-EE if the relevant configuration options are set.
RE: Should Saxon 9.8 HE execute a stylesheet with an xsl:function with attribute streamable other than unclassified? - Added by Martin Honnen over 7 years ago
I have read http://www.saxonica.com/html/documentation/sourcedocs/streaming/configuration-streaming.html carefully and I have now tried the configuration features from the command line with @Saxon-EE 9.8.0.2J@ but it seems the execution is always using streaming.
For instance with the command line
java -jar 'C:\Program Files\Saxonica\Saxon9.8EE\saxon9ee.jar' -t -xsl:.\test201706230203.xsl -s:.\test2017062302.xml
Saxon shows
Processing file:/C:/SomePath/./test2017062302.xml Streaming file:/C:/SomePath/./test2017062302.xml
Now when I add the @--streamability:off@, so have the command line
java -jar 'C:\Program Files\Saxonica\Saxon9.8EE\saxon9ee.jar' -t -xsl:.\test201706230203.xsl -s:.\test2017062302.xml --streamability:off
I get exactly the same indication
Processing file:/C:/SomePath/./test2017062302.xml Streaming file:/C:/SomePath/./test2017062302.xml
And whatever I try with HE, it seems to ignore streamable modes or streamed source documents without any configuration options but aborts running a stylesheet with a with a user-defined function with attribute @streamability="absorbing"@ with the message "XTSE3430: Streamable stylesheet functions are not supported in Saxon-HE", not allowing me to run it.
RE: Should Saxon 9.8 HE execute a stylesheet with an xsl:function with attribute streamable other than unclassified? - Added by Michael Kay over 7 years ago
I have raised bug #3309 to track these questions:
Please register to reply