Subject: Re: [xsl] Identity transform (case conversion) From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx> Date: Sat, 8 Jul 2006 17:59:02 +0530 |
You earlier gave suggestion, that comparing the namespace-uri() instead of name() will make the stylesheet (George's code) compatible with both Saxon and MSXML. (for supressing the namespace xmlns:xml="http://www.w3.org/xml/1998/namespace" in output)
<xsl:for-each select="current()//namespace::*[not(.=$currentNamepsace) and not(name()='xml')]"> <xsl:attribute name="{translate(name(), $small, $caps)}:dummy{position()}" namespace="{translate(., $small, $caps)}"></xsl:attribute> </xsl:for-each>
<xsl:for-each select="current()//namespace::*[not(starts-with(.,'http://www.w3.org'))]"> <xsl:attribute name="{translate(name(), $small, $caps)}:dummy{position()}" namespace="{translate(., $small, $caps)}"></xsl:attribute> </xsl:for-each>
But following doesn't work (the namespace http://www.w3.org/xml/1998/namespace is getting generated in the output):
<xsl:for-each select="current()//namespace::*[not(. = 'http://www.w3.org/xml/1998/namespace')]">
(Please note the namespace uri comparison I am doing). What is wrong with the string comparison here?
Why at all the namespace, http://www.w3.org/xml/1998/namespace is part of node-set namespace::*. I am not sure, but does it relate to the XML Namespaces spec? (you hinted this in your previous answers)
Regards, Mukul
> Can you please clarify whether this is a bug with Xalan-J 2.7.0: > > This instruction is not generating the namespaces in the > output <xsl:copy-of select="current()//namespace::*" /> >
It looks like a non-conformance to me: Erratum E25 at http://www.w3.org/1999/11/REC-xslt-19991116-errata/ specifies the behaviour of xsl:copy and xsl:copy-of when applied to namespace nodes.
Michael Kay http://www.saxonica.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Identity transform (case , Michael Kay | Thread | Re: [xsl] Identity transform (case , George Cristian Bina |
RE: [xsl] Identity transform (case , Michael Kay | Date | Re: [xsl] Identity transform (case , George Cristian Bina |
Month |