[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Multiple Rows in a Table / Same Element
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|