Community
Participate
Working Groups
WTP 3.2 RC2 build (retrieved as wst-sdk-buildrepo-S-3.2.0RC2-20100520232028) When evaluating XPath, only nodesets are shown in the result view, not atomic values such as strings and the like. This is the same for XPath1 and XPath2 evaluation. The bug: For XPath1, the result is silently dropped. For XPath2, a non-node result causes an NPE exception in the Error Log. The fix: The attached patch fixes this and adds some extra nullchecks where applicable. For XPath1, the patch checks for results which cannot be returned as a NodeList, and returns these as a String instead. For XPath2 evaluation, the results are either used as nodes or as string values, since all atomic values in XPath has a string_value(). The patch is quite local.
Created attachment 169566 [details] Patch which fixes the display of non-DOM-node results (i.e. atomic values) in the XPath view
Moved component for this one as well.
And reassigned to the xsl-inbox...
Add assigning to Jesper... :)
This one should go into 3.2.1 as well - please review.
Looks good to me...
* Explain why you believe this is a stop-ship defect. Without this, an ugly exception is thrown into the Event Log. I really hate those, it makes us look bad. * Is there a work-around? No - valid XPath expressions fail. * How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? I have tested the combinations thoroughly, in the XPath View, manually. There will be a JUnit test attached within the next 24 hours. * Give a brief technical overview: For both XPath1.0 and XPath2, the existing code did not account for the case where an expression did not yield a result which was not a DOM node. This code handles this case, by converting any non-node result into a string and showing that, for both XPath 1.0 and 2. * Who has reviewed this fix? David Carver * What is the risk associated with this fix? Quite low, since it only adds a simple solution to a code path that would otherwise fail. But ... should this be reviewd by Project Lead Nitin before PMC review?
Consider it approved by me. PMC review questionnaire in comemnt 7.
Created attachment 173334 [details] Updated patch with tests As promised, a test which will test the fix. Also fixed copyrights.
Created attachment 173335 [details] mylyn/context/zip
Relased to 3_2_Maintenance as per PMC review as v201007022358, and to HEAD v201007022359.