Subject: Re: [xsl] xsl list breakdown? From: Mike Brown <mike@xxxxxxxx> Date: Sat, 31 Aug 2002 12:54:30 -0600 (MDT) |
Michael wrote: > How would I take a <list><item/><item/><item/></list> and say break it > down into a table with 2 elements per row? Thanks. Select the items that start each row. Generate a row for each of those. The first cell's content is based on the current item; tje second cell's content is calculated relative to the current item. If there's no content to fill in a cell, use ' '. If you want to do colspan tricks instead, you just have to think of a way to test that the current node is not the last in the row, and that it doesn't have following siblings. Then you can generate a colspan attribute with xsl:attribute, and give it a value that is (max # of columns - 1) - position() ... at least, that's one way to go about it. Have you skimmed through the FAQ at http://www.dpawson.co.uk/ ? Many examples there... - Mike ____________________________________________________________________________ mike j. brown | xml/xslt: http://skew.org/xml/ denver/boulder, colorado, usa | resume: http://skew.org/~mike/resume/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] xsl list breakdown?, Michael | Thread | [xsl] How to copy whole source tree, Marcin Stefaniuk |
[xsl] How to copy whole source tree, Marcin Stefaniuk | Date | Re: [xsl] How to copy whole source , Mike Brown |
Month |