Quantified expressions, SOAP interface and 'insert' expressions

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Quantified expressions, SOAP interface and 'insert' expressions

Sam Stokes
Hi,

We've been using eXist as the backend for a prototype of an environmental
data reporting system, and have encountered a few bugs along the way - I
enclose descriptions and patches/workarounds we've found.  (I've not
contributed a patch to an open source project before, so I apologise if
these aren't in an appropriate format or if the mailing list isn't the
ideal way to submit this.)  We're using the latest version of eXist from
CVS (as of a couple of weeks ago), running on Linux under Apache Tomcat.

* Quantified expressions behave strangely
(Bug #1267554 - http://sourceforge.net/tracker/index.php?func=detail&aid=1267554&group_id=17691&atid=117691)
The evaluation of quantified expressions ('[some|every] $foo in [expr]
satisfies [expr]') seems to behave incorrectly.  For example the code
fragments

--------
every $foo in (1,2,3) satisfies
  let $bar := baz
  return false()
--------

and

--------
declare function local:foo() { false() };

every $bar in (1,2,3) satisfies
  local:foo()
--------

both return true, whereas I would expect them to return false.  I've found
that the attached xquery-quantifiedexpression.patch fixes this problem.

* The SOAP XQuery interface throws a NullPointerException when returning
the empty sequence.  The query '.[false()]', executed via the SOAP
interface, will exhibit this problem, as will any query using XQuery
Update Extensions.  The attached soap-zerolengthresponse.patch (due
to Gareth Williams, Ecsponent ltd.) fixes this problem.

* There seems to be a bug with XQuery Update Extensions, at least with
'update insert' commands, whereby elements inserted into existing
documents are visible when opening the document from the Java admin
client, but do not show up at all in the results of XQuery expressions on
those documents.  (In some cases 'update insert' expressions would even
throw the whole document into this inconsistent state, causing queries to
return no results when the documents were visibly not empty.)  The
attached xquery-update-insert.patch (also due to Gareth Williams) fixes
this problem, but is a bit of an ugly hack: after the document tree has
been updated with the new elements, it serialises the entire document to
a java.lang.String, then re-parses it and stores it back in.

Hope this information is of some use - please let me know if you need any
more details.

--
Sam Stokes
Ecsponent ltd.

eXist-patches.tar.bz2 (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Quantified expressions, SOAP interface and 'insert' expressions

Jean-Marc Vanel-3
Sam Stokes wrote:

> Hi,
> We've been using eXist as the backend for a prototype of an
> environmental data reporting system, and have encountered a few bugs
> along the way - I enclose descriptions and patches/workarounds we've
> found.  (I've not contributed a patch to an open source project
> before, so I apologise if these aren't in an appropriate format or if
> the mailing list isn't the ideal way to submit this.)  

It's OK. You also did a bug report on sf.net, wich is also fine.
Thank you very much .

> We're using the latest version of eXist from CVS (as of a couple of
> weeks ago), running on Linux under Apache Tomcat.
>
> * Quantified expressions behave strangely
> (Bug #1267554 -
> http://sourceforge.net/tracker/index.php?func=detail&aid=1267554&group_id=17691&atid=117691)
>
> The evaluation of quantified expressions ('[some|every] $foo in [expr]
> satisfies [expr]') seems to behave incorrectly.  For example the code
> fragments
> --------
> every $foo in (1,2,3) satisfies
>     let $bar := baz
>     return false()
> --------
> ....
> both return true, whereas I would expect them to return false.  I've
> found that the attached xquery-quantifiedexpression.patch fixes this
> problem.

It's commited in the CVS. Your 2 other patches will be treated soon .

--
Jean-Marc Vanel
Conseil et Services / développement & intégration logiciels
Logiciel libre, Web, Java, XML ...
A la pointe de la technique, au service des projets
http://jmvanel.free.fr/ ===) CV, software resources

Mes journaux:
- sujets généraux en Français: http://jmvanel.free.fr/Block-note.html
- sujets informatiques en Français: http://jmvanel.free.fr/notes-informatiques.html
- computer science diary : http://jmvanel.free.fr/computer-notes.html

Worldwide Botanical Knowledge Base
http://wwbota.free.fr/ 
test XML query engine: http://jmvanel.free.fr/protea.html




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Loading...