xsl-list
[Top] [All Lists]

Xalan won't accept QName in XPath node test

2003-05-07 07:24:10
I hope one of you guys have seen before and can give me a hint as to what I am doing wrong. I cannot find anything pointing me to a solution either in this mailing list or elsewher.

Simple problem : Match an element in a default namespace from an XSL stylesheet.
Wrong solution:  (My files are inlined below)
Declaring the same namespace as 'art' within the stylesheet and using the xpath expression "art:Article" to match <Article/> elements.

That does not work. XmlSpy / IE6 has no trouble stylesheeting the same files.

Am I doing something wrong or is Xalan doing something wrong?

Any help and hints greatly apprecieated.


*Source document*
<Article xmlns="/type/Article.xsd">
   <title>foo</title>
   <body>bar</body>
</Article>

*Stylesheet*
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
               xmlns:art="/type/Article.xsd"
               version="1.0">
   <xsl:template match="art:Article">Matched!</xsl:template>
</xsl:stylesheet>



--
Kim Thrysøe
kt(_at_)atira(_dot_)dk
22 48 61 54
96 35 61 00



XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>