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

RE: How to find all parents having the same child?

Subject: RE: How to find all parents having the same child?
From: "Lars Huttar" <lars_huttar@xxxxxxx>
Date: Tue, 17 Jun 2003 21:44:40 -0500
find the parents of
> can anyone tell me how to find all parents having the
> same child? 

DNA testing?  Ha, ha.

Seriously, it depends what you mean by "the same child."
If you mean there is just one child node and you want
to find all its parents, use select=".." (or ="parent::*").
Of course you will never get more than one node as
the answer because no node has more than one parent.

If you mean all nodes that have a child whose text value
is the same as a given value, use
  select="//*[*[. = $value]]"

If you mean all nodes that have a child whose name
is the same as a given value, use
  select="//*[*[local-name(.) = $value]]"


> An example would really help me.

It would really help me too!

Lars


 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.