XSLT variable contains document node with zero-length text node
<xsl:variable name="x"> <xsl:sequence select="()"/> </xsl:variable>
produces a document node containing a single zero-length text node child. Zero-length text nodes should never occur under the rules for constructing complex content.
Saxon is using the "TextFragment" data structure for this, and in this data structure there is always a text node even if it is empty.
This is probably one of those bugs that has been in the product "for ever".
Reported by Davud Carlisle on xsl-list.
Please register to edit this issue