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

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="3.0">

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


The input I used:

<books>
    <book>
        <title>hello
            <subtitle>world</subtitle>
        </title>
    </book>
</books>

Notes:

- 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".

Cheers,
Abel