This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 2982 - [Update] library of built-in updating functions
Summary: [Update] library of built-in updating functions
Status: CLOSED WONTFIX
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Update Facility (show other bugs)
Version: Working drafts
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-07 01:38 UTC by Jim Melton
Modified: 2006-08-24 20:28 UTC (History)
0 users

See Also:


Attachments

Description Jim Melton 2006-03-07 01:38:53 UTC
(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.
Comment 1 Jonathan Robie 2006-08-24 19:09:04 UTC
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)))