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

RE: variable in filter doesn't work??

Subject: RE: variable in filter doesn't work??
From: "Martinez, Brian" <brian.martinez@xxxxxxxx>
Date: Fri, 20 Sep 2002 11:33:54 -0600
node set doesn t work
> From: Carter, Will [mailto:WCarter@xxxxxxxxxxxxxxxx]
> Sent: Friday, September 20, 2002 10:24 AM
> Subject:  variable in filter doesn't work??
> 
> 
> why doesn't this work?
> -----------------------
> <xsl:variable name="filter" select='"cat = &apos;zoro&apos;"'/>
> <xsl:value-of select="$filter"/>

Here I assume you mean xsl:for-each.  for-each only iterates on a node-set;
your variable $filter doesn't return a node-set, but rather a literal
string, "cat = &apos;zoro&apos;".

It might be easier to define the expression in the select attribute of the
for-each loop:

<xsl:for-each select="//person/cat = 'zoro'">
  ...
</xsl:for-each>

which would eliminate the need for the variable.

cheers,
b.

| brian martinez                              brian.martinez@xxxxxxxx |
| senior gui programmer                                  303.708.7248 |
| trip network, inc.                                 fax 303.790.9350 |
| 6436 s. racine cir.                             englewood, co 80111 |
| http://www.cheaptickets.com/                   http://www.trip.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.