Thread: [Xsltforms-support] format-number
Brought to you by:
alain-couthures
From: Ioan F. <mi...@gm...> - 2015-11-08 19:14:58
|
Hi, A topic that has been discussed a while ago: What solution could be found to show a number like 7.50 to be displayed 0 at the end? Outside of xsltforms or included in it. It may now be more easily integrated into xsltforms? Thanks, Ioan |
From: Alain C. <ala...@ag...> - 2015-11-08 20:33:42
|
Hi Ioan, What do you mean by "displayed"? Could you please send a form as an example? From my point of view, formatting is to be consider for input controls and there should be a way to convert the effective value into the one to be edited and the way back. A solution would be a consider a sort of shadow DOM where hidden extra nodes are added for processing. Is it what you are looking for? Thanks! Alain Le 08/11/2015 20:14, Ioan Fericel a écrit : > Hi, > > A topic that has been discussed a while ago: What solution could be > found to show a number like 7.50 to be displayed 0 at the end? Outside > of xsltforms or included in it. > > It may now be more easily integrated into xsltforms? > > Thanks, > Ioan > > ------------------------------------------------------------------------------ > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > |
From: Alain C. <ala...@ag...> - 2015-11-15 20:45:24
|
Hi Ioan, The format-number() function is now supported in XPath expressions. This has been committed in source repositories. It can be used with 2 parameters only and signs to be used in picture are the ones for English: "." as decimal separator and so on. This way, pictures don't have to be rewritten for applications with multi-language support. New properties are now supported in config.xsl files to allow specific separators for a language. For example, for French: <format-number.decimal-separator-sign>,</format-number.decimal-separator-sign> <format-number.exponent-separator-sign>.10^</format-number.exponent-separator-sign> <format-number.grouping-separator-sign> </format-number.grouping-separator-sign> <format-number.infinity>Infini</format-number.infinity> <format-number.minus-sign>-</format-number.minus-sign> <format-number.NaN>Non numérique</format-number.NaN> <format-number.percent-sign>%</format-number.percent-sign> <format-number.per-mille-sign>‰</format-number.per-mille-sign> Please send me corresponding values for your country. Thank you for your feedback! --Alain Le 08/11/2015 21:33, Alain Couthures a écrit : > Hi Ioan, > > What do you mean by "displayed"? Could you please send a form as an example? > > From my point of view, formatting is to be consider for input controls > and there should be a way to convert the effective value into the one to > be edited and the way back. A solution would be a consider a sort of > shadow DOM where hidden extra nodes are added for processing. Is it what > you are looking for? > > Thanks! > > Alain > > Le 08/11/2015 20:14, Ioan Fericel a écrit : >> Hi, >> >> A topic that has been discussed a while ago: What solution could be >> found to show a number like 7.50 to be displayed 0 at the end? Outside >> of xsltforms or included in it. >> >> It may now be more easily integrated into xsltforms? >> >> Thanks, >> Ioan >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Xsltforms-support mailing list >> Xsl...@li... >> https://lists.sourceforge.net/lists/listinfo/xsltforms-support >> > > ------------------------------------------------------------------------------ > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Ioan F. <mi...@gm...> - 2015-11-16 16:33:15
|
Many thanks, Alain! It's perfect, for output works like in XQuery. I usually use mixed configurations, but for Romanian localization of the new properties I can propose the following: <format-number.decimal-separator-sign>,</format-number.decimal-separator-sign> <format-number.exponent-separator-sign>e</format-number.exponent-separator-sign> <format-number.grouping-separator-sign>.</format-number.grouping-separator-sign> <format-number.infinity>Infinit</format-number.infinity> <format-number.minus-sign>-</format-number.minus-sign> <format-number.NaN>Nenumeric</format-number.NaN> <format-number.percent-sign>%</format-number.percent-sign> <format-number.per-mille-sign>‰</format-number.per-mille-sign> I now address (if I see that it can!) an another question, related to calendar, for the fields of type xsd: dateTime. It may be possible to configure the time, for example, to not display seconds, or to shown the minutes only from 10 to 10 or from 15 to 15? All the best! Ioan On 11/15/2015 10:45 PM, Alain Couthures wrote: > Hi Ioan, > > The format-number() function is now supported in XPath expressions. > This has been committed in source repositories. > > It can be used with 2 parameters only and signs to be used in picture > are the ones for English: "." as decimal separator and so on. This > way, pictures don't have to be rewritten for applications with > multi-language support. > > New properties are now supported in config.xsl files to allow specific > separators for a language. For example, for French: > > <format-number.decimal-separator-sign>,</format-number.decimal-separator-sign> > > <format-number.exponent-separator-sign>.10^</format-number.exponent-separator-sign> > > <format-number.grouping-separator-sign> > </format-number.grouping-separator-sign> > <format-number.infinity>Infini</format-number.infinity> > <format-number.minus-sign>-</format-number.minus-sign> > <format-number.NaN>Non numérique</format-number.NaN> > <format-number.percent-sign>%</format-number.percent-sign> > <format-number.per-mille-sign>‰</format-number.per-mille-sign> > > Please send me corresponding values for your country. > > Thank you for your feedback! > > --Alain > |
From: Alain C. <ala...@ag...> - 2015-11-18 21:08:56
|
Hi Ioan, Restricting the calendar widget for seconds input is an interesting idea because I presume that users are rarely interested in seconds setting. I can see 2 possibilities: would you prefer to restrict the value with a data type or to set options for the widget without restricting the value? In the first situation, a correct value for xsd:dateTime could be invalid for the restricted data type while, in the second situation, a correct value for xsd:dateTime would always be valid. The way XSLTForms is designed will, in both situations, require to define a new data type. For the second situation, it could be implemented as for options for RTE. What do you think? Alain Le 16/11/2015 17:33, Ioan Fericel a écrit : > > Many thanks, Alain! It's perfect, for output works like in XQuery. > > I usually use mixed configurations, but for Romanian localization of > the new properties I can propose the following: > > <format-number.decimal-separator-sign>,</format-number.decimal-separator-sign> > > <format-number.exponent-separator-sign>e</format-number.exponent-separator-sign> > > <format-number.grouping-separator-sign>.</format-number.grouping-separator-sign> > > <format-number.infinity>Infinit</format-number.infinity> > <format-number.minus-sign>-</format-number.minus-sign> > <format-number.NaN>Nenumeric</format-number.NaN> > <format-number.percent-sign>%</format-number.percent-sign> > <format-number.per-mille-sign>‰</format-number.per-mille-sign> > > I now address (if I see that it can!) an another question, related to > calendar, for the fields of type xsd: dateTime. > > It may be possible to configure the time, for example, to not display > seconds, or to shown the minutes only from 10 to 10 or from 15 to 15? > > All the best! > Ioan > > On 11/15/2015 10:45 PM, Alain Couthures wrote: >> Hi Ioan, >> >> The format-number() function is now supported in XPath expressions. >> This has been committed in source repositories. >> >> It can be used with 2 parameters only and signs to be used in picture >> are the ones for English: "." as decimal separator and so on. This >> way, pictures don't have to be rewritten for applications with >> multi-language support. >> >> New properties are now supported in config.xsl files to allow >> specific separators for a language. For example, for French: >> >> <format-number.decimal-separator-sign>,</format-number.decimal-separator-sign> >> >> <format-number.exponent-separator-sign>.10^</format-number.exponent-separator-sign> >> >> <format-number.grouping-separator-sign> >> </format-number.grouping-separator-sign> >> <format-number.infinity>Infini</format-number.infinity> >> <format-number.minus-sign>-</format-number.minus-sign> >> <format-number.NaN>Non numérique</format-number.NaN> >> <format-number.percent-sign>%</format-number.percent-sign> >> <format-number.per-mille-sign>‰</format-number.per-mille-sign> >> >> Please send me corresponding values for your country. >> >> Thank you for your feedback! >> >> --Alain >> > > |
From: Ioan F. <mi...@gm...> - 2015-11-19 15:32:21
|
Hi Alain, Thank you for interest and involvement. I think that the type should remain valid xsd:dateTime. And, perhaps more important than the seconds, it would be the possibility to restrict the minutes to dozens or quarters of an hour, because it's uncomfortable to choose from the list of 60 positions. For me it's good anyway, as to be easier to implement for you. Thanks, Ioan On 11/18/2015 11:08 PM, Alain Couthures wrote: > Hi Ioan, > > Restricting the calendar widget for seconds input is an interesting > idea because I presume that users are rarely interested in seconds > setting. > > I can see 2 possibilities: would you prefer to restrict the value with > a data type or to set options for the widget without restricting the > value? In the first situation, a correct value for xsd:dateTime could > be invalid for the restricted data type while, in the second > situation, a correct value for xsd:dateTime would always be valid. > > The way XSLTForms is designed will, in both situations, require to > define a new data type. For the second situation, it could be > implemented as for options for RTE. > > What do you think? > > Alain > |