Open ewg118 opened 2 years ago
Regarding the namespace prefix: any prefix should work as namespace mappings are not hardcoded but in-scope namespaces are used. Not sure what's happening here.
This might have regressed with 59fa9e30dac691bcdd2d095792dd289786033a42. What version did you migrate from, @ewg118?
Quite an old one, it looks. orbeon-2018.1.1
Then it could also be with 4df0d4125eb13fc09f2a91365f0b47cf9c8b370a.
The "current" behavior is that if you pass an XML node to the function, it stores an XML tree in the session. If you want to store a string, you can be explicit with :
string(instance('control-instance')/collection-name)
I have deployed the Orbeon 2021.1 CE to a new server to begin migrating my applications and have come across an issue with xxf:set-session-attribute().
My previous code populated the session attribute with the value from an instance:
<xforms:insert context="." origin="xxf:set-session-attribute('collection-name', instance('control-instance')/collection-name)"/>
But this no longer functions. I replaced
instance('control-instance')/collection-name)
with a hard-coded string, and it does work as intended. I also tried replacinginstance('control-instance')/collection-name)
with an xforms:variable,$name
, but the session attribute won't set from a variable either.Upon further testing, if you wrap the instance reference or the variable with string(), it will work. It should also be noted that this only functions with the xxf: prefix. The old xxforms: prefix results in an error. Maybe everyone else already migrated to xxf: years ago.