RE: Round value- Error
"Michael Kay" <[email protected]> Thu, 13 Nov 2008 00:27:42 -0000
| Newsgroups | gmane.text.xml.xpath.general |
|---|---|
| Message-ID | <28AFDF0B0C0F435488AE7722328DB797@Sealion> |
This mailing list is provided to allow the public to make comments on the W3C XPath 1.0 specification, it is not an appropriate place to ask for programming help. A good place to ask XPath questions is the xsl-list at mulberrytech.com The only suggestions I can make, given that XForms uses XPath 1.0, are: (a) multiply by 100, call round(), then divide by 100. (b) concat(substring-before(XXX, '.'), '.', substring(substring-after(XXX, '.'), 1, 2)) Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of big_show > Sent: 12 November 2008 18:01 > To: [email protected] > Subject: Round value- Error > > > Hi: > I have one problem in XFORMS. > I have this bind which is a calculation of a total. > > <xforms:bind id="total" > nodeset="/aval_desemp_gestao_operacional/valor_desempenho" > calculate="(0.2*instance('aval_desemp_gestao_operacional')/vdo) > +(0.25*instance('aval_desemp_gestao_operacional')/vdr) > +(0.25*instance('aval_desemp_gestao_operacional')/vde) > +(0.3*instance('aval_desemp_gestao_operacional')/vdg)" /> > > The Field valor_desempenho is a float and I needed to round > this calculation to two decimal places. Is it possible? > How can I do? > Thanks! > -- > View this message in context: > http://www.nabble.com/Round-value--Error-tp20465856p20465856.html > Sent from the w3.org - www-xpath-comments mailing list > archive at Nabble.com. > > >