Hvorfor virker mine choose ikke i nedestående
Jer har prøvet følgende kode, men det virker ikke. Hvorfor ikke?XML-kode:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml:stylesheet type="text/xsl" href="Test1.xsl"?>
<NoInterestEntry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Transfer>
<Charge>
<ChargeID>DB</ChargeID>
<ChargeAmount>
<Value>70,00</Value>
<Currency>DKK</Currency>
</ChargeAmount>
</Charge>
<Charge>
<ChargeID>UD</ChargeID>
<ChargeAmount>
<Value>100,00</Value>
<Currency>DKK</Currency>
</ChargeAmount>
</Charge>
</Transfer>
</NoInterestEntry>
XSL-Kode
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html>
<body>
<table>
<xsl:for-each select="NoInterestEntry/Transfer/Charge">
<xsl:choose>
<xsl:when test=" ChargeID= 'DB'">
<tr>
<td>
<xsl:value-of select="ChargeAmount/Value"/>
<xsl:value-of select="ChargeAmount/Currency"/>
</td>
</tr>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>