Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312191 - [xpath2] [patch] instance of test fails with partial matches
Summary: [xpath2] [patch] instance of test fails with partial matches
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xpath (show other bugs)
Version: 3.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.2.1   Edit
Assignee: Jesper Moller CLA
QA Contact: David Carver CLA
URL:
Whiteboard:
Keywords:
: 298270 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-05-09 16:39 EDT by Jesper Moller CLA
Modified: 2010-08-11 17:08 EDT (History)
2 users (show)

See Also:


Attachments
Patch which leverages the existing KindTest functionality (14.62 KB, patch)
2010-06-01 06:43 EDT, Jesper Moller CLA
no flags Details | Diff
mylyn/context/zip (276.44 KB, application/octet-stream)
2010-06-01 06:43 EDT, Jesper Moller CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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