[Monetdb-developers] An XQuery question

Ying Zhang Y.Zhang at cwi.nl
Mon May 7 11:20:39 CEST 2007


On Mon, May 07, 2007 at 09:35:37AM +0200, Jens Teubner wrote:
> On Sun, May 06, 2007 at 10:28:57PM +0200, Ying Zhang wrote:
> 
> > If I run the follwoing XQuery query with Galax:
> > 
> > ==========
> > test.xq
> > ==========
> > declare namespace t = "test";
> > 
> > declare function t:echoVoid() { () };
> > t:echoVoid()
> > ==========
> > 
> > Galax gives a warning:
> > 
> > $ galax-run ~/test.xq 
> > [WARNING] 
> > Expression '???' at File "/ufs/zhang/test.xq", line 3, characters 8-37
> > has empty type, but is not the empty expression
> 
> Jennie,
> 
> it is a static type error when expressions can statically be determined
> to return the empty sequence.  The XQuery Formal Semantics allows such
> empty sequences only in very rare cases (e.g., as the argument of a
> function call).  This is why Galax complains.  Pathfinder's type
> checker, unfortunately, is not smart enough to detect these kind of
> things and does not complain.

Hi Jens,

Thanks for the explanation.  So I think I will have to live with this
warning :(

Jennie

> 
> The rationale behind the behavior as specified in the specs is that an
> XQuery processor could detect typos in the user input query, e.g., if a
> user mis-types tag names in XPath location steps.  A fully schema-aware
> system might be able to detect such things.
> 
> Jens
> 
> -- 
> Jens Teubner
> Technische Universitaet Muenchen, Department of Informatics
> D-85748 Garching, Germany
> Tel: +49 89 289-17259     Fax: +49 89 289-17263
> 
> Things are pretty mixed up, but I think the worst is over.
>                          -- TeX Error Message
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Monetdb-developers mailing list
> Monetdb-developers at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/monetdb-developers




More information about the developers-list mailing list