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

Multiple Rows in a Table / Same Element

Subject: Multiple Rows in a Table / Same Element
From: "Pinto, Rebecca" <rebecca.pinto@xxxxxxxxxxxxx>
Date: Tue, 8 Aug 2000 18:24:37 -0400
create multiple rows in table
Hello,

I am trying to create a Calendar table with a new row after every 7th day.
Here is the XML I'm working with:

<Month>            
            <day date="1" />
            <day date="2"/>
            <day date="3" />
            <day date="4" />
            <day date="5" />
            <day date="6" />
            <day date="7" />
            <day date="8" />
            <day date="9" />
            <day date="10"/>
            <day date="11"/>
            <day date="12"/>
            <day date="13"/>
            <day date="14"/>
            .
	.
            <day date="31"/>
</Month>  

My XSL is: 

<TABLE>
<TR>
	<TD><xsl:apply-templates select="//Month/day" /></TD>
</TR>	
</TABLE>

<xsl:template match="day">
	<TT><xsl:value-of select="@date" /></TT>
</xsl:template>

This code will produce a single row of days.  I cannot seem to figure out
how to create multiple rows when referencing one element(day).
I tried using :

<xsl:if test="position() mod 7 = 0">
	<TR><TD><TT><xsl:value-of select="@date" /></TT></TD></TR>
</xsl:if> 

But, this only returned every 7th day.  If anyone has any suggestions I
would greatly appreciate your help.

Thank You,
Rebecca Pinto  


 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.