1

I have two possible values that I can output "A" and "B"

The problem that I am having is that for output "A", it has to satisfy 3-4 conditions, otherwise return "B". I tried using but I cannot figure it out.

I tried doing something like below

<xsl:if>Cond1
<xsl:if>Cond2
<xsl:if>Cond3
</xsl:if>
</xsl:if>
A
</xsl:if>
B

But this just returns both A and B if all the conditions are satisfied. Does anyone have any idea how to do this?

1 Answer 1

4

Try:

<xsl:choose>
    <xsl:when test="Cond1 and Cond2 and Cond3">A</xsl:when>
    <xsl:otherwise>B</xsl:otherwise>
</xsl:choose>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.