[Bug 2982] [Update] library of built-in updating functions

http://www.w3.org/Bugs/Public/show_bug.cgi?id=2982


jonathan.robie@datadirect.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX




------- Comment #1 from jonathan.robie@datadirect.com  2006-08-24 19:09 -------
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)))

Received on Thursday, 24 August 2006 19:09:15 UTC