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
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