|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Applying different transformations to every n'th node
Philip,
This is just to get the 4th category to display in a different row.Hope
this helps.
<xsl:for-each select="//category[position()< 4]">
<xsl:value-of select="."/><xsl:text> </xsl:text>
</xsl:for-each>
<xsl:for-each select="//category[not(position()<4)]">
<xsl:value-of select="."/><xsl:text> </xsl:text>
</xsl:for-each>
Change the < sign to = if u want to have a different template for the 4th
category.
Francis
*****************************************************
The woods are lovely,dark and deep.
But I have promises to keep,
And miles to go before I sleep
And miles to go before I sleep.
*****************************************************
> I have some xml that goes something like:
>
> ...
> <categories>
> <category id="something">Name of Category</category>
> <category id="something">Name of Category</category>
> <category id="something">Name of Category</category>
> ...
> </categories>
> ...
> Basically, what I am trying to do is create a table with 3
> columns, so I
> want every fourth column to start a new table row.
>
> --
> Philip McAllister
> Web Developer, ticketingsolutions
> pem@xxxxxxxxxxxxxxxxxxxxxx
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
|

Cart








