[xquery-talk] Namespace from prefix ?
Leo Studer
leo.studer at varioweb.ch
Fri Oct 7 03:35:41 PDT 2016
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://x-query.com/pipermail/talk/attachments/20161007/3052b26a/attachment.html>
More information about the talk
mailing list