Re: Binding : Do I need a nodeset?

Mark Birbeck wrote:
> Hi Adam,
>
> You always need a nodeset, even with @calculate. I'm surprised that
> you are getting Chiba to output something using @calculate with no
> @nodeset value, so you might want to double-check that you really are
> seeing what you think you are seeing.
>
> One way to understand xf:bind is to see it as adding extra
> 'properties' to an instance node. I realise that in your particular
> example you want to have relevance based only on the result of an
> expression, but that's not possible; in XForms you have to make some
> existing node relevant, based on the expression you want. And if no
> obvious node exists, then unfortunately, as you have discovered, you
> usually need to invent one.
>

That is what I was thinking.....

I wonder if there is scope within any improvements to XForms to have a
<xforms:variable/> element

Much as with XSLT or similar......

The normal use cases are wrt checking values e.g. my "check unique" check:

        <xforms:bind
            calculate="if(instance('OIDVals')/oids/@active = 1,true(),if
(count(instance('OIDVals')//ov[@full = instance('main')/@full]) &lt;=
instance('OIDVals')//oids[1]/@exist,true(),false()))"
            id="unique_OID" nodeset="instance('uniqueOID')/@val"/>

Or as stated in the previous post wrt displaying one group vs another.

Adam

********************************************************************************************************************

This message may contain confidential information. If you are not the intended recipient please inform the
sender that you have received the message in error before deleting it.
Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents:
to do so is strictly prohibited and may be unlawful.

Thank you for your co-operation.

NHSmail is the secure email and directory service available for all NHS staff in England and Scotland
NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and GSI recipients
NHSmail provides an email address for your career in the NHS and can be accessed anywhere
For more information and to find out how you can switch, visit www.connectingforhealth.nhs.uk/nhsmail

********************************************************************************************************************

Received on Thursday, 6 August 2009 13:24:34 UTC