RE: [xsl] error: At xsl:choose, the value of "" is not a node-set

Subject: RE: [xsl] error: At xsl:choose, the value of "" is not a node-set
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Thu, 2 Aug 2001 10:16:45 +0100
I suspect that $header is a result tree fragment, but I've no way of
knowing.

Please, if you're going to quote an error message, tell us which product it
comes from!

Mike Kay
Software AG

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Xiaocun Xu
> Sent: 01 August 2001 22:30
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] error: At xsl:choose, the value of "" is not a node-set
>
>
> Hi,
>
>   I am puzzled at an error I am encountering:
> Transform failed: At xsl:choose on line 149 of
> file:/C:/test/gXML2ePASS_base.xsl: The value of "" is
> not a node-set
>
> The xsl:choose line in question is the one in the
> following code, line 4 in FixAttribute template.
>
> <xsl:template name="FixAttribute">
>   <xsl:param name="header"></xsl:param>
>   <xsl:if test="./node()">
>     <xsl:choose>
>       <xsl:when
> test="starts-with($header/cell[@column=current()/@column],
> '*')">
>         <xsl:attribute
> name="{substring($header/cell[@column=current()/@column],
> 2)}">
> 	  <xsl:call-template name="CheckForDate">
> 	    <xsl:with-param name="attributeName"
> select="$header/cell[@column=current()/@column]"/>
> 	  </xsl:call-template>
> 	</xsl:attribute>
>       </xsl:when>
>       <xsl:otherwise>
> 	<xsl:attribute
> name="{$header/cell[@column=current()/@column]}">
> 	  <xsl:call-template name="CheckForDate">
> 	    <xsl:with-param name="attributeName"
> select="$header/cell[@column=current()/@column]"/>
> 	  </xsl:call-template>
> 	</xsl:attribute>
>       </xsl:otherwise>
>     </xsl:choose>
>   </xsl:if>
> </xsl:template>
>
> This template is called in:
> <xsl:template match="cell" mode="Organization">
>   <xsl:if test="current()">
>     <xsl:call-template name="FixAttribute">
>       <xsl:with-param name="header"
> select="$OrganizationHeader"/>
>     </xsl:call-template>
>   </xsl:if>
> </xsl:template>
>
> The "" node-set the error refers to is the cell
> element?  If so, I should have filtered it out with
> <xsl:if test="./node()">, right?
>
> Any help would be very much appeciated.
>
> Xiaocun
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with
> Yahoo! Messenger
> http://phonecard.yahoo.com/
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread