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
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