xsl-list
[Top] [All Lists]

Re: [xsl] Template doesn't seem to match

2012-07-10 05:56:29
russurquhart1(_at_)verizon(_dot_)net 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


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>