Re: [xsl] Is there an OR for XSL IF?

Subject: Re: [xsl] Is there an OR for XSL IF?
From: David Mitchell <david.mitchell@xxxxxxxxx>
Date: Tue, 3 Jan 2012 21:25:54 -0600
You could use the choose, when, and otherwise elements to give you the
same semantics as if, then, and else.

The union operator in XPath isn't really the same as 'or'.

Dimitre posted on stack overflow:
http://stackoverflow.com/questions/3494173/xpath-or-behaving-like-union-with-
xmllib2

On Tue, Jan 3, 2012 at 8:56 PM, GWmbox <gwmbox@xxxxxxxxx> wrote:
> I have had a read through the W3C stuff for IF elements but I cannot find
> anything conclusive about an OR for the IF elements.
>
> Is there in fact an option for OR, is it the | to do this. Can I have
> something like
>
> <xsl:if test="myfield/field_is_available/data = 'Yes'" |
> test="myfield/seconsfield_is_available/data = 'Yes'">
>
> Or do I need to use something else.
>
> Thanks for your help
>
> GW

Current Thread