xslt 1.0 如何将 < 转换为小于文字

xslt 1.0 How to convert &lt; into less than in words

我有以下XML

    <node>
    <operator>&lt;</operator>
<value>2</value>
    </node>
    <node>
    <operator>&gt;</operator>
<value>1.1</value>
    </node>.....

我需要将其转换如下 小于 2 大于 1.1

我尝试了以下代码,但它没有按预期工作。

有什么建议吗?

<xsl:variable name="lt">
 <xsl:text disable-output-escaping="yes">&lt;</xsl:text>
</xsl:variable>
<xsl:variable name="ConditionalDoseOperator">
<xsl:choose>
    <xsl:when test="operator=$lt">
    <xsl:value-of select="Lessthan" />
    </xsl:when>
    </xsl:choose>

 </xsl:variable>                                      

<xsl:value-of select="$ConditionalDoseOperator" />

我期待看到Lessthan的文字,但它是空白内容。

我建议采用简单的方法:

<xsl:for-each select="node">
    <xsl:choose>
        <xsl:when test="operator='&lt;'">less than</xsl:when>
        <xsl:when test="operator='&gt;'">greater than</xsl:when>
        <xsl:otherwise>
            <xsl:value-of select="operator"/>
        </xsl:otherwise>
    </xsl:choose>
    <xsl:text> </xsl:text>
    <xsl:value-of select="value"/>
    <xsl:text>&#10;</xsl:text>
</xsl:for-each>