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

RE: Using not(...a nd ... ) to select nodes

Subject: RE: Using not(...a nd ... ) to select nodes
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Thu, 10 Jul 2003 17:14:25 -0400
xslt not preceding
Chris,

Well, it's true I made a couple of assumptions (based on your description) about how your input data looks. To wit: that the values you are checking are all element children of the nodes you are testing (and not, for example, attributes).

Could we see a snippet of input data to confirm whether this is the case?

Yes, it's true preceding-sibling::* returns all preceding siblings. But the predicate expression filters this list. The trick is to get the filter right.

Cheers,
Wendell

At 05:02 PM 7/10/2003, you wrote:
Thanks for the try.

What you said makes complete sense and it looked to me like it should
work, but now I have the opposite problem... It's including everything.
:p

Preceding-sibling::* means ALL preceding siblings, correct?  If not,
that may be my problem, because the XML is not sorted/grouped in an
orderly fashion *grimace*.

Chris


> -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of > Wendell Piez > Sent: Thursday, July 10, 2003 4:11 PM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: Re: Using not(...a nd ... ) to select nodes > > > Chris, > > Try > > select="items/item[not(preceding-sibling::* > [name=current()/name and > type = current()/type and > status = current()/status])]" > > The problem with your statement is it's testing true if there no > corresponding values on any preceding siblings, whereas you > want it to be > true only if there's a preceding sibling with all > corresponding values. > > I hope that works for you-- > > Cheers, > Wendell



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


======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


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.