Subject: Re: [xsl] Identity transform (case conversion) From: George Cristian Bina <george@xxxxxxxxxxxxx> Date: Sun, 09 Jul 2006 08:51:54 +0300 |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/*"> <namespaces> <xsl:for-each select="current()//namespace::*"> <namespace> <prefix> <xsl:value-of select="name()"/> </prefix> <ns> <xsl:value-of select="."/> </ns> </namespace> </xsl:for-each> </namespaces> </xsl:template> </xsl:stylesheet>
will give with MSXML 4.0 on a <dummy/> document:
<?xml version="1.0" encoding="UTF-16"?> <namespaces> <namespace> <prefix>xml</prefix> <ns>http://www.w3.org/XML/1998/namespace</ns> </namespace> </namespaces>
Best Regards, George --------------------------------------------------------------------- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com
It would really be a nasty bug, in case Mukul got that output.
However, what he got (note the capitalisation) was:
<AUTHOR xmlns:auto-ns1="HTTP://WWW.W3.ORG/XML/1998/NAMESPACE" xmlns:A="XYZ" xmlns:B="PQR">
Also in the code sample he provided there is no filtering of the "xml" namespace.
Mukul's statement that:
But this predicate doesn't work as expected, with MSXML. MSXML outputs xmlns:auto-ns1="http://www.w3.org/xml/1998/namespace" in the absence of this predicate.
is both contradictory and untrue. Contradictory, because he says "this predicate doesn't work as expected, with MSXML" and then makes it clear what "didn't work" was produced "in the absence of this predicate".
Untrue, because the real result is very different:
xmlns:auto-ns1="HTTP://WWW.W3.ORG/XML/1998/NAMESPACE"
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Identity transform (case , Dimitre Novatchev | Thread | Re: [xsl] Identity transform (case , Mukul Gandhi |
Re: [xsl] Identity transform (case , Dimitre Novatchev | Date | Re: [xsl] Identity transform (case , Mukul Gandhi |
Month |