Is the new namespace really the same as the old, or is that a typo?

If the new namespace is different, say 'http://www.gym.com/2', then there's a 
problem, because an element can't contain both the namespace declarations 
xmlns='http://www.gym.com/2' and 'http://www.gym.com'.

I have to admit my memory of the detail of XQuery Update is very hazy, I 
haven't done any work in this area for several years, so I'll have to refresh 
it, but it would be nice first to have confirmation of whether the question is 
correct as written.

Michael Kay
Saxonica
[email protected]
+44 (0) 118 946 5893




On 16 Sep 2014, at 11:10, Leo Studer <[email protected]> wrote:

> Hello
> 
> I use the following query with Saxon-EE xQuery 9.5.1.5 in Oxygen.
> 
> for $i in doc('FitnessCenter.xml')//*
> 
>       return rename node $i as QName('http://www.gym.com', local-name($i))
> 
> 
> on the following file:
> 
> <?xml version="1.0" encoding="UTF-8”?>
> 
> <FitnessCenter xmlns="http://www.mygym.com";>
> 
>       <Member Level="platinum">
> 
>               <Name>Jeff</Name>
> 
>               <FavoriteColor>lightgrey</FavoriteColor>
> 
>       </Member>
> 
>       <Member Level="gold">
> 
>               <Name>David</Name>
> 
>               <FavoriteColor>lightblue</FavoriteColor>
> 
>       </Member>
> 
> 
> </FitnessCenter>
> 
> and get the following error: new name conflicts with existing namespace 
> binding
> 
> 
> I thought the function local-name() produces an output  without namespace 
> binding? Can anyone explain?
> 
> Thanks in advance
> Leo
> 
> 
> _______________________________________________
> [email protected]
> http://x-query.com/mailman/listinfo/talk


_______________________________________________
[email protected]
http://x-query.com/mailman/listinfo/talk

Reply via email to