Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/loops/2.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
XSLT xsl:选择probem_Xslt_Xslt 1.0 - Fatal编程技术网

XSLT xsl:选择probem

XSLT xsl:选择probem,xslt,xslt-1.0,Xslt,Xslt 1.0,我的一行xml代码如下所示: <cf_task_subscription amount="1200.0" code="GBP">£1,200.00</cf_task_subscription> 1200.00英镑 我想设置一个xls:choose规则,如下所示,但我不能这样做,因为XML正在添加符号: <xsl:variable name="value" select="/hash/cf_ta

我的一行xml代码如下所示:

<cf_task_subscription amount="1200.0" code="GBP">£1,200.00</cf_task_subscription>
1200.00英镑
我想设置一个xls:choose规则,如下所示,但我不能这样做,因为XML正在添加符号:

<xsl:variable name="value" select="/hash/cf_task_subscription"/>
<xsl:choose>
    <xsl:when test="$value > 1200.0">John Doe</xsl:when>
    <xsl:when test="$value = 1200.0">Jane Doe</xsl:when>
    <xsl:otherwise>Unassigned</xsl:otherwise>
</xsl:choose>

无名氏
无名氏
未分配
我的问题是,有没有一种方法可以告诉XSL只考虑CFUTASKSO订阅标签的金额“1200”部分?< /P>
谢谢,

由于信息是在属性中以结构化形式提供的,与文本节点中的“显示形式”不同,因此请充分利用它:

<xsl:when test="$value/@amount > 1200.0">John Doe</xsl:when>
johndoe