This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: logical and in selection expression possible?


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]