Just a bit curious, what do these point to? I assume they are setup for the form runner and also that $form-resources is a reference to instance('fr-form-resources') (is that correct?) but what does $fr-resources reference?
Can I use these in the same way from within an XBL control? I'm taking a common collection of controls in an existing form and creating an XBL control from them but am not sure about what to do with these references (I haven't tried to run my control yet).
- $form-resources points to the form's resources in the current language (e.g. selected with the language picker).
- $fr-resources points to the Form Runner resources in the current language. Those come from:
In general, an XBL control shouldn't rely on the form's resources, as you typically don't want XBL controls to have a dependency on the form where they are used. If you're not worried about your component having a dependency on Form Runner, you can refer to the Form Runner resources using xxf:r() (see doc linked). To access a top-level instance, use something like: xxf:r('components.wizard.edit', '|fr-fr-resources|').
Note the pipes in the instance name; they allow you to access to access an instance outside of the XBL component, and thus break encapsulation. For this reason, this use is undocumented, but we use this in build-in XBL components that are not expected to be used outside of Form Runner.
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet