<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>2982</bug_id>
          
          <creation_ts>2006-03-07 01:38:53 +0000</creation_ts>
          <short_desc>[Update] library of built-in updating functions</short_desc>
          <delta_ts>2006-08-24 20:28:51 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>Update Facility</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jim Melton">jim.melton</reporter>
          <assigned_to name="Andrew Eisenberg">andrew.eisenberg</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>8606</commentid>
    <comment_count>0</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2006-03-07 01:38:53 +0000</bug_when>
    <thetext>(Originally reported by Dana F.)

Should we have a library of built-in updating functions similar in spirit to the F&amp;O library ? An example of such a function would be migrating an XML tree from a certain namespace to a different namespace.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11262</commentid>
    <comment_count>1</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2006-08-24 19:09:04 +0000</bug_when>
    <thetext>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&apos;s not particularly hard to do this in the current Update
Facility. For instance, here&apos;s the solution used in the above use
case.

 declare namespace nara = &quot;http://www.anr.fr/nara&quot;; 
  
 for $e in doc(&quot;grant.xml&quot;)//* 
 where not (namespace-uri($e) eq &quot;http://www.anr.fr/nara&quot;) 
 return 
   do rename $e 
       as QName(&quot;http://www.anr.fr/nara&quot;, 
                concat(&quot;nara:&quot;,local-name($e)))</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>