Within a form running in Form Runner, you can get the current document id:
- from XForms with xxf:instance('fr-parameters-instance')/document
- from JavaScript with $('#fr-parameters-instance-document .xforms-output-output').text()
Note that those are undocumented API, and are thus more likely to change between releases (and since they are not documented, this most likely won't be mentioned in the release notes).
Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet