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

Re: Difference between "/" and "//"

Subject: Re: Difference between "/" and "//"
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Fri, 22 Jun 2001 06:23:27 +0100
rene tennison
Hi Earl,

> This is my xsl
> <xsl:template match="MC">
>         <xsl:if test="contains($searchList, 
> concat(normalize-space(SC/@BCID), ','))">
>                 <MC id="{@id}">
>                     <xsl:apply-templates/>
>                 </MC>
>         </xsl:if>
> </xsl:template>

When you do normalize-space() on a node set, then it only looks at the
*first* node in that node set.  So in the above you select the BCID
attributes, then choose the first one, and concatenate it with a comma
to look in the search string.

Instead, you should test whether there are *any* SC elements whose
BCID attribute, concatenated with a comma, is contained in the
$searchList with:

  SC[contains($searchList, concat(normalize-space(@BCID), ','))]

Jeni

---
Jeni Tennison
http://www.jenitennison.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.