Alex Rivera | Logout

Conditional statements in xsl

Asked 2009-07-21T15:13:20.487
21

I working on a site which some if/or statements in XSL and being a little unfamilar with the language i'm not certain how to accomplish:

if [condion one is met] or [condition two is met] then do [action] otherwise do [alternative action]

can anyone offer some examples?

Thanks in advance!

Edit
Report

1 Answer

0

In this case you would have to use a xsl:choose. It's like using if/else with a final else.

<xsl:choose>
  <xsl:when test="condition one or condition two">
    <!-- action -->
  </xsl:when>
  <xsl:otherwise>
    <!-- alternative action -->
  </xsl:otherwise>
</xsl:choose>
answered 2009-07-21T15:16:35.613

Your Answer