
July 22nd, 2003, 03:04 AM
|
 |
Contributing User
|
|
Join Date: Jul 2003
Posts: 206
Time spent in forums: 19 h 29 m 24 sec
Reputation Power: 6
|
|
XSLT error: The expression does not evaluate to a node-set
Hi all,
I have the following code snippet:
Code:
<xsl:template name="comparePanels">
<!-- compare two panels of a form -->
<xsl:param name="panels_a" />
<xsl:param name="panels_b" />
<xsl:if test="$panels_a | $panels_b">
<xsl:variable name="compar">
<xsl:call-template name="comparePanelTitle">
<xsl:with-param name="panel_a" select="$panels_a[1]"/>
<xsl:with-param name="panel_b" select="$panels_b[1]"/>
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="$compar"/>
<xsl:choose>
<xsl:when test="$compar='equal'">
<xsl:element name="{name($panels_a[1])}">
<xsl:attribute name="Title1">
<xsl:value-of select="$panels_a[1]/@Title"/>
</xsl:attribute>
<xsl:attribute name="Title2">
<xsl:value-of select="$panels_b[1]/@Title"/>
</xsl:attribute>
<xsl:attribute name="Result">
<xsl:text>Labels are equal</xsl:text>
</xsl:attribute>
</xsl:element>
<!--
<xsl:call-template name="comparePanels">
<xsl:with-param name="panel_a" select="$panels_a[following-sibling::*]"/>
<xsl:with-param name="panel_b" select="$panels_b[following-sibling::*]"/>
</xsl:call-template>
-->
</xsl:when>
if I delete "<!--" and "-->" I get an error message:
Code:
XSLT error: The expression does not evaluate to a node-set
I don't understand why because the expresion is a node-set but without the first node or am I wrong?
|