[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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
RE: Conditional selection of Templates in XSL
> 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

match="tr[not(descendant::Table)]> 

HTH DaveP


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.