[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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

Subject: RE: At xsl:choose, the value of "" is not a node-set
From: "Crowers, Steve" <scrowers@xxxxxxxxxxxx>
Date: Mon, 6 Aug 2001 12:29:01 -0400
xsl choose node
actually, the problem is the $header ($OrganizationHeader) param.  where is
this coming from? it may be text string...the xsl:if statement is only
determining if the *current* node exists, not that $header is a node...


Steve Crowers
Software Engineer


Liberate Technologies
2 Walnut Grove,
Suite 200
Horsham, PA 19044
Phone: 215-773-9400 x 9514
Fax: 215-773-9401
scrowers@xxxxxxxxxxxx
http://www.liberate.com



-----Original Message-----
From: Xiaocun Xu [mailto:xiaocunxu@xxxxxxxxx]
Sent: Wednesday, August 01, 2001 5:30 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.