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

check for ancestors attribute

Subject: check for ancestors attribute
From: "Robert Soesemann" <rsoesemann@xxxxxxxxxxx>
Date: Tue, 8 Feb 2005 12:11:34 +0100
ancestor check
How do I need to extend this template to match not only <foo name="bar"> but
further restrict my template to those <foo>s that have an ancestor with
attribute type="general".

<xsl:template match="foo[@name='bar']">

</xsl:template>

I only want to match e.g.
<...>
	...
	<...type="general">
	...
		<foo name="bar">		<<--- match this
		..
		</foo>
	...
	</...>
	...
</...>

It seem to be not OK to write:

<xsl:template match="foo[@name='bar' and ancestor::@type='general']">

</xsl:template>

Can you help?

--
Robert Svsemann
Associate, Technology | Sapient

Kellerstr. 27
81667 M|nchen, Deutschland
Tel.: +49 89/552 987-143
Mobil: +49 162/2773-143
Fax: +49 89/552 987-100
Email: rsoesemann@xxxxxxxxxxx

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.