[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] Getting a
Hello David,
Thanks for the explanation.
What i indeed needed was a tablerow within the table where the cells didn't have a colspan. That way i can use that as the basis for generating the amount of <col> entries with some extra attributes (which weren't in the code yet). The later code wasn't correct yet cause i was trying some stuff out, which i maybe should have left out.
Regards,
Casper Voortman
Op 25 jun 2009, om 19:01 heeft David Carlisle het volgende geschreven:
Re: [xsl] Getting a where doesn't contain a colspan attribute |
Subject: Re: [xsl] Getting a <TableRow> where <Cell> doesn't contain a colspan attribute From: Casper Voortman <casper.voortman@xxxxxxxxxxxx> Date: Thu, 25 Jun 2009 19:54:12 +0200 |
Hello David,
Thanks for the explanation.
What i indeed needed was a tablerow within the table where the cells didn't have a colspan. That way i can use that as the basis for generating the amount of <col> entries with some extra attributes (which weren't in the code yet). The later code wasn't correct yet cause i was trying some stuff out, which i maybe should have left out.
Regards,
Casper Voortman
Op 25 jun 2009, om 19:01 heeft David Carlisle het volgende geschreven:
ypu haven't really said what test you want (or why you need a test since
the for-each you have inside the test doesn't use the ColSpan attribute?
<xsl:when test="not(descendant::TableRow/Cell/@ColSpan)
is true if there are no ColSpan attributes
<xsl:when test="descendant::TableRow/Cell[not(@ColSpan)]
is true if there are Cell elements without a ColSpan attribute
<xsl:for-each select="descendant::TableRow/Cell"> <col/> </xsl:for-each>
That's going to give you a <col/> for every cell in the table, is that really what you want?
perhaps you want to find if there is a row in which ever cell does not
span, and if so make a col/> for each element in the first such row.. in which case
<xsl:for-each select="descendant::TableRow[not(Cell/@ColSpan)][1]/ Cell">
<col/>
</xsl:for-each>
Best not to use descendant:: as its inefficient 9and wrong if there are
nested tables) I think probably it's
<xsl:for-each select="*/TableRow[not(Cell/@ColSpan)][1]/Cell"> <col/> </xsl:for-each>
where * will match TableHeader TableFooter or TableBody
David
________________________________________________________________________ The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. ________________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Getting a <TableRow> wher, David Carlisle | Thread | [xsl] Failing string() test fail, Karl Stubsjoen |
Re: [xsl] Getting a <TableRow> wher, David Carlisle | Date | [xsl] Failing string() test fail, Karl Stubsjoen |
Month |