viv:switch-string

switch function that is based on string arguments

Synopsis

object
	viv:switch-string
	(str, str-test-1, obj-1, ..., str-test-n, obj-n, obj-other);
string    str;
string    str-test-1;
object    obj-1;

...
;
string    str-test-n;
object    obj-n;
object    obj-other;

Description

Simple switch statement (which does not exist in XPath 1.0) based on the value of string.

Arguments

Returns

Example

    <xsl:value-of select="viv:switch-string(@source, 'MSN', 1, 'Yahoo', 2, 3)"/>