[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] How to move the namespaces onto the root element when there is a namespace prefix that is bound to different namespaces?


Subject: Re: [xsl] How to move the namespaces onto the root element when there is a namespace prefix that is bound to different namespaces?
From: Andrew Welch <andrew.j.welch@xxxxxxxxx>
Date: Sun, 13 Jan 2013 20:01:23 +0000

> That works great, provided the XML document doesn't have the same namespace prefix bound to different namespaces. For example, it fails on this XML document:
>
> <Test xmlns="A">
>     <ns1:element xmlns:ns1="B">Hello</ns1:element>
>     <ns1:element xmlns:ns1="C">C</ns1:element>
> </Test>
>
> Notice that the namespace prefix, ns1, is bound to two different namespaces.

While that's possible.... don't do that, no one will thank you for it.



-- 
Andrew Welch
http://andrewjwelch.com


Current Thread
Keywords
xml