有没有一种简单的方法可以让下面的代码只显示不同的值?
<xsl:template match="/">
<xsl:for-each select="NewDataSet/Vehicle">
<xsl:value-of select="ManufacturerName" />
</xsl:for-each>
<!-- Does a load of other stuff down here -->
</xsl:template>
这基本上是 xml 的样子:
<NewDataSet>
<Vehicle>
<ManufacturerName>FORD</ManufacturerName>
</Vehicle>
<Vehicle>
<ManufacturerName>CHEVROLET</ManufacturerName>
</Vehicle>
<Vehicle>
<ManufacturerName>VAUXHALL</ManufacturerName>
</Vehicle>
<Vehicle>
<ManufacturerName>VAUXHALL</ManufacturerName>
</Vehicle>
<Vehicle>
<ManufacturerName>VAUXHALL</ManufacturerName>
</Vehicle>
</NewDataSet>
谢谢。