[xquery-talk] Namespace conflict ?

Leo Studer leo.studer at varioweb.ch
Tue Sep 16 03:10:55 PDT 2014


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




More information about the talk mailing list