[Home] [By Thread] [By Date] [Recent Entries]

Subject: Re: Selecting specific ancestory by relation and name
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 9 Oct 2000 23:30:56 GMT

It appears that you just want

<xsl:template match="A/C">
something
</xsl:template>


<xsl:template match="C"/> <!-- nothing -->


but if you really want to go up and down with an xpath

"parent::A/C" is simpler (and better if namespaces are involved) than 

"ancestor::*[1][name()='A']/C"

David



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


Current Thread
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member