Comment #1 on issue 46 by
volodymy...@gmail.com: Combination of @test and
I've tracked down the problem. When test attribute is specified and expect
have context elements results are wrapped in document node. When expected
content is simple sequence.
Expected is evaluated using following function:
<xsl:variable name="impl:successful"
as="xs:boolean"
select="test:deep-equal($impl:expected, if (
$impl:with-context ) then $impl:context else $x:result, 2)"/>
In our case $impl:with-context is true(). So we using $impl:context which
is evaluated as:
<xsl:variable name="impl:context" as="item()?">
<xsl:choose>
<xsl:when test="$impl:context-tmp instance of node()+">
<xsl:document>
<xsl:sequence select="$impl:context-tmp"/>
</xsl:document>
</xsl:when>
<xsl:otherwise>
<xsl:sequence select="$impl:context-tmp"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
$impl:context-tmp contain nodes selected by @test attribute of x:excpect.
As result they wrapped into document.
Question why?