RE: Conditional selection of Templates in XSL

Subject: RE: Conditional selection of Templates in XSL
From: "Pawson, David" <DPawson@xxxxxxxxxxx>
Date: Tue, 29 Aug 2000 14:31:04 +0100
> My only question is how do I handle the <tr> and <td> contained
> within tables. I've tried something like..
> <xsl:template match="tr[not(ancestor::Table)]> 
> 	<tr>
> 		<xsl:apply-templates/>
> 	</tr>
> </xsl:template>
> which I thought should select all the <tr> elements children of
> the context node that don't have table ancestors (i.e. are 
> not nested). 
> The same would apply for <td> elements.
> The XSL above doesn't work.  It actually seems to work in 
> reverse order
> i.e. it outputs <tr> for nested tables !!

If you want to *include* the higher level of tables,
and exclude the doubly nested ones, try the other axis



 XSL-List info and archive:

Current Thread