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

Bug 312191

Summary: [xpath2] [patch] instance of test fails with partial matches
Product: [WebTools] WTP Source Editing Reporter: Jesper Moller <jesper>
Component: wst.xpathAssignee: Jesper Moller <jesper>
Status: RESOLVED FIXED QA Contact: David Carver <d_a_carver>
Severity: normal    
Priority: P3 CC: d_a_carver, mukul.gandhi
Version: 3.2   
Target Milestone: 3.2.1   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch which leverages the existing KindTest functionality
none
mylyn/context/zip none

Description Jesper Moller CLA 2010-05-09 16:39:30 EDT
The "instance of" operator misbehaves in certain scenarios when involving schema-aware tests.

Given the XML instance in "attrNodeTest.xml" and it's schema, the expression "(/Example/x, /Example) instance of element(*, x_Type)" will return true, where it should be false, since not EVERY element in the sequence is an element of type x_Type.

This is due to a situation in SeqType matching: The schema type is checked just once, and each item in the sequence is checked for equality on each node.
Comment 1 Jesper Moller CLA 2010-06-01 06:43:34 EDT
Created attachment 170621 [details]
Patch which leverages the existing KindTest functionality
Comment 2 Jesper Moller CLA 2010-06-01 06:43:39 EDT
Created attachment 170622 [details]
mylyn/context/zip
Comment 3 David Carver CLA 2010-06-03 16:46:55 EDT
*** Bug 298270 has been marked as a duplicate of this bug. ***
Comment 4 Jesper Moller CLA 2010-06-25 01:15:17 EDT
Released as v201006250052 in HEAD and v201006250054 in 3.2 branch