Community
Participate
Working Groups
Build Identifier: I20090313-0100 The typed values of element and attribute nodes need to be implemented as per the algorithm described in the XDM spec (ref, http://www.w3.org/TR/xpath-datamodel/#TypedValueDetermination). The current implementation with PsychoPath engine has certain shortcomings as per this part of the XDM spec (particularly for simple content with varieties list and union). i've written a fix for this and would be committing a patch soon and few additional test cases about this change later. Reproducible: Always
Created attachment 177675 [details] patch file i've committed the patch to HEAD, and attaching it here for review, before we commit this to the service branch. with this patch current PsychoPath tests pass without any change (that's good i believe). i would be writing few additional test cases for this patch, and would attach them to this bug-report soon.
i've attached the patch file for this bug, and asking for review from fellow committers before we commit this to the service branch.
Created attachment 177678 [details] updated patch file modifying the patch slightly. doing a slight change to XSDecimal, to make it more JDK 1.4 friendly (i got this error, while testing these changes with Xerces. the attached change to XSDecimal fixes this issue).
Created attachment 177680 [details] updated patch file v2 doing a slight change to the patch, and attaching it again please. this looks better now. i'm in a process to prepare the test cases for this change, and would be posting them asap. all the latest changes including this one have gone into HEAD (but not to service branch, and we are waiting for a review there).
Mukul, can we do another round of refactoring in the NodeType class. Is there a way you can break that big multi if then else statement into something smaller (i.e. extract some of the body of that code into specific methods). It'll make it easier to maintain going forward and easier to read as well for somebody having to maintain it. We'll also need PMC approval now to get it into 3.2.2. So when resubmitting the patch, please add a wtp PMC member for approval as well.
Created attachment 177682 [details] updated patch, refactoring to NodeType
Created attachment 177683 [details] patch having test cases for this issue
Hi Dave, (In reply to comment #5) > Mukul, can we do another round of refactoring in the NodeType class. > > Is there a way you can break that big multi if then else statement into > something smaller (i.e. extract some of the body of that code into specific > methods). It'll make it easier to maintain going forward and easier to read as > well for somebody having to maintain it. > > We'll also need PMC approval now to get it into 3.2.2. > > So when resubmitting the patch, please add a wtp PMC member for approval as > well. As per the suggestion (and thanks :)), i've refactored the code of NodeType (i've added code-base of list and union handling to different methods). Kindly review please. I've committed the refactoring changes to HEAD. No changes have yet been committed to the service branch. I've also attached a patch with few test cases for this change (not yet committed). I'm happy to report, that after this fix all existing tests still pass, and the new tests for this patch also pass. I'm positive that the solution sought by this bug report, has been achieved by this patch. After the PMC review passes (possibly with further improvements and after some more time), we can commit the test-case additions and also the changes to the service branch. PS: i'm asking David Williams to do a PMC review please. Regards, Mukul
This looks better, plus there are unit tests for this now as well.
Created attachment 178112 [details] updated patch with improvements updating the patch making few improvements.
i did few changes to logic for the patch. now we are using few native Xerces APIs to get validation details from existing PSVI objects, instead of writing few of validation primitives again into PsychoPath engine. the test cases (in the patch for this bug report) remain same and all of them pass as before. i've committed changes to HEAD but not to service branch. test changes are yet not committed. i'm happy doing this change :)
(In reply to comment #11) > i did few changes to logic for the patch. now we are using few native Xerces > APIs to get validation details from existing PSVI objects, instead of writing > few of validation primitives again into PsychoPath engine. the test cases (in > the patch for this bug report) remain same and all of them pass as before. > > i've committed changes to HEAD but not to service branch. test changes are yet > not committed. > > i'm happy doing this change :) Well, as I mentioned we need PMC approval, the code looks fine. David??
Created attachment 178212 [details] attaching an improved patch for this bug report these changes were done into PsychoPath, to align better with XML schema 1.1 assertions implementation with Xerces, and the results are encouraging for Xerces now, with these new changes. the test cases remain same, and success rate of existing tests is same. as of now, these new changes are committed to HEAD, but not to service branch. also new tests are still not committed to the CVS server location. as advised, the changes to service branch will be committed after a PMC review, or even during the next development & commit cycle at Eclipse Source Editing. please let me know, what's convenient for the PsychoPath and Eclipse Source Editing projects.
Since WTP 3.2.2 was released few days ago, I thought I might make commit of changes for this bug report. I've now completed commit of changes for this bug (both for code-base and test cases) report both to PsychoPath XPath2 HEAD location and service branch. I'm now marking this defect as resolved.