Leo Studer
2014-09-16 10:10:55 UTC
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
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