Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Wtp-wst-dev] XPath2 - bugs + tests


My answers are below.

W dniu 2011-10-12 22:51, Jesper Steen Møller pisze:
Hi Łukasz,

This is great!

For purposes of tracking and especially "IP tracking", we need to track this in Bugzilla. I'll go and create these, bug I'll need you to upload the diffs there. If you don't have an Eclipse Bugzilla account yet, you better get one now.
Ok, I will upload patches as soon as You open bugs in bugzilla.

As for the cause of the "holes" in the test and implementation, two reasons apply: 1) The tests are primarily from the W3C test suite, combined with the specific tests for bugs found, with contriutions from different individuals and companies. So while it covers a lot, it doesn't cover everything. We should add your findings back into the test suite, not just the Java version of it (I wish we had a better process for doing this)
What do you mean by saying "not just the Java version of it" ?
2) The implementation started as an academic clean room implementation but from an non-final version of the spec. When David Carver picked it up and work started under the Eclipse WTP umbrella, the focus was on correctness against the test suite, where we attacked it like a black box if it worked, and only took apart the failures. So, the horrible stuff like System.exit which obviously has NO place in a library, kept below the radar for quite a while, but was mostly removed in the 2.0 version this year, when every file was examined.

Maybe we should simple make search for every occurrence of System.exit function calls and replace them with some runtime exception.

Mukul, would you be interested in backporting Łukasz's bugs to the 1.x branch?

It is great to see community input to this project, and I'd love to hear about how you use the library (unless that's confidential...)

No, it is not confidential :). We created XBRL Formula Validator based on yours library. The whole specification ( ) is based on XPath2.0. Currently we are moving to new API.
After finishing this process, we probably have to have some battle with performance of evaluating XPath expressions. Main thing, which distinguish our solution from other venders is that we are implemented runtime(online) validation of XBRL Formula. We have some taxonomies, which includes many XBRL Formulas and after changing single value in XBRL document we have to evaluate sometime thousands of XPath expressions.


Wojtek Diakowski
Łukasz Wycisk


2011/10/12 Łukasz Wycisk <luczus@xxxxxxxxx>


We have compared CVS newest version with our local changes. Some of bugs has similar fixes, however there are still some which have not been fixed yet. Proposed fixes are in attached diffs. We tried to test our fixes using existing files in test case by adding methods to

1. FnAbs:

According to sequence is expected (indicator *, +, or ?) the atomization of arguments should be applied. Now in case of node passed to method type error occur. However there is some support for atomization - FnDistinctValues was fixed lately. Test case:


We think that in other numeric function similar errors can occur, suppose other tests should be added. Surprisingly there are no tests for that sort of situation in conformance suit (at least we haven’t found any).


2. FnIndexOf:

Function should support any atomic values. It seems that there is no support for QNames.


Second test function leads to third problem.


3. QName._expanded which is boolean value saying if namespace was set (also null if default). When qname is created by function with empty first argument:

then ._expanded is ‘true’(we think it’s correct)

but to compare it with qname from element will always return ‘false’ since Element.node_name() sets ._expanded to ‘false’ in case of null namespace ( representation of no-namespace situation is null).

Removing if statement in constructor (QName:45) seems to solve the problem and do not affected other tests. However we are not sure about correct ._expanded parameter state. What is Your opinion?


4. FnPlus used to have System.exit() line which caused us some trouble to trace. It was fixed but still there are plenty System.out statements for some unusual errors. Why just simply throw an exception?

We are still investigating other differences trying to run our application on new library version. We will get back to You with any other fixes. In the meantime please let us know what do You think about those.


Wojciech Diakowski


Łukasz Wycisk


wtp-wst-dev mailing list

wtp-wst-dev mailing list

Back to the top