[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Re: using format-number() for aligned text output
At 01/03/28 17:42 +0100, Jeni Tennison wrote:
> I was anticipating format-number(price,'####0.00') to always produce > a string of 8 characters in length, yet both processors I have (XT > and Saxon) are Java based and are using the Java library which is > known to have other problems for this function. That would require non-Java processors to implement bug-emulation mode as I feel quite certain that the Java library failure to recognize the negative pattern grammar of the format pattern syntax wouldn't want to be copied in an implementation: Consider: format-number(-12345, '#,###.00;(#)') The above produces "(12,345)" in Java-based processors and (I'm told) "(12345)" in C++-based processors. I believe the C++-based processors are correct. For all of my tests of negative number syntax in the grammar, they are *all* being ignored and supplanted by the positive number syntax in Java-based processors. Where does one draw the line between empirical evidence and functional definition? This question is being raised in the OASIS XSLT/XPath conformance committee. > Any alternative interpretations out there for the specification > wording of: "digit specifies the character used for a digit in the > format pattern; the default value is the number sign character (#)"? > Would anyone else expect the "#" to produce a space if no digit is > there? If that isn't the behaviour, then what is the utility of the > "#"? Personally, I would have expected a space where the comma is so that my format string dictated the final result length for any number of less than or equal the digits of the uses of the octothorpe character. I acknowledge, though, the '#' would be the only facility to specify the grouping. Thanks, Jeni! ..................... Ken
!!Five-day XSLT/XPath/XSLFO Training Blitz June 18-22, 2001 in Ottawa!! XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|