Subject: Re: [xsl] Borders on column groups From: David Carlisle <davidc@xxxxxxxxx> Date: Fri, 7 Jun 2002 11:50:54 +0100 |
> I had expected 1, 2, 3 and 4. I didn't! Which is why i put a comment in my code snippet. Usually the odd numbered nodes are white space text nodes. if you have <tr> <th> ..</th> <th> ..</th> </tr> then there are 4 child nodes of tr, and the two th's are 2 and 4. if you want to use position() then zap the white space so either use <xsl:apply-templates select="th"/> rather than <xsl:apply-templates/> that way there's only th nodes in the list and so only they count for position() or use xsl:strip-space eleemnts="tr" so you ignore white space in tr while building the input, or define $x to be count(preceding-sibling::th)+1 rather than position(). David _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Scanning Service. For further information visit http://www.star.net.uk/stats.asp or alternatively call Star Internet for details on the Virus Scanning Service. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Borders on column groups, Gustaf Liljegren | Thread | Re: [xsl] Borders on column groups, David Carlisle |
Re: [xsl] Borders on column groups, Gustaf Liljegren | Date | [xsl] Newbie: See if a node exists!, Américo Albuquerque |
Month |