<xoe:documents xmlns:xoe="http://xxxxxx" count="1">
<xocs:doc xmlns:xocs="xxxxxx" xmlns:xsi="yyyyyyy" xsi:schemaLocation="zzzzzz">
<xocs:meta>...</xocs:meta>
<xocs:serial-item>
<!-- this line -->
<article xmlns:sa="www.google.hgy" xmlns="http://www.xyzq1.org/xml/ja/dtd" version="5.4" xml:lang="pl" docsubtype="rev">
<article-info>
</article-info>
</article>
</xocs:serial-item>
</xocs:doc>
</xoe:documents>
我无法获得'xml:lang'属性的值。甚至认为我与下面的XPath无法获得'xml:lang'属性的值
<xsl:variable name="rootPath" select="/xoe:documents/xocs:doc/xocs:serial-item"/>
<xsl:variable name="lang" select="$rootPath/ja:article[@xml:lang]"/>
or
<xsl:variable name="lang" select="$rootPath/ja:article/@xml:lang"/>
这里试图JA是我的XSLT代码
xmlns:ja="http://www.xyzq1.org/xml/ja/dtd"
有人能帮帮已经定义?
在您的示例XML中,“article”位于“www.yahoo.mkt”命名空间中,而不是“http:// www.xyzq1.org/xml/ja/dtd”。 – JLRishe
谢谢,我改变了。仍然没有结果。 –