【发布时间】:2018-02-21 04:18:45
【问题描述】:
我有一个 xml 文件,我可以使用 xsl 文件访问数据。但是当我将 xsd 添加到我的 xml 文件时,我无法使用我的 xsl 文件。请帮帮我
<updateClient
xsi:schemaLocation=" file://updateClient.xsd"
xmlns="http://"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<fileHeader>
<messageType version="100">
<recordTp>722</recordTp>
</messageType>
<sendingCompany>some</sendingCompany>
<processDate>2018-02-13</processDate>
<recordCount>10</recordCount>
</fileHeader>
</updateClient>
我的 XSL 文件
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:x="http://localhost" exclude-result-prefixes="x" >
<xsl:template match="/">
<html>
<body>
<h2>My Collection</h2>
< table>
<tr>
<xsl:for-each select="updateClient/fileHeader/messageType">
<td> <p>RecordType :<xsl:value-of select="recordTp" /></p> </td>
</xsl:for-each>
</tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
【问题讨论】:
-
@Dimitre Novatchev 你能帮帮我吗?