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

RE: Dynamically creating XPath expressions Help requir

Subject: RE: Dynamically creating XPath expressions Help required
From: <Jarno.Elovirta@xxxxxxxxx>
Date: Fri, 2 Apr 2004 06:33:04 +0300
variables and expressions help
Hi,

> <xsl:for-each select="Reports/GridBody0">
> 
>      <xsl:if test="Col3 != ''" > 

Though correct, it's preferable to use

  not(Col3 = '')

or

  not(string-length(Col3) = 0)

> 	<xsl:variable name="rowNo" 
> select="concat('../GridColors/Grid0RowNo',RowNo,'Col3LimeGreen
> ')"></xsl:variable> 

change this to 

  <xsl:variable name="rowNo" select="concat('Grid0Row',RowNo,'Col3LimeGreen')"/>

(also note that you had a typo, the source element name starts with 'Grid0Row', not 'Grid0RowNo'.)

> 	     <xsl:choose>
> 	       <!--If this element exist and we have to render green-->
> 		     <xsl:when test="$rowNo = 1" >-->

and this to

  <xsl:when test="../GridColors/*[name() = $rowNo] = 1" >

Cheers,

Jarno - RantRadio Industrial: Industrial Electronica for Your Mind

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.