06/06/28 01:24:22
「200万円以上の車は●台あります」 と表示させたいのですが
carsの中にpriceが200であるcarがひとつでも入っていたら全てをカウントしてしまうみたいで困っています
どうしたらいいのでしょうか?
<?xml version="1.0" encoding="Shift_JIS" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="URLリンク(www.w3.org)
<xsl:output method="html" encoding="Shift_JIS"/>
<!--文章-->
<xsl:template match="/">
<html>
<xsl:apply-templates select="cars"/>
</html>
</xsl:template>
<!-- 車 -->
<xsl:template match="cars">
200万円以上の車は
<xsl:if test="(car/price) > 200">
<xsl:value-of select="count(car)"/>
</xsl:if>
台あります。
</xsl:template>