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

RE: checking for a node in the ancestor axis

Subject: RE: checking for a node in the ancestor axis
From: "Lars Huttar" <lars_huttar@xxxxxxx>
Date: Wed, 22 Oct 2003 06:10:33 -0500
ancestor 2 xsl
Two suggestions...

1) Could it be that your code is not working because of carriage
returns, i.e. this code
> 				<xsl:when test="_Ctrl">
> 					<xsl:value-of select="'1'"/>
> 				</xsl:when>
sets your variable to the value '
		1
'
and so it is not string-equal to '1'?

You could avoid this problem by taking Michael Kay's suggestion
about using a boolean variable; or by using number(),
or strip-space().


2) You said your xml inside <Rpt_Inven> varies all the time;
but does the location of _Ctrl vary?  If not, you could
get rid of the variable and do
						<xsl:if test="/lay:data/_Ctrl">
instead of
						<xsl:if test="$CtrlExists='1'">


HTH,
Lars


 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.