Hi, any chance we could make the db indexed ids match the xml doc ids?


Options:

Then I can easily imagine also expending to db:save-id to reduce the workload of having to pass through base-uri() once the doc exists in the db under its path

let $db-name := 'en-us'
let $doc := db:open-id($db-name, $doc-id)
let $new-doc := copy, modify, return copy
db:replace-id('en-us', $doc-id, $new-doc)

instead of 

let $db-name := 'en-us'
let $doc := db:open($db-name)/*[@id=$doc-id]
let $new-doc := copy, modify, return copy
let $path := substring-after($doc/base-uri(), $db-name)
return db:replace($db-name, $path, $new-doc)

Is that something that can be considered?