Use of if() function

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

Use of if() function

Hank Ratzesberger

I am having problems using the if() function:

http://www.w3.org/TR/2006/REC-xforms-20060314/slice7.html#fn-if

The attached file produces the same error in the sandbox that
I see:

XForms error: XPath syntax error at char 44 in {...e(if(true(),'true','false')...}: expected "then", found ","

It seems like the parser is expecting some other statement, but I can't
tell what.

Let me know if there is something else you
want me to try,

Thank you,
Hank

Hank Ratzesberger
NEES Programmer
Institute for Crustal Studies
University of California, Santa Barbara


--
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

test2.xhtml (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Use of if() function

marc-62
Hank,

Write instead :

value="if true() then 'true' else 'false'"

HTH,

Marc


Hank Ratzesberger a écrit :

>
> I am having problems using the if() function:
>
> http://www.w3.org/TR/2006/REC-xforms-20060314/slice7.html#fn-if
>
> The attached file produces the same error in the sandbox that
> I see:
>
> XForms error: XPath syntax error at char 44 in
> {...e(if(true(),'true','false')...}: expected "then", found ","
>
> It seems like the parser is expecting some other statement, but I
> can't tell what.
>
> Let me know if there is something else you want me to try,
>
> Thank you,
> Hank
>
> Hank Ratzesberger
> NEES Programmer
> Institute for Crustal Studies
> University of California, Santa Barbara
>
>------------------------------------------------------------------------
>
>
>--
>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
>  
>



--
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: Use of if() function

marc-62
Hum...

<xforms:setvalue ref="bool" value="if (true()) then 'true' else 'false'"/>

That's better ;-)

Marc


marc a écrit :

> Hank,
>
> Write instead :
>
> value="if true() then 'true' else 'false'"
>
> HTH,
>
> Marc
>
>
> Hank Ratzesberger a écrit :
>
>>
>> I am having problems using the if() function:
>>
>> http://www.w3.org/TR/2006/REC-xforms-20060314/slice7.html#fn-if
>>
>> The attached file produces the same error in the sandbox that
>> I see:
>>
>> XForms error: XPath syntax error at char 44 in
>> {...e(if(true(),'true','false')...}: expected "then", found ","
>>
>> It seems like the parser is expecting some other statement, but I
>> can't tell what.
>>
>> Let me know if there is something else you want me to try,
>>
>> Thank you,
>> Hank
>>
>> Hank Ratzesberger
>> NEES Programmer
>> Institute for Crustal Studies
>> University of California, Santa Barbara
>>
>> ------------------------------------------------------------------------
>>
>>
>> --
>> 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
>>  
>>
>
>
>------------------------------------------------------------------------
>
>
>--
>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
>  
>



--
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: Use of if() function

Hank Ratzesberger
Tada! Thanks.

Not sure where this is documented, and "if" is
difficult to search on.

Cheers,
Hank

----- Original Message -----
From: "marc" <[hidden email]>
To: <[hidden email]>
Sent: Friday, December 01, 2006 8:55 AM
Subject: Re: [ops-users] Use of if() function


> Hum...
>
> <xforms:setvalue ref="bool" value="if (true()) then 'true' else 'false'"/>
>
> That's better ;-)
>
> Marc
>
>
> marc a écrit :
>
>> Hank,
>>
>> Write instead :
>>
>> value="if true() then 'true' else 'false'"
>>
>> HTH,
>>
>> Marc
>>
>>
>> Hank Ratzesberger a écrit :
>>
>>>
>>> I am having problems using the if() function:
>>>
>>> http://www.w3.org/TR/2006/REC-xforms-20060314/slice7.html#fn-if
>>>
>>> The attached file produces the same error in the sandbox that
>>> I see:
>>>
>>> XForms error: XPath syntax error at char 44 in
>>> {...e(if(true(),'true','false')...}: expected "then", found ","
>>>
>>> It seems like the parser is expecting some other statement, but I
>>> can't tell what.
>>>
>>> Let me know if there is something else you want me to try,
>>>
>>> Thank you,
>>> Hank
>>>
>>> Hank Ratzesberger
>>> NEES Programmer
>>> Institute for Crustal Studies
>>> University of California, Santa Barbara
>>>
>>> ------------------------------------------------------------------------
>>>
>>>
>>> --
>>> 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
>>>
>>>
>>
>>
>>------------------------------------------------------------------------
>>
>>
>>--
>>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
>>
>>
>
>
>

--------------------------------------------------------------------------------


>
> --
> 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
>




--
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: Use of if() function

Erik Bruchez
Administrator
In reply to this post by Hank Ratzesberger
Hank Ratzesberger wrote:

>
> I am having problems using the if() function:
>
> http://www.w3.org/TR/2006/REC-xforms-20060314/slice7.html#fn-if
>
> The attached file produces the same error in the sandbox that
> I see:
>
> XForms error: XPath syntax error at char 44 in
> {...e(if(true(),'true','false')...}: expected "then", found ","
>
> It seems like the parser is expecting some other statement, but I can't
> tell what.
>
> Let me know if there is something else you want me to try,
The XPath 1.0 and 1.1 if() function is not supported in Orbeon Forms,
because it conflicts with XPath 2.0. As suggested, you can use the
built-in XPath 2.0 if... then... else construct, or use xxforms:if(),
which behaves like the original XForms if() function.

-Erik



--
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