を使用して条件に従ってXMLの値を変更する方法XMLのように:私が持っているXSLT
予想される出力: 場合<present>true</present>
<all>
<one>Something 1</one>
<two>something 2</two>
<check>
<present>true</present>
</check>
<action>
<perform></perform>
</action>
</all>
all>
<one>Something 1</one>
<two>something 2</two>
<check>
<present>YES</present>
</check>
<action>
<perform>READ</perform>
</action>
</all>
else if:<present>false</present>
<all>
<one>Something 1</one>
<two>something 2</two>
<check>
<present>NO</present>
</check>
<action>
<perform>INSERT</perform>
</action>
</all>
できますか? 私は要素を移動しようとしたが働いていなかった条件は、XSL にチェックについて認識していない午前:
<xsl:template match="perform">
<xsl:copy>
<xsl:choose>
<xsl:when test="../check/present = 'true'">
<xsl:text>READ</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
</xsl:copy>
</xsl:template>
ありがとうございます。それは働いた –