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

Re: error: At xsl:choose, the value of "" is not a no

Subject: Re: error: At xsl:choose, the value of "" is not a node-set
From: Xiaocun Xu <xiaocunxu@xxxxxxxxx>
Date: Thu, 2 Aug 2001 15:47:52 -0700 (PDT)
xsl choose no value
Thanks for all the help, guys.  Sorry for not
mentioning the processor I use.  I currently use Saxon
6.0.2 (I know, I should be upgrading :(.  I will do
exactly that after finishing up this release of the
product).

After some investigation, the problem turned out to be
template name conflicts.  I had included a number of
XSL files in gXML2ePASS_base.xsl, and two of which had
the same template name operate on the same element.  I
modified them to use unique template names and now it
works fine.

My question is, how come it did not complain about
conflict template names during compile?  Does it
instead compiles each of the included XSL by itself?

Much thanks,
Xiaocun

--- Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> wrote:
> Xiaocun:
> 
> I think the problem is with the value of
> $OrganizationHeader, which you're 
> passing into the FixAttribute template. What is it?
> I'll bet it's not a 
> node-set. In other words, my guess is that $header
> isn't a node-set in the 
> XPath inside your starts-with().
> 
> Cheers,
> Wendell
> 
> At 05:29 PM 8/1/01, you wrote:
> >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
> 
> 
>
======================================================================
> Wendell Piez                           
> mailto:wapiez@xxxxxxxxxxxxxxxx
> Mulberry Technologies, Inc.               
> http://www.mulberrytech.com
> 17 West Jefferson Street                    Direct
> Phone: 301/315-9635
> Suite 207                                         
> Phone: 301/315-9631
> Rockville, MD  20850                                
> Fax: 301/315-8285
>
----------------------------------------------------------------------
>    Mulberry Technologies: A Consultancy Specializing
> in SGML and XML
>
======================================================================
> 
> 
>  XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list
> 


__________________________________________________
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


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.