mk12
mk12

Reputation: 26394

XSLT - Match element with multiple child elements

<xsl:template match="element[child]">
The above works. What is the real syntax for the following pseudo-syntax? :
<xsl:template match="element[child1 AND child2]">

In the place on AND:

What is it?

Thanks.

Upvotes: 0

Views: 1059

Answers (1)

Jim Garrison
Jim Garrison

Reputation: 86774

Try

element[child1][child2]

From Michael Kay's latest XSLT/XPath 2.0 reference:

Each predicate is applied to the sequence in turn; only those items in the sequence for which the predicate is true pass through to the next stage. The final result consists of those items in the original sequence that satisfy eadh of the predicates, retaining their original order.

(Page 638)

Upvotes: 2

Related Questions