Hello,
I would to write
the number in french format. So the separator character of decimal is
a comma on the place of a point.
But I can't change
this character with the function format-number, or in the
properties.xml.
It is possible to
change this ?
Thank
You. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. -- 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 |
salut Julien,
> I would to write the number in french format. So the separator character > of decimal is a comma on the place of a point. > But I can't change this character with the function format-number, or in > the properties.xml. i didn't test it, but i think one can change the default formatting for xs:double or xs:float in config/properties.xml as described here: http://www.orbeon.com/ops/doc/reference-xforms-2#xforms-default-formatting So, to get 123.456,90 instead of 123,456.90 : <property as="xs:string" name="oxf.xforms.format.decimal" value="if (. castable as xs:decimal) then format-number(xs:decimal(.),'#.##0,00') else ." /> <property as="xs:string" name="oxf.xforms.format.integer" value="if (. castable as xs:integer) then format-number(xs:integer(.),'#.##0') else ." /> <property as="xs:string" name="oxf.xforms.format.float" value="if (. castable as xs:float) then format-number(xs:float(.),'#.##0,000') else ." /> <property as="xs:string" name="oxf.xforms.format.double" value="if (. castable as xs:double) then format-number(xs:double(.),'#.##0,000') else ." /> HTH florian -- 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 |
Hello Thank you for your response, but it is not possible to change the character separator with this formatting. Because you can just display or not the comma, display one or two decimal, etc... I think that this formatting is based under the xs:double format of w3c. Can we change it ? -----Message d'origine----- De : Florian Schmitt [mailto:[hidden email]] Envoyé : mardi 18 mars 2008 08:54 À : [hidden email] Objet : [ops-users] Re: How to change the separator character of decimal type ? salut Julien, > I would to write the number in french format. So the separator > character of decimal is a comma on the place of a point. > But I can't change this character with the function format-number, or > in the properties.xml. i didn't test it, but i think one can change the default formatting for xs:double or xs:float in config/properties.xml as described here: http://www.orbeon.com/ops/doc/reference-xforms-2#xforms-default-formatting So, to get 123.456,90 instead of 123,456.90 : <property as="xs:string" name="oxf.xforms.format.decimal" value="if (. castable as xs:decimal) then format-number(xs:decimal(.),'#.##0,00') else ." /> <property as="xs:string" name="oxf.xforms.format.integer" value="if (. castable as xs:integer) then format-number(xs:integer(.),'#.##0') else ." /> <property as="xs:string" name="oxf.xforms.format.float" value="if (. castable as xs:float) then format-number(xs:float(.),'#.##0,000') else ." /> <property as="xs:string" name="oxf.xforms.format.double" value="if (. castable as xs:double) then format-number(xs:double(.),'#.##0,000') else ." /> HTH florian This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. -- 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 |
In reply to this post by ricetrac
Hello Thank you for your response, but it is not possible to change the character separator with this formatting. Because you can just display or not the comma, display one or two decimal, etc... I think that this formatting is based under the xs:double format of w3c. Can we change it ? -----Message d'origine----- De : Florian Schmitt [mailto:[hidden email]] Envoyé : mardi 18 mars 2008 08:54 À : [hidden email] Objet : [ops-users] Re: How to change the separator character of decimal type ? salut Julien, > I would to write the number in french format. So the separator > character of decimal is a comma on the place of a point. > But I can't change this character with the function format-number, or > in the properties.xml. i didn't test it, but i think one can change the default formatting for xs:double or xs:float in config/properties.xml as described here: http://www.orbeon.com/ops/doc/reference-xforms-2#xforms-default-formatting So, to get 123.456,90 instead of 123,456.90 : <property as="xs:string" name="oxf.xforms.format.decimal" value="if (. castable as xs:decimal) then format-number(xs:decimal(.),'#.##0,00') else ." /> <property as="xs:string" name="oxf.xforms.format.integer" value="if (. castable as xs:integer) then format-number(xs:integer(.),'#.##0') else ." /> <property as="xs:string" name="oxf.xforms.format.float" value="if (. castable as xs:float) then format-number(xs:float(.),'#.##0,000') else ." /> <property as="xs:string" name="oxf.xforms.format.double" value="if (. castable as xs:double) then format-number(xs:double(.),'#.##0,000') else ." /> HTH florian This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. -- 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 |
Administrator
|
Julien,
Right, the format string does not actually contain the separators. XSLT uses an xsl:decimal-format element to control this, but we don't support it at the moment. We would need a mechanism to register such formats, or to pass such a format to a new xxforms:format-number() function, since the XSLT function takes an xsl:decimal-format name only. I entered an RFE for this: http://forge.objectweb.org/tracker/index.php?func=detail&aid=308898&group_id=168&atid=350207 Until that is done, what you could do is first call xxforms:format- number(), and then replace the decimal points with commas, for example, using the translate() function. -Erik On Mar 18, 2008, at 9:00 AM, Bittard, Julien wrote: > > Hello > > Thank you for your response, but it is not possible to change the > character separator with this formatting. > Because you can just display or not the comma, display one or two > decimal, etc... > I think that this formatting is based under the xs:double format of > w3c. > > Can we change it ? > > > > > -----Message d'origine----- > De : Florian Schmitt [mailto:[hidden email]] > Envoyé : mardi 18 mars 2008 08:54 > À : [hidden email] > Objet : [ops-users] Re: How to change the separator character of > decimal type ? > > salut Julien, > >> I would to write the number in french format. So the separator >> character of decimal is a comma on the place of a point. >> But I can't change this character with the function format-number, or >> in the properties.xml. > > i didn't test it, but i think one can change the default formatting > for xs:double or xs:float in config/properties.xml as described here: > > http://www.orbeon.com/ops/doc/reference-xforms-2#xforms-default-formatting > > So, to get 123.456,90 instead of 123,456.90 : > > <property as="xs:string" > name="oxf.xforms.format.decimal" > value="if (. castable as xs:decimal) > then format-number(xs:decimal(.),'#.##0,00') > else ." > /> > <property as="xs:string" > name="oxf.xforms.format.integer" > value="if (. castable as xs:integer) > then format-number(xs:integer(.),'#.##0') > else ." > /> > <property as="xs:string" > name="oxf.xforms.format.float" > value="if (. castable as xs:float) > then format-number(xs:float(.),'#.##0,000') > else ." > /> > <property as="xs:string" > name="oxf.xforms.format.double" > value="if (. castable as xs:double) > then format-number(xs:double(.),'#.##0,000') > else ." > /> > > > HTH > florian > > > This e-mail and any attachment is for authorised use by the intended > recipient(s) only. It may contain proprietary material, confidential > information and/or be subject to legal privilege. It should not be > copied, disclosed to, retained or used by, any other party. If you > are not an intended recipient then please promptly delete this e- > mail and any attachment and all copies and inform the sender. Thank > you. > > > > -- > 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 Orbeon Forms - Web Forms for the Enterprise Done the Right Way 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
In reply to this post by ricetrac
Hello,
Thank you erik for your response. The method translate works well : <xforms:output ref="mdMtDemande" xxforms:format="translate(format-number( xs:double(.),'#,##0.00'), ',.', ' ,')"/> : 1000.25 => 1 000,25 Thank you -----Message d'origine----- De : Erik Bruchez [mailto:[hidden email]] Envoyé : mardi 18 mars 2008 22:34 À : [hidden email] Objet : [ops-users] Re: Re: How to change the separator character of decimal type ? Julien, Right, the format string does not actually contain the separators. XSLT uses an xsl:decimal-format element to control this, but we don't support it at the moment. We would need a mechanism to register such formats, or to pass such a format to a new xxforms:format-number() function, since the XSLT function takes an xsl:decimal-format name only. I entered an RFE for this: http://forge.objectweb.org/tracker/index.php?func=detail&aid=308898&group_id=168&atid=350207 Until that is done, what you could do is first call xxforms:format- number(), and then replace the decimal points with commas, for example, using the translate() function. -Erik On Mar 18, 2008, at 9:00 AM, Bittard, Julien wrote: > > Hello > > Thank you for your response, but it is not possible to change the > character separator with this formatting. > Because you can just display or not the comma, display one or two > decimal, etc... > I think that this formatting is based under the xs:double format of > w3c. > > Can we change it ? > > > > > -----Message d'origine----- > De : Florian Schmitt [mailto:[hidden email]] > Envoyé : mardi 18 mars 2008 08:54 > À : [hidden email] > Objet : [ops-users] Re: How to change the separator character of > decimal type ? > > salut Julien, > >> I would to write the number in french format. So the separator >> character of decimal is a comma on the place of a point. >> But I can't change this character with the function format-number, or >> in the properties.xml. > > i didn't test it, but i think one can change the default formatting > for xs:double or xs:float in config/properties.xml as described here: > > http://www.orbeon.com/ops/doc/reference-xforms-2#xforms-default-format > ting > > So, to get 123.456,90 instead of 123,456.90 : > > <property as="xs:string" > name="oxf.xforms.format.decimal" > value="if (. castable as xs:decimal) > then format-number(xs:decimal(.),'#.##0,00') > else ." > /> > <property as="xs:string" > name="oxf.xforms.format.integer" > value="if (. castable as xs:integer) > then format-number(xs:integer(.),'#.##0') > else ." > /> > <property as="xs:string" > name="oxf.xforms.format.float" > value="if (. castable as xs:float) > then format-number(xs:float(.),'#.##0,000') > else ." > /> > <property as="xs:string" > name="oxf.xforms.format.double" > value="if (. castable as xs:double) > then format-number(xs:double(.),'#.##0,000') > else ." > /> > > > HTH > florian > > > This e-mail and any attachment is for authorised use by the intended > recipient(s) only. It may contain proprietary material, confidential > information and/or be subject to legal privilege. It should not be > copied, disclosed to, retained or used by, any other party. If you are > not an intended recipient then please promptly delete this e- mail and > any attachment and all copies and inform the sender. Thank you. > > > > -- > 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 Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. -- 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 |
Free forum by Nabble | Edit this page |