<Data>
<heading xmlns="Some Uri">
<text>aaa</text>
</heading>
<Data>
XSLT寫道
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:link1="Some Uri">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="Data">
<xsl:value-of select="link1:heading/namespace-uri()"/>
</xsl:template>
</xsl:stylesheet>
我得到的錯誤。
任何人都可以幫助如何獲得命名空間。
謝謝。
我相信你正在尋找'namespace-uri()' http://stackoverflow.com/questions/529556/xpath-find-elements-by-attribute-namespace – StuartLC
您輸入的XML不是值(額外的'')。 – Phrogz