Bug 280135 - [xpath2] fn:round-half-to-even wrong number of arguments.
Summary: [xpath2] fn:round-half-to-even wrong number of arguments.
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xpath (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.2 M1   Edit
Assignee: David Carver CLA
QA Contact: David Carver CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 262765
  Show dependency tree
 
Reported: 2009-06-12 15:45 EDT by David Carver CLA
Modified: 2010-08-11 17:08 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Carver CLA 2009-06-12 15:45:49 EDT
The PsychoPath processor only accepts one argument for the fn:round-half-to-even function.  It needs to accept two.

http://www.w3.org/TR/xpath-functions/#func-round-half-to-even

The second argument is a precision argument.

From the W3C Summary:

If the type of $arg is one of the four numeric types xs:float, xs:double, xs:decimal or xs:integer the type of the result is the same as the type of $arg. If the type of $arg is a type derived from one of the numeric types, the result is an instance of the base numeric type.

The first signature of this function produces the same result as the second signature with $precision=0.
Comment 1 David Carver CLA 2009-06-12 17:40:04 EDT
The round-half-to-even function was not being implemented correctly.   This is now corrected, and helps pass an additional 10 unit tests that depended on the functionality.