Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[xsl] Rowspan and colspan

From: Danilo Fanchi <danilo.fanchi@-------->
To:
Date: 5/2/2005 8:38:00 AM
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]


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent