[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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]
|
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
|