我怎样才能DISPLY相同的水平元素的值后,如果conditonXSL如果conditon显示相同的水平元素
例如
XML
<catalog>
<cd>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
<cd>
<title>Hide your heart</title>
<artist>Bonnie Tyler</artist>
<country>UK</country>
<company>CBS Records</company>
<price>9.90</price>
<year>1988</year>
</cd>
<cd>
<title>Greatest Hits</title>
<artist>Dolly Parton</artist>
<country>USA</country>
<company>RCA</company>
<price>9.90</price>
<year>1982</year>
</cd>
XSLT
<xsl:if test="/catalog/cd/country='UK'">
<xsl:value-of select="title"/>
<xsl:value-of select="artist"/>
</xsl:if>
这不会displying UK级元素的标题和艺术家
我知道,解决它的方法之一是使用每个循环,但我在寻找一种有效的方法