Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xslt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml XSLT。两个可能的输出值,多个if语句。有办法做到这一点吗?_Xml_Xslt - Fatal编程技术网

Xml XSLT。两个可能的输出值,多个if语句。有办法做到这一点吗?

Xml XSLT。两个可能的输出值,多个if语句。有办法做到这一点吗?,xml,xslt,Xml,Xslt,我有两个可能的值可以输出“A”和“B” 我遇到的问题是,对于输出“A”,它必须满足3-4个条件,否则返回“B”。我试过使用,但我想不出来 我试着做下面的事情 <xsl:if>Cond1 <xsl:if>Cond2 <xsl:if>Cond3 </xsl:if> </xsl:if> A </xsl:if> B Cond1 条件2 条件3 A B 但如果所有条件都满足,则只返回A和B。有人知道怎么做吗?试试: <xsl

我有两个可能的值可以输出“A”和“B”

我遇到的问题是,对于输出“A”,它必须满足3-4个条件,否则返回“B”。我试过使用,但我想不出来

我试着做下面的事情

<xsl:if>Cond1
<xsl:if>Cond2
<xsl:if>Cond3
</xsl:if>
</xsl:if>
A
</xsl:if>
B
Cond1
条件2
条件3
A
B
但如果所有条件都满足,则只返回A和B。有人知道怎么做吗?

试试:

<xsl:choose>
    <xsl:when test="Cond1 and Cond2 and Cond3">A</xsl:when>
    <xsl:otherwise>B</xsl:otherwise>
</xsl:choose>

A
B
试试:


A
B