I am using orbeon and I am trying to read child element defined in XBL. Here is how my xform definition looks like
<fr:foobar ref="mynode" constraint="unique">
<fr:foo from="abc" to="def">
<fr:bar key="id" name="primary" />
</fr:foo>
</fr:foobar>
In XBL I can’t seem to find an easy way to read the child element. I am obviously missing something simple.
<xforms:group xxbl:scope="inner">
<!-- works -->
<xxforms:variable name="foocontext">
<xxforms:sequence select="{fr:foo/@from}" xxbl:scope="outer" />
</xxforms:variable>
<!-- does not works -->
<xxforms:variable name="barcontext" as="node()?">
<xxforms:sequence select="{fr:foo/fr:bar}" xxbl:scope="outer" />
</xxforms:variable>
</xforms:group>
An AVT always return text. So
{fr:foo/fr:bar}is equivalent to{string(fr:foo/fr:bar)}, which in this case won’t do what you expect. This is a tricky one, and I see two solutions:<fr:bar>elements into an instance with XSLT (<xsl:copy-of>), and then point to the nodes in that instance with the<xxforms:variable>.