私は以下のようなxml入力を持っています:
<food>
<fruit>Orange</fruit>
isGood
<fruit>Kiwi</fruit>
isGood
<fruit>Durian</fruit>
isBad
</food>
以下のようなhtmlステートメントに変換したい:
オレンジはいいね。キウイはいいね。ドリアンはまずい。
果物の要素はすべてイタリックであることに注意してください。
私が持っているコードは以下のようなものですが、問題があります。
<xsl:template match="/" >
<food>
<xsl:apply-templates select="food"/>
</food>
</xsl:template>
<xsl:template match="food">
<xsl:element name="fruit">
<xsl:value-of select="fruit" />
</xsl:element>
</xsl:template>