|
Subject: RE: Multiple Rows in a Table / Same Element From: Kay Michael <Michael.Kay@xxxxxxx> Date: Wed, 9 Aug 2000 09:57:22 +0100 |
>
> I am trying to create a Calendar table with a new row after
> every 7th day.
>
Look in the FAQ under grouping.
The basic principle is to structure template rules according to the output
structure, not the input structure. You want a rule that generates a <week>
element containing seven <day> elements? Write it like this:
<xsl:template match="day[position() mod 7 = 0]"/>
<week>
<xsl:for-each select=". | following-sibling::day[position() < 7]">
<day><xsl:value-of select="@date"/></day>
</xsl:for-each>
</week>
</xsl:template>
<xsl:template match="day"/> <!-- ignore the other days -->
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: Multiple Rows in a Table / Same, Spychalski, Frank | Thread | Re: Multiple Rows in a Table / Same, Mike Brown |
| Re: MSXML document() function., SoftLiban KEYROUZ Ch | Date | RE: XMTP XML file breaks Saxon and , Philip Gooch |
| Month |