I want to assign multiple variables depending on one condition environment. I know how to do that for only one variable:
<xsl:variable name="foo">
<xsl:choose>
<xsl:when test="$someCondition">
<xsl:value-of select="3"/>
<xsl:when>
<xsl:otherwise>
<xsl:value-of select="4711"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
But what if I want to assign two variables depending on the same condition $someCondition?
I don't want to write the same xsl:choose statement again, because it is somewhat lengthy and computation intensive in the real example.
The environment in question is libxslt (xslt 1.0) with exslt extensions.
EDIT: What i want is a behaviour similar to
if (condition) {
foo = 1;
bar = "Fred";
}
else if (...) {
foo = 12;
bar = "ASDD";
}
(... more else ifs...)
else {
foo = ...;
bar = "...";
}