Trying to build options parameter from another config XML to pass in the xdmp:http-post function.
let $db-config :=
<config>
<user-name>admin</user-name>
<password>admin</password>
</config>
let $options :=
<options xmlns="xdmp:http">
<authentication method="digest">
<username>{$db-config/user-name/text()}</username>
<password>{$db-config/password/text()}</password>
</authentication>
</options>
return $options
output of the above code is:
<options xmlns="xdmp:http">
<authentication method="digest">
<username>
</username>
<password>
</password>
</authentication>
</options>
No able to understand why the xpath is returning blank.
On removing the xmlns="xdmp:http" namespace getting the correct output.