Re: [xsl] or condition

Subject: Re: [xsl] or condition
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Fri, 02 Aug 2002 17:11:06 -0400
To add to what David says,

At 06:08 AM 8/2/2002, subbu@xxxxxxxxxxxx wrote:
and one more question i wanted to ask is that.. is there a way to do some stunt
like
<xsl:if test="$b = '10' and ($a = ('1' or '2'or '3' or '4'))">

If you really do want the value of $a tested as a string not a number, you can do


test="$b='10' and contains('1~2~3~4', $a)"

but this won't pass if you want to allow $a to be, say, '1.0' (then you want to test equality as a number), and it will pass if $a is ever '~' or another valid substring of the test string.

Cheers,
Wendell



======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread