alebor created XALANJ-2565:
------------------------------
Summary: java.lang.RuntimeException: ElemTemplateElement error:
Malformed format string
Key: XALANJ-2565
URL: https://issues.apache.org/jira/browse/XALANJ-2565
Project: XalanJ2
Issue Type: Bug
Security Level: No security risk; visible to anyone (Ordinary problems in
Xalan projects. Anybody can view the issue.)
Components: Xalan
Affects Versions: 2.7.1
Environment: Java 1.6.37 + Glassfish 3.0.1 + Xalan 2.7.1
Reporter: alebor
Assignee: Steven J. Hathaway
Fix For: 2.7.1
Setting decimal format decimal/grouping separators causes runtime exception. It
looks like when "'#,###.###" pattern is used, you are not allowed to use "."
for grouping separator and "," for decimal separator while from format-number
documentation this should be possible since "," and "." specify the POSITION of
the separators.
Documentation:
===========
string format-number(number,format,[decimalformat])
number Required. Specifies the number to be formatted
format Required. Specifies the format pattern. Here are some of the characters
used in the formatting pattern:
0 (Digit)
# (Digit, zero shows as absent)
. (The position of the decimal point Example: ###.##)
, (The group separator for thousands. Example: ###,###.##)
% (Displays the number as a percentage. Example: ##%)
; (Pattern separator. The first pattern will be used for positive numbers
and the second for negative numbers)
decimalformat Optional.
EXCEPTION:
=========
SEVERE: SystemId Unknown; Line #57; Column #73; java.lang.RuntimeException:
ElemTemplateElement error: Malformed format string: #,###.###
Example:
======
<xsl:output method="text" encoding="iso-8859-1"/>
<!-- This format has no name, so it's assumed to be the default. -->
<xsl:decimal-format decimal-separator="," grouping-separator="."/>
<xsl:if test="./@actualValue">
<xsl:value-of select="format-number(./@actualValue, '#,###.###')"/>
</xsl:if>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]