Never mind, I still had the terminal opened when I ran this in the GUI… probably was interfering.

I'm back to 7.4 to be able to develop on something that works for my team. As soon as I can get back to 7.5, I'll test the command again. The two of them don't seem to work well in parallel.

This is more like what was failing in RESTXQ. You want doc #2 to replace the content of doc #2 with its own content, but instead it updated the file with the content from one of the other 2 documents. 

<commands>
 
<create-db name="en-us"/>
 
<add path="devicehelp.xml">
   
<menu id="devicehelp"/>
 
</add>
 
<add path="smbonly.xml">
   
<menu id="smbonly"/>
 
</add>
 
<add path="ptt-help.xml">
   
<menu id="ptt-help"/>
 
</add>
 
<xquery><![CDATA[
    let $x := db:open('en-us')/*[@id='smbonly']
    let $x-uri := substring-after($x/base-uri(), 'en-us')
    return db:replace('en-us', $x-uri, document{$x})
  ]]></xquery>
 
<list name="en-us"/>
</commands>


On Tue, Jan 8, 2013 at 12:48 PM, Christian Grün <christian.gruen@gmail.com> wrote:
I wonder what this could be. The script below gives me "smbonly
ptt-help new" as result; what do you get?

<commands>
  <create-db name="en-us"/>
  <add path="devicehelp.xml">
    <menu id="devicehelp"/>
  </add>
  <add path="smbonly.xml">
    <menu id="smbonly"/>
  </add>
  <add path="ptt-help.xml">
    <menu id="ptt-help"/>
  </add>
  <xquery>
<![CDATA[
    db:replace('en-us', 'devicehelp.xml', <menu id="new"/>)
  ]]></xquery>
  <xquery>
    for $x in /*
    return $x/data(@id)
  </xquery>
</commands>



--
France Baril
Architecte documentaire / Documentation architect
france.baril@architextus.com
(514) 572-0341