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

RE: xsl string comparison fails why?

Subject: RE: xsl string comparison fails why?
From: "Kevin Collins" <kcollins@xxxxxxx>
Date: Wed, 25 Sep 2002 10:12:07 -0400
removing text from a string
In the for-each, did you try printing out the value of "."?

Not sure about this, but I think the string value of
"admissions/state/text()" will include the value of the child
<statelink> element as well.

Try removing the text() node test. So: 
<xsl:for-each select="admissions/state">


> <?xml version="1.0" encoding="UTF-8"?>
> <admissions>
>  <state>Alabama
>   <statelink
>   href="http://www.alabar.org/page.cfm?view=3&amp;subgroup=main">
>   Bar Admissions Information</statelink>
>   </state>

>> 	<xsl:for-each select="admissions/state/text()">
> 		<xsl:if test=".=$state">
> 			<xsl:value-of select="."/>
> 		</xsl:if>
> 	</xsl:for-each>

> The if never evalutes to true even if it is testing 
> Alabama=Alabama. I can print the value of the parameter using 
> <xsl:value-of select="$state"/> just fine

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
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.