--- "Matthew J. Graham" <[EMAIL PROTECTED]> wrote:

> <xforms:setvalue ref="/form/document/vr:Resource/vr:identifier" 
> value="concat(/form/authority, 
> /form/document/vr:Resource/vr:identifier)"/>

Hi Matthew,

Having recursive "calculate" expression can lead to unexpected results.
For instance, consider the following XForms model:

    <xforms:model>
        <xforms:instance>
            <instance>
                <a>1</a>
                <b>2</b>
            </instance>
        </xforms:instance>
        <xforms:bind nodeset="/instance/a"
            calculate="concat(/instance/a, /instance/b)"/>
    </xforms:model>

If you have in your view a control bound to /instance/a, it will show
"122". Why? Because the "calculate" is evaluated twice: the first time
when the instance is created (before it is fed to your action, model,
view) and a second time when it goes through the xforms-output called in
epilogue.xpl. So you should avoid having "calculate" expression that are
sensitive the number of times they are evaluated.

Do you think that this could explain the behavior you noticed?

Alex


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
orbeon-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/orbeon-user

Reply via email to