Subject: [xsl] Rowspan and colspan From: Danilo Fanchi <danilo.fanchi@xxxxxxxx> Date: Mon, 02 May 2005 10:36:36 +0200 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Newbie question on Recusr, Aron Bock | Thread | [xsl] basic question about xalan/xs, NGUYEN Hong Thai |
Re: [xsl] Newbie question on Recusr, omprakash . v | Date | [xsl] basic question about xalan/xs, NGUYEN Hong Thai |
Month |