This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: logical and in selection expression possible?
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Sat, 20 Jul 2002 17:50:57 +0100
- Subject: RE: [xsl] logical and in selection expression possible?
- Reply-to: xsl-list at lists dot mulberrytech dot com
> 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@ntlworld.com
work: Michael.Kay@softwareag.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list