如何使用存储在XSL文件内不同位置的XML文件

时间:2013-03-25 11:39:22

标签: xslt

我在D:\ test

下面存储了以下XML文件
<?xml version="1.0" encoding="utf-8"?>
<!--Your comments.-->
<root>
<Sample name="pal">
<Name>pal</Name>
<Age>24</Age>
<Job>software</Job>
</Sample>
</root>

我试图在D:\ test \ test1 \ test2下面的XSL文件中使用它:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<xsl:for-each select="root/sample">
<tr>
<td><xsl:value-of select="Name" /></td>
<td><xsl:value-of select="Age" /></td>
</tr>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

我无法获得所需的结果。

0 个答案:

没有答案