我有一个 XML 和 XSL 代码,产品有图像和描述。我想将此图像附加到描述标签中。
<images>
<img_item type_name="">http://www.example.com.tr/ExampleData/example1.jpg</img_item>
<img_item type_name="">http://www.example.com.tr/ExampleData/example2.jpg</img_item>
<img_item type_name="">http://www.example.com.tr/ExampleData/example3.jpg</img_item>
</images>
我这样写 XSL 代码(但它没有得到 img_type 的值):
<Description>
<xsl:for-each select="images/img_item">
<xsl:text><![CDATA[<br/><img src="]]></xsl:text>
<xsl:value-of select="images/img_item"/>
<xsl:text><![CDATA[" />]]></xsl:text>
</xsl:for-each>
</Description>
我的代码不起作用。我怎样才能得到 img_type 的价值(我怎样才能得到这些链接。)