0

I need to test for 1 of 2 possible tags in a for-each-group. Is this possible? What is the correct syntax?

I tried "||" but got an error from the parser. I'm using Saxon PE 9.3 in Oxygen 12.1.

Ex.

<xsl:param name="elements" as="element()*"/>    
<xsl:for-each-group select="$elements"
                group-starting-with="condition or condition" >
    <xsl:for-each-group>
Jeff
  • 877
  • 2
  • 11
  • 17

1 Answers1

0

If you're wanting to group starting with either of two element names, try

<xsl:for-each-group select="$elements"
            group-starting-with="foo | bar">
LarsH
  • 27,481
  • 8
  • 94
  • 152
  • I think that's what you're asking, but if you're actually asking about using boolean conditions, use `group-starting-with="node()[condition1 or condition2]"` – LarsH Jun 29 '12 at 21:01
  • No, that's exactly what I needed. I actually had just found the answer in this thread. http://stackoverflow.com/questions/2219127/can-i-use-and-operator-in-xsl-for-each Thanks for the help! – Jeff Jun 29 '12 at 21:17