Insert using if conidtion with AND

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Insert using if conidtion with AND

ChrisSpeare
Trying to make an insert which obeys an if with and in it.  Can get single statement if to work:

<xforms:insert ev:event="DOMActivate" context="instance('instance_model_SeaManifest')/ManifestInformation/Header" position="after" nodeset="ShipmentQuantity" at="last()" origin="instance('CarrierCode')"
    if = "count(//ManifestInformation//Header//MibParticipant) &lt; 1"/>

However if I try to use an and OPS blows up:

<xforms:insert ev:event="DOMActivate" context="instance('instance_model_SeaManifest')/ManifestInformation/Header" position="after" nodeset="MibParticipant" at="last()" origin="instance('IssuerSCAC')"
    if = "((instance('instance_model_SeaManifest')/UserInformation/RecipientID=2) &amp;&amp; (count(//ManifestInformation//Header//MibParticipant) = 0))"/>

What syntax do I use for an AND if statement in Orbeon 3.5.1?
Reply | Threaded
Open this post in threaded view
|

Re: Insert using if conidtion with AND

Alessandro Vernet
Administrator
On 5/31/07, ChrisSpeare <[hidden email]> wrote:

> However if I try to use an and OPS blows up:
>
> <xforms:insert ev:event="DOMActivate"
> context="instance('instance_model_SeaManifest')/ManifestInformation/Header"
> position="after" nodeset="MibParticipant" at="last()"
> origin="instance('IssuerSCAC')"
>     if =
> "((instance('instance_model_SeaManifest')/UserInformation/RecipientID=2)
> &amp;&amp; (count(//ManifestInformation//Header//MibParticipant) = 0))"/>
>
> What syntax do I use for an AND if statement in Orbeon 3.5.1?
Simply: and
Not: &&

See: http://www.w3.org/TR/xpath20/#id-logical-expressions

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Insert using if conidtion with AND

ChrisSpeare
Typical, I used AND, when tried 'and' it worked

Cheers