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

RE: xsl:variable and node list

Subject: RE: xsl:variable and node list
From: <Jarno.Elovirta@xxxxxxxxx>
Date: Fri, 15 Oct 2004 10:05:25 +0300
RE:  xsl:variable and node list
Hi,

> i have something like this below
>
> <xsl:variable name="withname">
>      <xsl:copy-of
> select="tblMIMCompanies[contains(translate(@name,$upperCase,$l
> owerCase),tran
> slate($name,$upperCase,$lowerCase))'true']"/>
> </xsl:variable>

I.e. you're binding $withname to a Result Tree Fragment

> <xsl:variable name="numnam" select="count($withname)"/>

but count() expects a node-set.

> but the last line is returning me an error than $withname
> does not return a
> nodelist, any ideas what im doing incorrect?

You're trying to use a function with an argument of a wrong type. Change the
definition of $withname to

<xsl:variable name="withname"
select="tblMIMCompanies[contains(translate(@name,$upperCase,$lowerCase),trans
late($name,$upperCase,$lowerCase))'true']"/>

Cheers,

Jarno - Madam Zu: August 2003 Part 1


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.