Hi Alex,
I understand that if I use - <xforms:bind nodeset="A" calculate="sum(B)"/>, the XForms engine will place in element A the sum of elements B.
My intent is to display only some calculated value using <xforms:output>. The calculation is based on values of repetitive nodes in a standard business message. The business message that I receive is from some external source and it may not be possible to get additional nodes ( <ProtectiveDevicePctSum/> ) for calculation and viewing purpose. I need to get some workaround in xforms itself.
I also wonder, why the incorrect value appears with "sum" and not with "count"?
Thanks and Regards,
Rahul Agarwal
----------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose.
----------------------------------------------------------------------------------------
| Alessandro Vernet <avernet @orbeon.com> Sent by: orbeon-user-admin 11/18/2004 04:54 AM
|
To: [EMAIL PROTECTED] cc: Subject: Re: [orbeon-user] Problem with "Sum" function |
Rahul Agarwal wrote:
> and in the page model, the bind _expression_ is -
> <xforms:bind nodeset="/Root/ProtectiveDevice/ProtectiveDevicePct"
> calculate="sum(/Root/ProtectiveDevice/ProtectiveDevicePct)"/>
Rahul,
I am not sure to fully understand the indent of the above bind
_expression_. When using an <xforms:bind nodeset="A"
calculate="sum(B)"/>, the XForms engine will place in element A the
sum of elements B. So you want A and B to be different. In your case,
if I understand what you are trying to do correctly, I would have an
instance with (note the additional ProtectiveDevicePctSum element):
<Root>
<ProtectiveDevice>
<ProtectiveDevicePct>20.00</ProtectiveDevicePct>
<ProtectiveDevicePct>30.00</ProtectiveDevicePct>
<ProtectiveDevicePct>10.00</ProtectiveDevicePct>
<ProtectiveDevicePctSum/>
</ProtectiveDevice>
</Root>
And a bind _expression_:
<xforms:bind
nodeset="/Root/ProtectiveDevice/ProtectiveDevicePctSum"
calculate="sum(/Root/ProtectiveDevice/ProtectiveDevicePct)"/>
Alex
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
orbeon-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/orbeon-user
