Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 339025

Summary: [xpath2] ability to find distinct values on node items (fixes to fn:distinct-values function)
Product: [WebTools] WTP Source Editing Reporter: Mukul Gandhi <mukul.gandhi>
Component: wst.xpathAssignee: Project Inbox <wst.xsl-inbox>
Status: RESOLVED FIXED QA Contact: Jesper Moller <jesper>
Severity: normal    
Priority: P3 CC: d_a_carver, jesper
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Mukul Gandhi CLA 2011-03-05 20:27:24 EST
Build Identifier: I20090313-0100

given the following XML fragment,

<X>
   <a>1</a>
   <a>2</a>
   <a>3</a>
   <a>4</a>
</X>

distinct-values(a) {context node being "X"} doesn't give right results if element "a" was validated by the type xs:integer (or any other atomic type). To solve this, we need to atomize the input in the implementation of fn:distinct-values. This should work similarly to fn:max for example.

I'll shortly be committing an improvement for this. 

Reproducible: Always
Comment 1 Mukul Gandhi CLA 2011-03-05 20:51:50 EST
committed fixes for this bug report, both on HEAD and service branch. also committed few test cases.

i'm marking this issue resolved.