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

Re: Template doesn't seem to match

Subject: Re: Template doesn't seem to match
From: Markus Abt <abt@xxxxxxxx>
Date: Tue, 10 Jul 2012 12:53:24 +0200
Re:  Template doesn't seem to match
russurquhart1@xxxxxxxxxxx wrote:
> that actually seems to have worked!!
> 
> But i thought that an xpath like SubSection[*[@filter='filter1']] is read as, 
> a SubSection element that contains any children having a filter attribute 
> equal to 'filter1'.

Yes, exactly.

But that's not what you want. What you want is to match a SubSection 
element that contains any _descendant_ having a filter attribute equal 
to 'filter1'. A grandchild is not a child.

In my recent example, the leftmost SubSection does not have a child 
with @filter="filter1", but it has a grandchild (or more general, a 
descendant) with @filter="filter1":

SubSection/SubSection/SubSection[@filter='filter1']

Markus

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.