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

Elminitate redundancy by using variables

Subject: Elminitate redundancy by using variables
From: "Kenny Akridge" <kenny@xxxxxxxxxxxxxxxxx>
Date: Tue, 23 Mar 2004 21:58:34 -0500
 Elminitate redundancy by using variables
Imagine I have xsl similar to this:

<xsl:choose>
	<xsl:when test="number($count) mod 2 = 0">
		<tr style="background-color: #FFFFFF;">
		   <td class="fieldInfo">
			<xsl:value-of
select="substring(LineItemName,1,45)"/>
		   </td>
		</tr>
	</xsl:when>
	<xsl:otherwise>
		<tr style="background-color: #E7EEFF;">
		   <td class="fieldInfo">
			<xsl:value-of
select="substring(LineItemName,1,45)"/>
		   </td>
		</tr>
	</xsl:otherwise>
</xsl:choose>

You can easily see that this would be a nightmare if I had even just 5 <td>
elements being repeated.  Is there a way to save the value from the
beginning of the <td> to the end, including the generate value of
LineItemName?

Thanks.

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.