Yes, this can be done with XForms without extra Javascript instructions. You need two instances: one to be submitted and another one to be used to fill the first one.
This should be something like this for the model part:
<xf:model>
<xf:instance id="data">
<data xmlns="">
<search1/>
<search2/>
</data>
</xf:instance>
<xf:instance id="work">
<work xmlns="">
<b1 xsi:type="boolean"/>
<b2 xsi:type="boolean"/>
<search/>
</work>
</xf:instance>
<xf:bind nodeset="instance('data')/search1" calculate="choose(instance('work')/b1,instance('work')/search,'')"/>
<xf:bind nodeset="instance('data')/search2" calculate="choose(instance('work')/b2,instance('work')/search,'')"/>
<xf:submission ref="instance('data') method="post" resource=".........."/>
</xf:model>
-Alain