Talk:XRX/Autoincrement File ID

This sample does not work properly in case of concurrent access. The next-id node must be updated using util:exclusive-lock function.

For instance, prior any change

let $next-id := util:exclusive-lock ($next, let $current := $next/text let $dummy := update replace $next/text with $current + 1 return $current)