When I do the following using dpml

<instr>
  <type>dbxmlQuery</type>
  <param>var:param</param>
  <operator>
    <dbxml>
      <container>licobecu.dbxml</container>
      <xquery> declare variable $param as node() := &lt;nvp&gt;&lt;collection&gt;71022A00&lt;/collection&gt;&lt;/nvp&gt;; &lt;ids&gt; {for $x in collection("licobecu.dbxml")/Artefact where $x/objectNumber/@collection = $param/collection return &lt;id&gt;{$x/@id}&lt;/id&gt; } &lt;note&gt;{$param}&lt;/note&gt; &lt;/ids&gt; </xquery>
    </dbxml>
  </operator>
  <target>var:result</target>
</instr>


I get the results wanted.

Now changing from



declare variable $param as node() := <nvp><collection>71022A00</collection></nvp>;



to


declare variable $param as node() external;


and prepending this piece with

<instr>
  <type>copy</type>
  <operand>this:param:param</operand>
  <target>var:param</target>
</instr>


where the result hereof is:


<nvp>
  <collection>71022A00</collection>
</nvp>



I get



com.sleepycat.dbxml.XmlException
Error: A value for the external variable param has not been provided [err:XPTY0002], <query>:1:1



What am I overlooking?