[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: xsl list breakdown?

Subject: Re: xsl list breakdown?
From: Mike Brown <mike@xxxxxxxx>
Date: Sat, 31 Aug 2002 12:54:30 -0600 (MDT)
max stefaniuk
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 '&#160;'.

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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.