| Summary: | [xpath2] fn:compare returns XPST0017 | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | David Carver <d_a_carver> | ||||||
| Component: | wst.xpath | Assignee: | Jesper Moller <jesper> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | David Carver <d_a_carver> | ||||||
| Severity: | normal | ||||||||
| Priority: | P2 | ||||||||
| Version: | 3.1 | ||||||||
| Target Milestone: | 3.2 M2 | ||||||||
| Hardware: | PC | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 287369 | ||||||||
| Attachments: |
|
||||||||
|
Description
David Carver
Created attachment 145487 [details]
Patch which adds collation support for fn:compare
This adds the collation for use in fn:compare, but...
To be compliant with the XPath2 spec, we need to make the lt, gt and eq operators, etc. use the current/default collation, and to do that we need to push the dynamic context through the CmpEq etc. interfaces. Ugly, yes, but the alternative would be ThreadLocal which I think is worse. Please comment!
(In reply to comment #1) > Created an attachment (id=145487) [details] > Patch which adds collation support for fn:compare > > This adds the collation for use in fn:compare, but... > > To be compliant with the XPath2 spec, we need to make the lt, gt and eq > operators, etc. use the current/default collation, and to do that we need to > push the dynamic context through the CmpEq etc. interfaces. Ugly, yes, but the > alternative would be ThreadLocal which I think is worse. Please comment! > My first goal is compliance to the spec. So, feel free to iterate on a clean implementation that makes lt, gt, and eq for strings behave as they should. All of that code it is touching I believe is in internal packages so should be fairly safe to refactor as needed. Created attachment 146320 [details]
Finished patch
Patch provides:
- Collation support in the dynamic context
- Added collation argument to compare
- Collation sensitivity in string operators
Committed to HEAD |