[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: different crosstables from xml data
Hi Ingo, > How can I get the colspan / rowspan information? Has someone done > this before? When you're calculating column spans, you need to look at the number of columns that don't themselves have column children. You can find columns that don't have column children with: column[not(column)] You can find all such column elements under the current column element with: .//column[not(column)] And you can count how many there are with the count() function: count(.//column[not(column)]) To ignore the relative columns, you could use: count(.//column[not(column)][@type != 'relative']) You could use the same kind of technique to find rowspans. > Or should I generate different XML-Source for a better xslt > processing? Obviously the closer the XML source document is to the result that you want, the easier it's going to be for the XSLT to process it. If you generate something that has the same structure as the table element you want to produce, then you hardly have to do any transformation. I think the main thing that would make it easier would be if you only included the absolute/relative columns in the source XML if you wanted to have them present in the output. I wasn't sure from your message whether you wanted help with the rest of the transformation; let us know if you do. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ 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
|