How to "Setvalue" With "If(...)

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

How to "Setvalue" With "If(...)

Randy Smith-9
All,
Given the following which works ok:
 <xforms:setvalue ref="instance('xx-instance')/@someAttr" value="if(instance('flags-instance')/@overallAttr ='null') then 'stuff' else."/>
How can I insert a full path for the 'stuff'  argument? A full path like :
"(instance('yy-instance')/@overallAttr"
I can't seem to get the right combination.
Thanks,
Randy



--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: How to "Setvalue" With "If(...)

Alessandro Vernet
Administrator
Randy,

On Mon, Sep 21, 2009 at 4:52 PM, Randy Smith <[hidden email]> wrote:
> Given the following which works ok:
>  <xforms:setvalue ref="instance('xx-instance')/@someAttr"
> value="if(instance('flags-instance')/@overallAttr ='null') then 'stuff'
> else."/>
> How can I insert a full path for the 'stuff'  argument? A full path like :
> "(instance('yy-instance')/@overallAttr"
> I can't seem to get the right combination.

I don't quite get what you would like to do. What do you mean by
inserting the "full path"? What is "stuff"? (a literal string?) What
is you want to insert? (an XPath expression?)

Alex, confused ;)
--
Orbeon Forms - Web forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
My Twitter: http://twitter.com/avernet


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: How to "Setvalue" With "If(...)

Randy Smith-9
Alex,
Thanks for the reply! Sorry to confuse! :-(
I'm trying to mimic a Java app with xforms which is looking promising but it is also challenging.
Here is my original e-mail plus additional comments:
================
Given the following which works ok:
 <xforms:setvalue ref="instance('xx-instance')/@someAttr" value="if(instance('flags-instance')/@overallAttr ='null') then 'stuff' else."/>
The above works fine. The only thing I need to do is to replace "stuff" with a full instance path that has a text string value in it and put that value into
ref="instance('xx-instance')/@someAttr".
In other words the setvalue command should look somthing like:

 <xforms:setvalue ref="instance('xx-instance')/@someAttr" value="if(instance('flags-instance')/@overallAttr ='null') then '"(instance('yy-instance')/@overallAttr"' else."/>

I couldn't get the syntax correct. Maybe this type thing is not allowed???
So, how can I insert a full instance path for the 'stuff'  text string argument? A full path like :
"(instance('yy-instance')/@overallAttr"
Again, I can't seem to get the right syntax combination.

====================
Thanks for the help and hope this is more clear!  :-\
Randy


Alessandro Vernet wrote:
Randy,

On Mon, Sep 21, 2009 at 4:52 PM, Randy Smith [hidden email] wrote:
  
Given the following which works ok:
 <xforms:setvalue ref="instance('xx-instance')/@someAttr"
value=[hidden email]/>
How can I insert a full path for the 'stuff'  argument? A full path like :
"(instance('yy-instance')/@overallAttr"
I can't seem to get the right combination.
    

I don't quite get what you would like to do. What do you mean by
inserting the "full path"? What is "stuff"? (a literal string?) What
is you want to insert? (an XPath expression?)

Alex, confused ;)
  


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: How to "Setvalue" With "If(...)

Hoi Chong
Hi,
If the instance you want to refer to is in the current model of the XFORM, you can use
instance() function, if it is not in the current model then you can use this xxforms:instance() function.

Refer to this..
http://www.orbeon.com/ops/doc/xxforms-instance

and this..
http://www.orbeon.com/ops/doc/reference-xforms-extensions#submission-xxforms-instance


HTH


Randy Smith-9 wrote
Alex,
Thanks for the reply! Sorry to confuse! :-(
I'm trying to mimic a Java app with xforms which is looking promising
but it is also challenging.
Here is my original e-mail plus additional comments:
================
Given the following which works ok:
 <xforms:setvalue ref="instance('xx-instance')/@someAttr"
value="if(instance('flags-instance')/@overallAttr ='null') then 'stuff'
else."/>
The above works fine. The only thing I need to do is to replace "stuff"
with a _*full instance path*_ that has a text string value _*in it*_ and
put that value into ref="instance('xx-instance')/@someAttr".
In other words the setvalue command should look somthing like:

/ <xforms:setvalue ref="instance('xx-instance')/@someAttr"
value="if(instance('flags-instance')/@overallAttr ='null') then
*'"(instance('yy-instance')/@overallAttr"' *else."/>/

I couldn't get the syntax correct. Maybe this type thing is not allowed???
So, how can I insert a _*full instance path*_ for the 'stuff'  text
string argument? A full path like :
*"(instance('yy-instance')/@overallAttr"*
Again, I can't seem to get the right syntax combination.
====================
Thanks for the help and hope this is more clear!  :-\
Randy


Alessandro Vernet wrote:
> Randy,
>
> On Mon, Sep 21, 2009 at 4:52 PM, Randy Smith <randy@msic.dia.mil> wrote:
>  
>> Given the following which works ok:
>>  <xforms:setvalue ref="instance('xx-instance')/@someAttr"
>> value="if(instance('flags-instance')/@overallAttr ='null') then 'stuff'
>> else."/>
>> How can I insert a full path for the 'stuff'  argument? A full path like :
>> "(instance('yy-instance')/@overallAttr"
>> I can't seem to get the right combination.
>>    
>
> I don't quite get what you would like to do. What do you mean by
> inserting the "full path"? What is "stuff"? (a literal string?) What
> is you want to insert? (an XPath expression?)
>
> Alex, confused ;)
>  


--
You receive this message as a subscriber of the ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws