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>