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

RE: Equality

Subject: RE: Equality
From: Mark Hayes <mark@xxxxxxxxxxx>
Date: Sat, 20 Nov 1999 10:39:02 -0800
xsl equality
My understanding is that this:

 <xsl:variable name="modId">
 	<xsl:value-of select="@Id"/>
 </xsl:variable>

assigns a result tree fragment, not a string, to the variable modId.  If you
change it to this:

 <xsl:variable name="modId" select="@Id"/>

You will probably get different results.

Or, you might try converting the variable values to strings within the
comparison:

 <xsl:when test="normalize-space(string($modId)) =
normalize-space(string($currentMod))">

mark

> -----Original Message-----
> From: Jon Wynacht [mailto:jwynacht@xxxxxxxxx]
> Sent: Friday, November 19, 1999 5:31 PM
> To: XSL-List@xxxxxxxxxxxxxxxx
> Subject: Equality
> 
> 
> Given this:
> 
> <xsl:variable name="modId">
> 	<xsl:value-of select="@Id"/>
> </xsl:variable>
> 
> With a possible value of:
> l3switch8510_527-Course-Modules-Module_nav.xml
> or
> l3switch8510_541-Course-Modules-Module_nav.xml
> 	
> <xsl:variable name="currentMod">
> 	<xsl:value-of select="/PXML/@About"/>
> </xsl:variable>
> 
> With only one possible value of:
> l3switch8510_527-Course-Modules-Module_nav.xml
> 
> I want to do this:
> 
> <xsl:choose>
> <xsl:when test="$modId = $currentMod">
> 	Hi i'm the current module
> </xsl:when>
> <xsl:otherwise>
> 	Hi i'm another module
> </xsl:otherwise>
> </xsl:choose>
> 
> But it doesn't work.
> 
> Am I comparing incorrectly? Please advise.
> 
> Thanks!
> 
> Jon
> 
> ---------------------------------------------
> Jon Wynacht
> Web Developer - Worldwide Field Productivity
> Cisco Systems
> 408-527-5261
> jwynacht@xxxxxxxxx
> 
> 
>  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
  • Equality
    • Jon Wynacht - Fri, 19 Nov 1999 17:31:06 -0800
      • <Possible follow-ups>
      • Mark Hayes - Sat, 20 Nov 1999 10:39:02 -0800 <=

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.