Community
Participate
Working Groups
Build Identifier: 20110615-0604 If there's an XML instance document like following, <X att1="x1"> <Y>100</Y> </X> and it's validated by the following schema, <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="X"> <xs:complexType> <xs:sequence> <xs:element name="Y" type="xs:integer"/> </xs:sequence> <xs:attribute name="att1" type="xs:string"/> </xs:complexType> </xs:element> </xs:schema> If we evaluate following XPath2 expressions (with context node as element X), Y instance of xs:integer OR @att1 instance of xs:string then these expressions should return boolean 'false', as per current rules of XPath 2.0 "instance of" checks. (the current implementation before this commit, returns 'true' for these checks) Whereas, following checks should give us 'true' result, Y instance of element(*, xs:integer) OR @att1 instance of attribute(*, xs:string) This behavior is governed by the section "2.4.2 Atomization" of XPath 2.0 spec, that says, <quote> Atomization is used in processing the following types of expressions: * Arithmetic expressions * Comparison expressions * Function calls and returns * Cast expressions </quote> This doesn't cover "instance of" checks. I'm committing a fix for this requirement to the service branch, and would contribute test cases for this a little later. Reproducible: Always
Did you add the test case?
@ Jesper: when I try to commit test case files for this, I get following errors The server reported an error while performing the "cvs commit" command. org.eclipse.wst.xml.xpath2.processor.tests_1.4: cvs commit: ERROR: cannot write file /cvsroot/webtools/sourceediting/tests/org.eclipse.wst.xml.xpath2.processor.tests/bugTestFiles/Attic/bug362026.xsd,v: Permission denied org.eclipse.wst.xml.xpath2.processor.tests_1.4: cvs commit: ERROR: cannot write file /cvsroot/webtools/sourceediting/tests/org.eclipse.wst.xml.xpath2.processor.tests/bugTestFiles/Attic/bug362026.xml,v: Permission denied org.eclipse.wst.xml.xpath2.processor.tests_1.4: cvs [commit aborted]: could not open lock file `/cvsroot/webtools/sourceediting/tests/org.eclipse.wst.xml.xpath2.processor.tests/src/org/eclipse/wst/xml/xpath2/processor/test/,TestBugs.java,': Permission denied Do you know, how to fix these? I remember, there were few configuration changes lately wrt the movement of code base, but couldn't keep pace with those announcements (perhaps, my inability to make this commit is related to that).
Progress happened: The CVS repository is marked read-only and moved to Git. Please see http://wiki.eclipse.org/WTP_Git_Workflows for a guide. You can attach the patches here, and assign me the bug, if you prefer.
Thanks for the pointers. I'll try to configure Git, and check-in files there.
I committed few test cases for this bug today. I work on the following branches, R3_2_maintenance (for processor enhancements) R3_2_xpath2_14unittests (for unit tests)