[ http://issues.apache.org/jira/browse/XALANJ-1892?page=all ]
Brian Minchau updated XALANJ-1892:
----------------------------------
Fix Version: 2.7
> XString.num and number XSLT function return incorrect number with trailing
> whitespace
> -------------------------------------------------------------------------------------
>
> Key: XALANJ-1892
> URL: http://issues.apache.org/jira/browse/XALANJ-1892
> Project: XalanJ2
> Type: Bug
> Components: XPath
> Versions: 2.6
> Environment: Operating System: Linux
> Platform: PC
> Reporter: Kahli Burke
> Assignee: Yash Talwar
> Fix For: 2.7
> Attachments: GoodPatch.txt, InMemDocTransform.java, patch.txt, patch1.txt,
> patch2.txt
>
> The XString.num() and toDouble() methods truncate the floating point portion
> of a number if the string
> contains a number with trailing whitespace. So, if the tag
> <tag> 1.5 </tag>
> is created with the DOM, and the number() xslt function is called, 1.0 is
> returned. This does not occur
> if that XML was in a file, parsed by Xerces and run through Xalan, but does
> occur if the tag is created in
> memory and run through Xalan. This may be because the XStringForFSB class is
> used instead, which
> has the correct behavior. A test case will be attached that demonstrates
> differences in behavior
> between the two classes, and a patch will be included that provides almost
> identical behavior between
> the two. In general, the toDouble method in the XStringForFSB seems superior
> from a consistency and
> performance perspective.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
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]