W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2007

[Bug 4595] 1.0.3dev: document(*) with undefined context item

From: <bugzilla@wiggum.w3.org>
Date: Wed, 12 Sep 2007 13:14:37 +0000
CC:
To: public-qt-comments@w3.org
Message-Id: <E1IVS3B-00066e-Lw@wiggum.w3.org>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=4595





------- Comment #15 from tim@cbcl.co.uk  2007-09-12 13:14 -------
OK.  I've modified our implementation.  Even if we can tell statically that a
query will necessarily require the context item, if its type is known to be
none we now just let it pass until the query is executed.

We now fail the following tests, so present alternative correct results.


(:*******************************************************:)
(: Test: K2-DirectConElemNamespace-13                    :)
(: Written by: Frans Englich                             :)
(: Date: 2007-07-17T17:04:38+01:00                       :)
(: Purpose: A name test whose namespace is declared with a prefixed namespace
at
tribute. :)
(:*******************************************************:)
declare default function namespace "http://example.com";
<e xmlns:p="http://www.w3.org/2001/XMLSchema" a:p="{p:nametest}"/>

In addition to XPDY0002, there is use of an undefined namespace prefix "a"
(XPST0081).  This also applies to K2-DirectConElemNamespace-14.

(:*******************************************************:)
(: Test: K2-LetExprWithout-17                            :)
(: Written by: Frans Englich                             :)
(: Date: 2007-07-17T17:04:39+01:00                       :)
(: Purpose: Ensure a name test is reported for using the undefined focus, when
a
ppearing as a child of a let binding. :)
(:*******************************************************:)
declare function local:function()
{
    let $b := (i/a)
    return ()
};
local:function()

Here an optimizer is free to eliminate $b completely.  Therefore the empty
sequence is a valid result.


(:*******************************************************:)
(: Test: K2-FunctionProlog-16                            :)
(: Written by: Frans Englich                             :)
(: Date: 2007-07-17T17:04:39+01:00                       :)
(: Purpose: A tricky parser case.                        :)
(:*******************************************************:)
declare function local:myFunction() as item()*
{***};
1

Here the function is never called.  1 is therefore a valid answer.
Received on Wednesday, 12 September 2007 13:14:40 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:48 GMT