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

Rowspan and colspan

Subject: Rowspan and colspan
From: Danilo Fanchi <danilo.fanchi@xxxxxxxx>
Date: Mon, 02 May 2005 10:36:36 +0200
rowspan and colspan
Hi All,
I've an xml document like this in foot and I've to transform it in xhtml 
tables.
Now I've done the tr and th correct rendering and nesting, but what put 
me into troubles is the calculation of their attributes colspan and rowspan.

For the rowspan I've thought to calculate the maximum number from the 
child of the preceding:sibling and following:heading using the also the 
max() function from EXSLT...

<xsl:variable name="rowspan">   
    <xsl:for-each select="following-sibling::heading"> <!-- sorry 
everyone! -->
        <xsl:sort select="count(ancestor-or-self::heading)" 
order="descending"/>
            <xsl:if test="position()=1">
                <xsl:value-of select="count(ancestor-or-self::heading)"/>
            </xsl:if>
    </xsl:for-each>
</xsl:variable>

Anyone could give me some advice?
Thanks for the help!

Danilo

-------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<set>
    <tabForm>
        <title>Table caption</title>
        <rowHeader>
            <heading>th1
                <heading>th1_a</heading>
                <heading>th1_b
                    <heading>th1_b_a</heading>
                    <heading>th1_b_b</heading>
                </heading>
            </heading>
            <heading>th2</heading>
        </rowHeader>
    </tabForm>
</set>

[demime 1.01d removed an attachment of type application/x-pkcs7-signature which had a name of smime.p7s]

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.