This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
(Originally reported by Dana F.) Should we have a library of built-in updating functions similar in spirit to the F&O library ? An example of such a function would be migrating an XML tree from a certain namespace to a different namespace.
We recognize that we will need some functions, but we would like to keep the number of functions small in order to release the first version of updates quickly. So far, our library contains only one function, fn:put(). The example you suggest, changing a document from one namespace to another, is in our use cases: http://www.w3.org/TR/2006/WD-xqupdateusecases-20060508/#use-case-namespaces It's not particularly hard to do this in the current Update Facility. For instance, here's the solution used in the above use case. declare namespace nara = "http://www.anr.fr/nara"; for $e in doc("grant.xml")//* where not (namespace-uri($e) eq "http://www.anr.fr/nara") return do rename $e as QName("http://www.anr.fr/nara", concat("nara:",local-name($e)))