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

Re: First close a tag, then open

Subject: Re: First close a tag, then open
From: Patrick van Halderen <patrick@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 4 Dec 2003 10:24:39 +0100
select tag open and close
Hi all,
Thanks for the snappy reply!

I know XML doesn't do tags, however, it seemed easier to explain to call them tags... Sorry for the confusion.
I searched the archives, but couldn't find anything; I should've google'd further...


I used the following template, by David, but made a small modification:
I changed the <xsl:for-each select="itemname[position() mod 2 = 0]"> to <xsl:for-each select="itemname[position() mod 2 = 1]">, as else it would "forget" to display the very first value...


Anyway, thanks all!

Patrick

On 3-dec-03, at 17:18, David Carlisle wrote:
You probably want to select every second item
<xsl:for-each select="itemname[position() mod 2 = 0]">
then make a row of teh table
<tr>
<td><xsl:value-of select="."/></td>
<td><xsl:value-of select="following-sibling::*[1]"/></td>
</tr>
</xsl:for-each>


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.