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

Re: different crosstables from xml data

Subject: Re: different crosstables from xml data
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Tue, 23 Oct 2001 12:38:15 +0100
relative columns
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


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.