The following example throws an NPE with streamable="yes", and runs normally with streaming disabled.

<xsl:stylesheet xmlns:xsl=""

    <xsl:mode streamable="yes"/>
    <xsl:template match="/">
            <xsl:apply-templates select="books/book" />
    <xsl:template match="book">
        <xsl:variable name="title" select="title"/>
        <xsl:apply-templates select="$title/subtitle | $title" />

The input I used:



- The expression $title | $title throws exception that the expression is not streamable
- The expression $title/subtitle | title (without two variable refs) works as expected.
- The expression title/subtitle | title (no variable refs) returns incorrectly ordered text nodes (you see "worldworld" in the output, the whitespace node after </subtitle> is copied as last node, it seems), you see this difference when comparing with streamable="no".