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

RE: Node selection question

Subject: RE: Node selection question
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Wed, 16 Feb 2000 09:45:05 -0000
RE: Node selection question
The context() function is not defined in XSLT so I guess you are using the
old Microsoft so-called-XSL? IF SO, PLEASE SAY SO!

Assuming you want an XSLT solution the answer is

<xsl:apply-templates select="//INFO-OBJ[not(parent::INFO-OBJ)]" />

or perhaps more efficiently:

<xsl:apply-templates 
		select="/descendant::*[not(self::INFO-OBJ)]/INFO-OBJ" />

Mike Kay

> What I want to do is to select all the INFO-OBJ nodes that
> are not children of INFO-OBJ nodes.  The following statement works but
> as this will be applied to many documents of different structures and
> I've only tested on one, I want to know if this is the best 
> way to make this sort of selection.
> 
> <xsl:apply-templates select="//INFO-OBJ[context()[not(INFO-OBJ)]]" />
> 


 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.