Hello

working with namespaces in xQuery Update I have the following situation

declare namespace  fc ="fitnesscenter.ch";

let $member := doc('FitnessCenter.xml')//fc:Member
return
    (
    delete node $member/@Level,
    insert node element {QName("fitnesscenter.ch",name($member/@Level))} 
{data($member/@Level)}
        as first into $member
    )

on the XML file

<FitnessCenter xmlns="fitnesscenter.ch">
    <Member Level="platinum">
        <Name>Jeff</Name>
        <FavoriteColor>lightgrey</FavoriteColor>
    </Member>
</FitnessCenter>



which works as it should. However, I don’t like to rewrite the namespace in the 
QName function.
How can I use the declared namespace?

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

Reply via email to