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

RE: logical and in selection expression possible?

Subject: RE: logical and in selection expression possible?
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Sat, 20 Jul 2002 17:50:57 +0100
xsl position logical and
> Ok, I've run into a bit of a snag.
> When I am passing the union of the nodesets to the applied 
> template, it 
> appears that the template is being activated twice.  I was 
> hoping to be able 
> to access both nodesets at the same time.... unless they are 
> the children of 
> the same parent, is this impossible?

I think you are confused.

When you call xsl:apply-templates you select a set of nodes. For each
node in that set, one template rules is activated: specifically, the
template rule that best matches that node. It may be the same template
rule for all nodes, or it may be different rules for different nodes. If
you select 2 nodes, if they match the same template rule then that
template rule will be activated twice. Within the template rule, you
cannot access the whole node-set, you can only access the specific node
(and you can use position() to determine its position within the
node-set).

Is that any clearer?

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 


 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.