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

Re: Re: Sibling in the Pattern(match)

Subject: Re: Re: Sibling in the Pattern(match)
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Tue, 25 Nov 2003 07:36:19 +0100
acc3 filter
"Dongling Ding" <dling61@xxxxxxxxx> wrote in message
news:20031124222530.31216.qmail@xxxxxxxxxxxxxxxxxxxxxxxxxx
> Thanks!
>
> It works in your example. But for my example, how can
> I filter out the member "acc12"?
>
> <xsl:template match="*[preceding-sibling::Member[@name
> ='acc1']/Member[@name='acc11']]"/>
>
> It filtered members "acc2" and "acc3" instead of
> "acc12" and its child "acc121"?
>
> Here is the source XML:
>
> <D>
> <Member comment="" name="acc1">
> <Calc>+</Calc>
> <Member comment="" name="acc11">
> <Calc>+</Calc>
> <Member name="account3_1"/>
> </Member>
> <Member comment="" name="acc12">
> <Calc>+</Calc>
> <Member name="acc121"/>
> </Member>
> </Member>
> <Member comment="" name="acc2">
> <Calc>+</Calc>
> </Member>
> <Member comment="" name="acc3">
> <Calc>+</Calc>
> <Member comment="" name="acc31">
> <Calc>+</Calc>
> </Member>
> <Member comment="" name="acc32">
> <Calc>+</Calc>
> </Member>
> </Member>
> </D>
>

I am sorry, but it is not clear at all what you want to achieve.

Probably by "filter" you mean "match"? AFAIK "filter" means to remove, not
to select, so "to filter" is the opposite of "to match".

There are no 'members "acc2" and "acc3' -- there are "Member" elements whose
"name" attribute is "acc2" and "acc3".

Say what you want to achieve (which you haven't done) and many people in
this list will be able to help. More importantly, say what is it you don't
understand.

Also, if you keep sending unreadable source xml documents, you are
intentionally making it very difficult for anyone to understand your
questions. The unindented source xml document from your last message may be
better represented as the following more readable document:

<D>
  <Member comment="" name="acc1">
    <Calc>+</Calc>
    <Member comment="" name="acc11">
      <Calc>+</Calc>
      <Member name="account3_1"/></Member>
    <Member comment="" name="acc12">
      <Calc>+</Calc>
      <Member name="acc121"/></Member></Member>
  <Member comment="" name="acc2">
    <Calc>+</Calc>
  </Member>
  <Member comment="" name="acc3">
    <Calc>+</Calc>
    <Member comment="" name="acc31">
      <Calc>+</Calc>
    </Member>
    <Member comment="" name="acc32">
      <Calc>+</Calc>
    </Member>
  </Member>
</D>


=====
Cheers,

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




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


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.