xsl-list
[Top] [All Lists]

Re: : Sibling in the Pattern(match)

2003-11-25 23:13:47

"Dongling Ding" <dling61(_at_)yahoo(_dot_)com> wrote in message
news:20031126045130(_dot_)29425(_dot_)qmail(_at_)web13906(_dot_)mail(_dot_)yahoo(_dot_)com(_dot_)(_dot_)(_dot_)



Hi Dimitre,

It is the true for the
"Member[(_at_)name='acc1']/Member[(_at_)name='acc11'" in the
match attribute.

But if want to match the sibling of the member with
name "acc11" in this case, can I say something like
this?

match="*[preceding-sibling::Member[(_at_)name
='acc1']/Member[(_at_)name='acc11']]"


If I did this, it will remove the siblings of the
member with the name "acc1", not "acc11".

Yes, this is what you wrote... Why did you expect anything else?

To match the preceding siblings of a Member element with name="acc11", which
is a child of a Member with name='acc1' use:

    Member[(_at_)name = 
'acc1']/Member[(_at_)name='acc11']/preceding-sibling::Member



=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL




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