While experimenting with streaming I have run into an odd message (using Saxon EE 11.4 J):
Error in xsl:for-each/@select on line 15 column 40 of value-of-test3.xsl:
SXST0060 Component cannot be streamed, although it is guaranteed streamable according to
W3C rules. No streamable path found in expression (xsl:value-of, ...)
The code is
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="3.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="#all"
expand-text="yes">
<xsl:strip-space elements="*"/>
<xsl:output method="text"/>
<xsl:mode streamable="yes"/>
<xsl:template match="/" name="xsl:initial-template">
<xsl:for-each select="root/record">
<xsl:value-of select="data(@att1), data(@att2), if (normalize-space(@att3)) then @att3 else 'default'" separator=","/>
<xsl:text> </xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
XML sample
<root>
<record att1="a1" att2="b1" att3=""/>
<record att1="a2" att2="b2" att3="c2"/>
<record att1="a3" att2="b3" att3="c3"/>
</root>
Is that a Saxon quirk during streamability analysis and/or streamed execution or is that construct really too complicated?
I started with something like <xsl:value-of select="@att1, @att2, if (normalize-space(@att3)) then @att3 else 'default'" separator=","/>
and even there I thought with only attribute nodes being used that value-of
would be streamable but Saxon rejected it.
Then I tried to simplify the task for Saxon, throwing in data
calls but got the above strange message.