[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Identity transform (case conversion)
Thanks Mike for the clarification. I have 2 more questions..
1st question: 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) The relevant portion of code is (please see the code that George posted): <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> I changed this to: <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> This works.. 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? I am using Saxon 8.7.3. 2nd question: 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 On 7/8/06, Michael Kay <mike@xxxxxxxxxxxx> wrote: > 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::*" /> >
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|