Unexpected XQuery issue with new 3.0

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Unexpected XQuery issue with new 3.0

Martin Holmes
This works fine in RC1 but causes an error in the new release. In
search.xql, I have this:


[...]
declare variable $searchPagePath := '/db/apps/moeml/data/search.htm';

declare variable $searchPage     := doc($searchPagePath);
[...]

and eXist then generates this error:

<exception>
<path>/db/apps/moeml/search.xql</path>
  <message>
   err:XPDY0002 variable '$searchPagePath' is not set. [at line 48,
column 42, source: /db/apps/moeml/search.xql]
  </message>
</exception>

Am I missing something obvious here?

Cheers,
Martin


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Unexpected XQuery issue with new 3.0

Martin Holmes
Same problem in another file:

declare variable $docName := request:get-parameter('docName', 'NONE.html');
declare variable $docPath := concat('/db/apps/moeml/data/', $docName);
declare variable $docExists := doc-available($docPath);

<exception>
<path>/db/apps/moeml/doc.xql</path>
<message>err:XPDY0002 variable '$docName' is not set. [at line 39,
column 62, source: /db/apps/moeml/doc.xql]</message>
</exception>

Very odd indeed...

On 2017-02-09 10:05 AM, Martin Holmes wrote:

> This works fine in RC1 but causes an error in the new release. In
> search.xql, I have this:
>
>
> [...]
> declare variable $searchPagePath := '/db/apps/moeml/data/search.htm';
>
> declare variable $searchPage     := doc($searchPagePath);
> [...]
>
> and eXist then generates this error:
>
> <exception>
> <path>/db/apps/moeml/search.xql</path>
>   <message>
>    err:XPDY0002 variable '$searchPagePath' is not set. [at line 48,
> column 42, source: /db/apps/moeml/search.xql]
>   </message>
> </exception>
>
> Am I missing something obvious here?
>
> Cheers,
> Martin
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Unexpected XQuery issue with new 3.0

Martin Holmes
Here's a minimal test file that works in RC1 and fails in the new release:

___________

xquery version "3.1";

declare default element namespace "http://www.w3.org/1999/xhtml";

declare variable $docName := 'ABCH1.htm';
declare variable $docPath := concat('/db/apps/moeml/data/', $docName);

$docPath
___________


The bug appears to be triggered by the declaration of the default
element namespace; if I remove that, the error goes away. But I don't
see anything wrong with the namespace declaration, and it doesn't cause
any problems in RC1.


On 2017-02-09 10:24 AM, Martin Holmes wrote:

> Same problem in another file:
>
> declare variable $docName := request:get-parameter('docName', 'NONE.html');
> declare variable $docPath := concat('/db/apps/moeml/data/', $docName);
> declare variable $docExists := doc-available($docPath);
>
> <exception>
> <path>/db/apps/moeml/doc.xql</path>
> <message>err:XPDY0002 variable '$docName' is not set. [at line 39,
> column 62, source: /db/apps/moeml/doc.xql]</message>
> </exception>
>
> Very odd indeed...
>
> On 2017-02-09 10:05 AM, Martin Holmes wrote:
>> This works fine in RC1 but causes an error in the new release. In
>> search.xql, I have this:
>>
>>
>> [...]
>> declare variable $searchPagePath := '/db/apps/moeml/data/search.htm';
>>
>> declare variable $searchPage     := doc($searchPagePath);
>> [...]
>>
>> and eXist then generates this error:
>>
>> <exception>
>> <path>/db/apps/moeml/search.xql</path>
>>   <message>
>>    err:XPDY0002 variable '$searchPagePath' is not set. [at line 48,
>> column 42, source: /db/apps/moeml/search.xql]
>>   </message>
>> </exception>
>>
>> Am I missing something obvious here?
>>
>> Cheers,
>> Martin
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Unexpected XQuery issue with new 3.0

Martin Holmes
If I explicitly namespace the variables by declaring a prefix for the
default namespace as well as declaring it as default, then prefix all
the variables, there is no error.

My reading of the 3.1 spec suggests that in a library module, all
variables must be explicitly namespaced; but I don't think that's the
case for a main module (which the test file below is). Am I wrong about
that?

On 2017-02-09 10:40 AM, Martin Holmes wrote:

> Here's a minimal test file that works in RC1 and fails in the new release:
>
> ___________
>
> xquery version "3.1";
>
> declare default element namespace "http://www.w3.org/1999/xhtml";
>
> declare variable $docName := 'ABCH1.htm';
> declare variable $docPath := concat('/db/apps/moeml/data/', $docName);
>
> $docPath
> ___________
>
>
> The bug appears to be triggered by the declaration of the default
> element namespace; if I remove that, the error goes away. But I don't
> see anything wrong with the namespace declaration, and it doesn't cause
> any problems in RC1.
>
>
> On 2017-02-09 10:24 AM, Martin Holmes wrote:
>> Same problem in another file:
>>
>> declare variable $docName := request:get-parameter('docName', 'NONE.html');
>> declare variable $docPath := concat('/db/apps/moeml/data/', $docName);
>> declare variable $docExists := doc-available($docPath);
>>
>> <exception>
>> <path>/db/apps/moeml/doc.xql</path>
>> <message>err:XPDY0002 variable '$docName' is not set. [at line 39,
>> column 62, source: /db/apps/moeml/doc.xql]</message>
>> </exception>
>>
>> Very odd indeed...
>>
>> On 2017-02-09 10:05 AM, Martin Holmes wrote:
>>> This works fine in RC1 but causes an error in the new release. In
>>> search.xql, I have this:
>>>
>>>
>>> [...]
>>> declare variable $searchPagePath := '/db/apps/moeml/data/search.htm';
>>>
>>> declare variable $searchPage     := doc($searchPagePath);
>>> [...]
>>>
>>> and eXist then generates this error:
>>>
>>> <exception>
>>> <path>/db/apps/moeml/search.xql</path>
>>>   <message>
>>>    err:XPDY0002 variable '$searchPagePath' is not set. [at line 48,
>>> column 42, source: /db/apps/moeml/search.xql]
>>>   </message>
>>> </exception>
>>>
>>> Am I missing something obvious here?
>>>
>>> Cheers,
>>> Martin
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Unexpected XQuery issue with new 3.0

wshager
Perhaps you should define a "default function namespace" instead.

2017-02-10 0:51 GMT+01:00 Martin Holmes <[hidden email]>:
If I explicitly namespace the variables by declaring a prefix for the
default namespace as well as declaring it as default, then prefix all
the variables, there is no error.

My reading of the 3.1 spec suggests that in a library module, all
variables must be explicitly namespaced; but I don't think that's the
case for a main module (which the test file below is). Am I wrong about
that?

On 2017-02-09 10:40 AM, Martin Holmes wrote:
> Here's a minimal test file that works in RC1 and fails in the new release:
>
> ___________
>
> xquery version "3.1";
>
> declare default element namespace "http://www.w3.org/1999/xhtml";
>
> declare variable $docName := 'ABCH1.htm';
> declare variable $docPath := concat('/db/apps/moeml/data/', $docName);
>
> $docPath
> ___________
>
>
> The bug appears to be triggered by the declaration of the default
> element namespace; if I remove that, the error goes away. But I don't
> see anything wrong with the namespace declaration, and it doesn't cause
> any problems in RC1.
>
>
> On 2017-02-09 10:24 AM, Martin Holmes wrote:
>> Same problem in another file:
>>
>> declare variable $docName := request:get-parameter('docName', 'NONE.html');
>> declare variable $docPath := concat('/db/apps/moeml/data/', $docName);
>> declare variable $docExists := doc-available($docPath);
>>
>> <exception>
>> <path>/db/apps/moeml/doc.xql</path>
>> <message>err:XPDY0002 variable '$docName' is not set. [at line 39,
>> column 62, source: /db/apps/moeml/doc.xql]</message>
>> </exception>
>>
>> Very odd indeed...
>>
>> On 2017-02-09 10:05 AM, Martin Holmes wrote:
>>> This works fine in RC1 but causes an error in the new release. In
>>> search.xql, I have this:
>>>
>>>
>>> [...]
>>> declare variable $searchPagePath := '/db/apps/moeml/data/search.htm';
>>>
>>> declare variable $searchPage     := doc($searchPagePath);
>>> [...]
>>>
>>> and eXist then generates this error:
>>>
>>> <exception>
>>> <path>/db/apps/moeml/search.xql</path>
>>>   <message>
>>>    err:XPDY0002 variable '$searchPagePath' is not set. [at line 48,
>>> column 42, source: /db/apps/moeml/search.xql]
>>>   </message>
>>> </exception>
>>>
>>> Am I missing something obvious here?
>>>
>>> Cheers,
>>> Martin
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open



--

W.S. Hager
Lagua Web Solutions
http://lagua.nl


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Unexpected XQuery issue with new 3.0

Martin Holmes
There are lots of ways to work around it. I'm happy to namespace all my
variables, which also works. My question is whether this is a bug or
not. I believe it should be OK to have non-prefixed vars in a main
XQuery module and a default element namespace at the same time; I don't
see why one should affect the other; and this is definitely a
backwards-compatibility issue. I'll be happy to be told I'm wrong and
that the spec says otherwise, and eXist is only enforcing the spec, but
I don't see it.

Cheers,
Martin

On 2017-02-10 03:51 AM, W.S. Hager wrote:

> Perhaps you should define a "default function namespace" instead.
>
> 2017-02-10 0:51 GMT+01:00 Martin Holmes <[hidden email]
> <mailto:[hidden email]>>:
>
>     If I explicitly namespace the variables by declaring a prefix for the
>     default namespace as well as declaring it as default, then prefix all
>     the variables, there is no error.
>
>     My reading of the 3.1 spec suggests that in a library module, all
>     variables must be explicitly namespaced; but I don't think that's the
>     case for a main module (which the test file below is). Am I wrong about
>     that?
>
>     On 2017-02-09 10:40 AM, Martin Holmes wrote:
>     > Here's a minimal test file that works in RC1 and fails in the new
>     release:
>     >
>     > ___________
>     >
>     > xquery version "3.1";
>     >
>     > declare default element namespace "http://www.w3.org/1999/xhtml";
>     >
>     > declare variable $docName := 'ABCH1.htm';
>     > declare variable $docPath := concat('/db/apps/moeml/data/', $docName);
>     >
>     > $docPath
>     > ___________
>     >
>     >
>     > The bug appears to be triggered by the declaration of the default
>     > element namespace; if I remove that, the error goes away. But I don't
>     > see anything wrong with the namespace declaration, and it doesn't
>     cause
>     > any problems in RC1.
>     >
>     >
>     > On 2017-02-09 10:24 AM, Martin Holmes wrote:
>     >> Same problem in another file:
>     >>
>     >> declare variable $docName := request:get-parameter('docName',
>     'NONE.html');
>     >> declare variable $docPath := concat('/db/apps/moeml/data/',
>     $docName);
>     >> declare variable $docExists := doc-available($docPath);
>     >>
>     >> <exception>
>     >> <path>/db/apps/moeml/doc.xql</path>
>     >> <message>err:XPDY0002 variable '$docName' is not set. [at line 39,
>     >> column 62, source: /db/apps/moeml/doc.xql]</message>
>     >> </exception>
>     >>
>     >> Very odd indeed...
>     >>
>     >> On 2017-02-09 10:05 AM, Martin Holmes wrote:
>     >>> This works fine in RC1 but causes an error in the new release. In
>     >>> search.xql, I have this:
>     >>>
>     >>>
>     >>> [...]
>     >>> declare variable $searchPagePath :=
>     '/db/apps/moeml/data/search.htm';
>     >>>
>     >>> declare variable $searchPage     := doc($searchPagePath);
>     >>> [...]
>     >>>
>     >>> and eXist then generates this error:
>     >>>
>     >>> <exception>
>     >>> <path>/db/apps/moeml/search.xql</path>
>     >>>   <message>
>     >>>    err:XPDY0002 variable '$searchPagePath' is not set. [at line 48,
>     >>> column 42, source: /db/apps/moeml/search.xql]
>     >>>   </message>
>     >>> </exception>
>     >>>
>     >>> Am I missing something obvious here?
>     >>>
>     >>> Cheers,
>     >>> Martin
>     >>>
>     >>>
>     >>>
>     ------------------------------------------------------------------------------
>     >>> Check out the vibrant tech community on one of the world's most
>     >>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>     >>>
>     >>
>     >>
>     >>
>     >>
>     ------------------------------------------------------------------------------
>     >> Check out the vibrant tech community on one of the world's most
>     >> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>     >>
>     >
>     >
>     >
>     >
>     ------------------------------------------------------------------------------
>     > Check out the vibrant tech community on one of the world's most
>     > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>     >
>
>
>
>     ------------------------------------------------------------------------------
>     Check out the vibrant tech community on one of the world's most
>     engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>     _______________________________________________
>     Exist-open mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     https://lists.sourceforge.net/lists/listinfo/exist-open
>     <https://lists.sourceforge.net/lists/listinfo/exist-open>
>
>
>
>
> --
>
> W.S. Hager
> Lagua Web Solutions
> http://lagua.nl <http://lagua.nl/>
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>
>
>
> _______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open
>



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Unexpected XQuery issue with new 3.0

wshager
According to the spec everything is in a namespace. Functions are in the fn namespace. Variables are just constants in the same namespace as the functions, so I'm assuming that it follows that those should be in another namespace than fn. 

Op 10 feb. 2017 14:46 schreef "Martin Holmes" <[hidden email]>:
There are lots of ways to work around it. I'm happy to namespace all my
variables, which also works. My question is whether this is a bug or
not. I believe it should be OK to have non-prefixed vars in a main
XQuery module and a default element namespace at the same time; I don't
see why one should affect the other; and this is definitely a
backwards-compatibility issue. I'll be happy to be told I'm wrong and
that the spec says otherwise, and eXist is only enforcing the spec, but
I don't see it.

Cheers,
Martin

On 2017-02-10 03:51 AM, W.S. Hager wrote:
> Perhaps you should define a "default function namespace" instead.
>
> 2017-02-10 0:51 GMT+01:00 Martin Holmes <[hidden email]
> <mailto:[hidden email]>>:
>
>     If I explicitly namespace the variables by declaring a prefix for the
>     default namespace as well as declaring it as default, then prefix all
>     the variables, there is no error.
>
>     My reading of the 3.1 spec suggests that in a library module, all
>     variables must be explicitly namespaced; but I don't think that's the
>     case for a main module (which the test file below is). Am I wrong about
>     that?
>
>     On 2017-02-09 10:40 AM, Martin Holmes wrote:
>     > Here's a minimal test file that works in RC1 and fails in the new
>     release:
>     >
>     > ___________
>     >
>     > xquery version "3.1";
>     >
>     > declare default element namespace "http://www.w3.org/1999/xhtml";
>     >
>     > declare variable $docName := 'ABCH1.htm';
>     > declare variable $docPath := concat('/db/apps/moeml/data/', $docName);
>     >
>     > $docPath
>     > ___________
>     >
>     >
>     > The bug appears to be triggered by the declaration of the default
>     > element namespace; if I remove that, the error goes away. But I don't
>     > see anything wrong with the namespace declaration, and it doesn't
>     cause
>     > any problems in RC1.
>     >
>     >
>     > On 2017-02-09 10:24 AM, Martin Holmes wrote:
>     >> Same problem in another file:
>     >>
>     >> declare variable $docName := request:get-parameter('docName',
>     'NONE.html');
>     >> declare variable $docPath := concat('/db/apps/moeml/data/',
>     $docName);
>     >> declare variable $docExists := doc-available($docPath);
>     >>
>     >> <exception>
>     >> <path>/db/apps/moeml/doc.xql</path>
>     >> <message>err:XPDY0002 variable '$docName' is not set. [at line 39,
>     >> column 62, source: /db/apps/moeml/doc.xql]</message>
>     >> </exception>
>     >>
>     >> Very odd indeed...
>     >>
>     >> On 2017-02-09 10:05 AM, Martin Holmes wrote:
>     >>> This works fine in RC1 but causes an error in the new release. In
>     >>> search.xql, I have this:
>     >>>
>     >>>
>     >>> [...]
>     >>> declare variable $searchPagePath :=
>     '/db/apps/moeml/data/search.htm';
>     >>>
>     >>> declare variable $searchPage     := doc($searchPagePath);
>     >>> [...]
>     >>>
>     >>> and eXist then generates this error:
>     >>>
>     >>> <exception>
>     >>> <path>/db/apps/moeml/search.xql</path>
>     >>>   <message>
>     >>>    err:XPDY0002 variable '$searchPagePath' is not set. [at line 48,
>     >>> column 42, source: /db/apps/moeml/search.xql]
>     >>>   </message>
>     >>> </exception>
>     >>>
>     >>> Am I missing something obvious here?
>     >>>
>     >>> Cheers,
>     >>> Martin
>     >>>
>     >>>
>     >>>
>     ------------------------------------------------------------------------------
>     >>> Check out the vibrant tech community on one of the world's most
>     >>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>     >>>
>     >>
>     >>
>     >>
>     >>
>     ------------------------------------------------------------------------------
>     >> Check out the vibrant tech community on one of the world's most
>     >> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>     >>
>     >
>     >
>     >
>     >
>     ------------------------------------------------------------------------------
>     > Check out the vibrant tech community on one of the world's most
>     > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>     >
>
>
>
>     ------------------------------------------------------------------------------
>     Check out the vibrant tech community on one of the world's most
>     engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>     _______________________________________________
>     Exist-open mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     https://lists.sourceforge.net/lists/listinfo/exist-open
>     <https://lists.sourceforge.net/lists/listinfo/exist-open>
>
>
>
>
> --
>
> W.S. Hager
> Lagua Web Solutions
> http://lagua.nl <http://lagua.nl/>
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>
>
>
> _______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open
>



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Unexpected XQuery issue with new 3.0

wshager

Op 10 feb. 2017 15:32 schreef "W.S. Hager" <[hidden email]>:
According to the spec everything is in a namespace. Functions are in the fn namespace. Variables are just constants in the same namespace as the functions, so I'm assuming that it follows that those should be in another namespace than fn. 

Op 10 feb. 2017 14:46 schreef "Martin Holmes" <[hidden email]>:
There are lots of ways to work around it. I'm happy to namespace all my
variables, which also works. My question is whether this is a bug or
not. I believe it should be OK to have non-prefixed vars in a main
XQuery module and a default element namespace at the same time; I don't
see why one should affect the other; and this is definitely a
backwards-compatibility issue. I'll be happy to be told I'm wrong and
that the spec says otherwise, and eXist is only enforcing the spec, but
I don't see it.

Cheers,
Martin

On 2017-02-10 03:51 AM, W.S. Hager wrote:
> Perhaps you should define a "default function namespace" instead.
>
> 2017-02-10 0:51 GMT+01:00 Martin Holmes <[hidden email]
> <mailto:[hidden email]>>:
>
>     If I explicitly namespace the variables by declaring a prefix for the
>     default namespace as well as declaring it as default, then prefix all
>     the variables, there is no error.
>
>     My reading of the 3.1 spec suggests that in a library module, all
>     variables must be explicitly namespaced; but I don't think that's the
>     case for a main module (which the test file below is). Am I wrong about
>     that?
>
>     On 2017-02-09 10:40 AM, Martin Holmes wrote:
>     > Here's a minimal test file that works in RC1 and fails in the new
>     release:
>     >
>     > ___________
>     >
>     > xquery version "3.1";
>     >
>     > declare default element namespace "http://www.w3.org/1999/xhtml";
>     >
>     > declare variable $docName := 'ABCH1.htm';
>     > declare variable $docPath := concat('/db/apps/moeml/data/', $docName);
>     >
>     > $docPath
>     > ___________
>     >
>     >
>     > The bug appears to be triggered by the declaration of the default
>     > element namespace; if I remove that, the error goes away. But I don't
>     > see anything wrong with the namespace declaration, and it doesn't
>     cause
>     > any problems in RC1.
>     >
>     >
>     > On 2017-02-09 10:24 AM, Martin Holmes wrote:
>     >> Same problem in another file:
>     >>
>     >> declare variable $docName := request:get-parameter('docName',
>     'NONE.html');
>     >> declare variable $docPath := concat('/db/apps/moeml/data/',
>     $docName);
>     >> declare variable $docExists := doc-available($docPath);
>     >>
>     >> <exception>
>     >> <path>/db/apps/moeml/doc.xql</path>
>     >> <message>err:XPDY0002 variable '$docName' is not set. [at line 39,
>     >> column 62, source: /db/apps/moeml/doc.xql]</message>
>     >> </exception>
>     >>
>     >> Very odd indeed...
>     >>
>     >> On 2017-02-09 10:05 AM, Martin Holmes wrote:
>     >>> This works fine in RC1 but causes an error in the new release. In
>     >>> search.xql, I have this:
>     >>>
>     >>>
>     >>> [...]
>     >>> declare variable $searchPagePath :=
>     '/db/apps/moeml/data/search.htm';
>     >>>
>     >>> declare variable $searchPage     := doc($searchPagePath);
>     >>> [...]
>     >>>
>     >>> and eXist then generates this error:
>     >>>
>     >>> <exception>
>     >>> <path>/db/apps/moeml/search.xql</path>
>     >>>   <message>
>     >>>    err:XPDY0002 variable '$searchPagePath' is not set. [at line 48,
>     >>> column 42, source: /db/apps/moeml/search.xql]
>     >>>   </message>
>     >>> </exception>
>     >>>
>     >>> Am I missing something obvious here?
>     >>>
>     >>> Cheers,
>     >>> Martin
>     >>>
>     >>>
>     >>>
>     ------------------------------------------------------------------------------
>     >>> Check out the vibrant tech community on one of the world's most
>     >>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>     >>>
>     >>
>     >>
>     >>
>     >>
>     ------------------------------------------------------------------------------
>     >> Check out the vibrant tech community on one of the world's most
>     >> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>     >>
>     >
>     >
>     >
>     >
>     ------------------------------------------------------------------------------
>     > Check out the vibrant tech community on one of the world's most
>     > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>     >
>
>
>
>     ------------------------------------------------------------------------------
>     Check out the vibrant tech community on one of the world's most
>     engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>     _______________________________________________
>     Exist-open mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     https://lists.sourceforge.net/lists/listinfo/exist-open
>     <https://lists.sourceforge.net/lists/listinfo/exist-open>
>
>
>
>
> --
>
> W.S. Hager
> Lagua Web Solutions
> http://lagua.nl <http://lagua.nl/>
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>
>
>
> _______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open
>



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Unexpected XQuery issue with new 3.0

wshager
When referring to the spec, please point to the relevant section, provided you can read it, because I really can't.

Op 10 feb. 2017 15:37 schreef "W.S. Hager" <[hidden email]>:

Op 10 feb. 2017 15:32 schreef "W.S. Hager" <[hidden email]>:
According to the spec everything is in a namespace. Functions are in the fn namespace. Variables are just constants in the same namespace as the functions, so I'm assuming that it follows that those should be in another namespace than fn. 

Op 10 feb. 2017 14:46 schreef "Martin Holmes" <[hidden email]>:
There are lots of ways to work around it. I'm happy to namespace all my
variables, which also works. My question is whether this is a bug or
not. I believe it should be OK to have non-prefixed vars in a main
XQuery module and a default element namespace at the same time; I don't
see why one should affect the other; and this is definitely a
backwards-compatibility issue. I'll be happy to be told I'm wrong and
that the spec says otherwise, and eXist is only enforcing the spec, but
I don't see it.

Cheers,
Martin

On 2017-02-10 03:51 AM, W.S. Hager wrote:
> Perhaps you should define a "default function namespace" instead.
>
> 2017-02-10 0:51 GMT+01:00 Martin Holmes <[hidden email]
> <mailto:[hidden email]>>:
>
>     If I explicitly namespace the variables by declaring a prefix for the
>     default namespace as well as declaring it as default, then prefix all
>     the variables, there is no error.
>
>     My reading of the 3.1 spec suggests that in a library module, all
>     variables must be explicitly namespaced; but I don't think that's the
>     case for a main module (which the test file below is). Am I wrong about
>     that?
>
>     On 2017-02-09 10:40 AM, Martin Holmes wrote:
>     > Here's a minimal test file that works in RC1 and fails in the new
>     release:
>     >
>     > ___________
>     >
>     > xquery version "3.1";
>     >
>     > declare default element namespace "http://www.w3.org/1999/xhtml";
>     >
>     > declare variable $docName := 'ABCH1.htm';
>     > declare variable $docPath := concat('/db/apps/moeml/data/', $docName);
>     >
>     > $docPath
>     > ___________
>     >
>     >
>     > The bug appears to be triggered by the declaration of the default
>     > element namespace; if I remove that, the error goes away. But I don't
>     > see anything wrong with the namespace declaration, and it doesn't
>     cause
>     > any problems in RC1.
>     >
>     >
>     > On 2017-02-09 10:24 AM, Martin Holmes wrote:
>     >> Same problem in another file:
>     >>
>     >> declare variable $docName := request:get-parameter('docName',
>     'NONE.html');
>     >> declare variable $docPath := concat('/db/apps/moeml/data/',
>     $docName);
>     >> declare variable $docExists := doc-available($docPath);
>     >>
>     >> <exception>
>     >> <path>/db/apps/moeml/doc.xql</path>
>     >> <message>err:XPDY0002 variable '$docName' is not set. [at line 39,
>     >> column 62, source: /db/apps/moeml/doc.xql]</message>
>     >> </exception>
>     >>
>     >> Very odd indeed...
>     >>
>     >> On 2017-02-09 10:05 AM, Martin Holmes wrote:
>     >>> This works fine in RC1 but causes an error in the new release. In
>     >>> search.xql, I have this:
>     >>>
>     >>>
>     >>> [...]
>     >>> declare variable $searchPagePath :=
>     '/db/apps/moeml/data/search.htm';
>     >>>
>     >>> declare variable $searchPage     := doc($searchPagePath);
>     >>> [...]
>     >>>
>     >>> and eXist then generates this error:
>     >>>
>     >>> <exception>
>     >>> <path>/db/apps/moeml/search.xql</path>
>     >>>   <message>
>     >>>    err:XPDY0002 variable '$searchPagePath' is not set. [at line 48,
>     >>> column 42, source: /db/apps/moeml/search.xql]
>     >>>   </message>
>     >>> </exception>
>     >>>
>     >>> Am I missing something obvious here?
>     >>>
>     >>> Cheers,
>     >>> Martin
>     >>>
>     >>>
>     >>>
>     ------------------------------------------------------------------------------
>     >>> Check out the vibrant tech community on one of the world's most
>     >>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>     >>>
>     >>
>     >>
>     >>
>     >>
>     ------------------------------------------------------------------------------
>     >> Check out the vibrant tech community on one of the world's most
>     >> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>     >>
>     >
>     >
>     >
>     >
>     ------------------------------------------------------------------------------
>     > Check out the vibrant tech community on one of the world's most
>     > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>     >
>
>
>
>     ------------------------------------------------------------------------------
>     Check out the vibrant tech community on one of the world's most
>     engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>     _______________________________________________
>     Exist-open mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     https://lists.sourceforge.net/lists/listinfo/exist-open
>     <https://lists.sourceforge.net/lists/listinfo/exist-open>
>
>
>
>
> --
>
> W.S. Hager
> Lagua Web Solutions
> http://lagua.nl <http://lagua.nl/>
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>
>
>
> _______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open
>



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Unexpected XQuery issue with new 3.0

Dmitriy Shabanov
In reply to this post by Martin Holmes
Hi,

That is the bug and this PR should fix it. Thanks for reporting.

On Thu, Feb 9, 2017 at 9:40 PM, Martin Holmes <[hidden email]> wrote:
Here's a minimal test file that works in RC1 and fails in the new release:

___________

xquery version "3.1";

declare default element namespace "http://www.w3.org/1999/xhtml";

declare variable $docName := 'ABCH1.htm';
declare variable $docPath := concat('/db/apps/moeml/data/', $docName);

$docPath
___________


The bug appears to be triggered by the declaration of the default
element namespace; if I remove that, the error goes away. But I don't
see anything wrong with the namespace declaration, and it doesn't cause
any problems in RC1.


On 2017-02-09 10:24 AM, Martin Holmes wrote:
> Same problem in another file:
>
> declare variable $docName := request:get-parameter('docName', 'NONE.html');
> declare variable $docPath := concat('/db/apps/moeml/data/', $docName);
> declare variable $docExists := doc-available($docPath);
>
> <exception>
> <path>/db/apps/moeml/doc.xql</path>
> <message>err:XPDY0002 variable '$docName' is not set. [at line 39,
> column 62, source: /db/apps/moeml/doc.xql]</message>
> </exception>
>
> Very odd indeed...
>
> On 2017-02-09 10:05 AM, Martin Holmes wrote:
>> This works fine in RC1 but causes an error in the new release. In
>> search.xql, I have this:
>>
>>
>> [...]
>> declare variable $searchPagePath := '/db/apps/moeml/data/search.htm';
>>
>> declare variable $searchPage     := doc($searchPagePath);
>> [...]
>>
>> and eXist then generates this error:
>>
>> <exception>
>> <path>/db/apps/moeml/search.xql</path>
>>   <message>
>>    err:XPDY0002 variable '$searchPagePath' is not set. [at line 48,
>> column 42, source: /db/apps/moeml/search.xql]
>>   </message>
>> </exception>
>>
>> Am I missing something obvious here?
>>
>> Cheers,
>> Martin
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>>
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open



--
Dmitriy Shabanov

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Unexpected XQuery issue with new 3.0

Martin Holmes
Thanks Dmitry!

I have taken a lesson from this and I'm refactoring to give explicit
namespaces to variables even in my main modules. It's definitely better
practice.

Cheers,
Martin

On 2017-02-10 07:03 AM, Dmitriy Shabanov wrote:

> Hi,
>
> That is the bug and this PR
> <https://github.com/eXist-db/exist/pull/1256> should fix it. Thanks for
> reporting.
>
> On Thu, Feb 9, 2017 at 9:40 PM, Martin Holmes <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Here's a minimal test file that works in RC1 and fails in the new
>     release:
>
>     ___________
>
>     xquery version "3.1";
>
>     declare default element namespace "http://www.w3.org/1999/xhtml";
>
>     declare variable $docName := 'ABCH1.htm';
>     declare variable $docPath := concat('/db/apps/moeml/data/', $docName);
>
>     $docPath
>     ___________
>
>
>     The bug appears to be triggered by the declaration of the default
>     element namespace; if I remove that, the error goes away. But I don't
>     see anything wrong with the namespace declaration, and it doesn't cause
>     any problems in RC1.
>
>
>     On 2017-02-09 10:24 AM, Martin Holmes wrote:
>     > Same problem in another file:
>     >
>     > declare variable $docName := request:get-parameter('docName',
>     'NONE.html');
>     > declare variable $docPath := concat('/db/apps/moeml/data/', $docName);
>     > declare variable $docExists := doc-available($docPath);
>     >
>     > <exception>
>     > <path>/db/apps/moeml/doc.xql</path>
>     > <message>err:XPDY0002 variable '$docName' is not set. [at line 39,
>     > column 62, source: /db/apps/moeml/doc.xql]</message>
>     > </exception>
>     >
>     > Very odd indeed...
>     >
>     > On 2017-02-09 10:05 AM, Martin Holmes wrote:
>     >> This works fine in RC1 but causes an error in the new release. In
>     >> search.xql, I have this:
>     >>
>     >>
>     >> [...]
>     >> declare variable $searchPagePath := '/db/apps/moeml/data/search.htm';
>     >>
>     >> declare variable $searchPage     := doc($searchPagePath);
>     >> [...]
>     >>
>     >> and eXist then generates this error:
>     >>
>     >> <exception>
>     >> <path>/db/apps/moeml/search.xql</path>
>     >>   <message>
>     >>    err:XPDY0002 variable '$searchPagePath' is not set. [at line 48,
>     >> column 42, source: /db/apps/moeml/search.xql]
>     >>   </message>
>     >> </exception>
>     >>
>     >> Am I missing something obvious here?
>     >>
>     >> Cheers,
>     >> Martin
>     >>
>     >>
>     >>
>     ------------------------------------------------------------------------------
>     >> Check out the vibrant tech community on one of the world's most
>     >> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>     >>
>     >
>     >
>     >
>     >
>     ------------------------------------------------------------------------------
>     > Check out the vibrant tech community on one of the world's most
>     > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>     >
>
>
>
>     ------------------------------------------------------------------------------
>     Check out the vibrant tech community on one of the world's most
>     engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>     _______________________________________________
>     Exist-open mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     https://lists.sourceforge.net/lists/listinfo/exist-open
>     <https://lists.sourceforge.net/lists/listinfo/exist-open>
>
>
>
>
> --
> Dmitriy Shabanov
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>
>
>
> _______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open
>



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Unexpected XQuery issue with new 3.0

Martin Holmes
In reply to this post by wshager
Sorry, I should have quoted the spec. I think the relevant section is 4.16:

<https://www.w3.org/TR/2017/PR-xquery-31-20170117/#id-variable-declarations>

where it says:

"Variable names that have no namespace prefix are in no namespace.
Variable declarations that have no namespace prefix may appear only in a
main module."

eers,
Martin

On 2017-02-10 06:50 AM, W.S. Hager wrote:

> When referring to the spec, please point to the relevant section,
> provided you can read it, because I really can't.
>
> Op 10 feb. 2017 15:37 schreef "W.S. Hager" <[hidden email]
> <mailto:[hidden email]>>:
>
>     This says my assumption was incorrect:
>     https://www.safaribooksonline.com/library/view/xquery/0596006349/ch12s03.html
>     <https://www.safaribooksonline.com/library/view/xquery/0596006349/ch12s03.html>
>
>
>     Op 10 feb. 2017 15:32 schreef "W.S. Hager" <[hidden email]
>     <mailto:[hidden email]>>:
>
>         According to the spec everything is in a namespace. Functions
>         are in the fn namespace. Variables are just constants in the
>         same namespace as the functions, so I'm assuming that it follows
>         that those should be in another namespace than fn.
>
>         Op 10 feb. 2017 14:46 schreef "Martin Holmes" <[hidden email]
>         <mailto:[hidden email]>>:
>
>             There are lots of ways to work around it. I'm happy to
>             namespace all my
>             variables, which also works. My question is whether this is
>             a bug or
>             not. I believe it should be OK to have non-prefixed vars in
>             a main
>             XQuery module and a default element namespace at the same
>             time; I don't
>             see why one should affect the other; and this is definitely a
>             backwards-compatibility issue. I'll be happy to be told I'm
>             wrong and
>             that the spec says otherwise, and eXist is only enforcing
>             the spec, but
>             I don't see it.
>
>             Cheers,
>             Martin
>
>             On 2017-02-10 03:51 AM, W.S. Hager wrote:
>             > Perhaps you should define a "default function namespace"
>             instead.
>             >
>             > 2017-02-10 0:51 GMT+01:00 Martin Holmes <[hidden email]
>             <mailto:[hidden email]>
>             > <mailto:[hidden email] <mailto:[hidden email]>>>:
>             >
>             >     If I explicitly namespace the variables by declaring a
>             prefix for the
>             >     default namespace as well as declaring it as default,
>             then prefix all
>             >     the variables, there is no error.
>             >
>             >     My reading of the 3.1 spec suggests that in a library
>             module, all
>             >     variables must be explicitly namespaced; but I don't
>             think that's the
>             >     case for a main module (which the test file below is).
>             Am I wrong about
>             >     that?
>             >
>             >     On 2017-02-09 10:40 AM, Martin Holmes wrote:
>             >     > Here's a minimal test file that works in RC1 and
>             fails in the new
>             >     release:
>             >     >
>             >     > ___________
>             >     >
>             >     > xquery version "3.1";
>             >     >
>             >     > declare default element namespace
>             "http://www.w3.org/1999/xhtml";
>             >     >
>             >     > declare variable $docName := 'ABCH1.htm';
>             >     > declare variable $docPath :=
>             concat('/db/apps/moeml/data/', $docName);
>             >     >
>             >     > $docPath
>             >     > ___________
>             >     >
>             >     >
>             >     > The bug appears to be triggered by the declaration
>             of the default
>             >     > element namespace; if I remove that, the error goes
>             away. But I don't
>             >     > see anything wrong with the namespace declaration,
>             and it doesn't
>             >     cause
>             >     > any problems in RC1.
>             >     >
>             >     >
>             >     > On 2017-02-09 10:24 AM, Martin Holmes wrote:
>             >     >> Same problem in another file:
>             >     >>
>             >     >> declare variable $docName :=
>             request:get-parameter('docName',
>             >     'NONE.html');
>             >     >> declare variable $docPath :=
>             concat('/db/apps/moeml/data/',
>             >     $docName);
>             >     >> declare variable $docExists := doc-available($docPath);
>             >     >>
>             >     >> <exception>
>             >     >> <path>/db/apps/moeml/doc.xql</path>
>             >     >> <message>err:XPDY0002 variable '$docName' is not
>             set. [at line 39,
>             >     >> column 62, source: /db/apps/moeml/doc.xql]</message>
>             >     >> </exception>
>             >     >>
>             >     >> Very odd indeed...
>             >     >>
>             >     >> On 2017-02-09 10:05 AM, Martin Holmes wrote:
>             >     >>> This works fine in RC1 but causes an error in the
>             new release. In
>             >     >>> search.xql, I have this:
>             >     >>>
>             >     >>>
>             >     >>> [...]
>             >     >>> declare variable $searchPagePath :=
>             >     '/db/apps/moeml/data/search.htm';
>             >     >>>
>             >     >>> declare variable $searchPage     :=
>             doc($searchPagePath);
>             >     >>> [...]
>             >     >>>
>             >     >>> and eXist then generates this error:
>             >     >>>
>             >     >>> <exception>
>             >     >>> <path>/db/apps/moeml/search.xql</path>
>             >     >>>   <message>
>             >     >>>    err:XPDY0002 variable '$searchPagePath' is not
>             set. [at line 48,
>             >     >>> column 42, source: /db/apps/moeml/search.xql]
>             >     >>>   </message>
>             >     >>> </exception>
>             >     >>>
>             >     >>> Am I missing something obvious here?
>             >     >>>
>             >     >>> Cheers,
>             >     >>> Martin
>             >     >>>
>             >     >>>
>             >     >>>
>             >
>              ------------------------------------------------------------------------------
>             >     >>> Check out the vibrant tech community on one of the
>             world's most
>             >     >>> engaging tech sites, SlashDot.org!
>             http://sdm.link/slashdot
>             >     >>>
>             >     >>
>             >     >>
>             >     >>
>             >     >>
>             >
>              ------------------------------------------------------------------------------
>             >     >> Check out the vibrant tech community on one of the
>             world's most
>             >     >> engaging tech sites, SlashDot.org!
>             http://sdm.link/slashdot
>             >     >>
>             >     >
>             >     >
>             >     >
>             >     >
>             >
>              ------------------------------------------------------------------------------
>             >     > Check out the vibrant tech community on one of the
>             world's most
>             >     > engaging tech sites, SlashDot.org!
>             http://sdm.link/slashdot
>             >     >
>             >
>             >
>             >
>             >
>              ------------------------------------------------------------------------------
>             >     Check out the vibrant tech community on one of the
>             world's most
>             >     engaging tech sites, SlashDot.org!
>             http://sdm.link/slashdot
>             >     _______________________________________________
>             >     Exist-open mailing list
>             >     [hidden email]
>             <mailto:[hidden email]>
>             >     <mailto:[hidden email]
>             <mailto:[hidden email]>>
>             >
>              https://lists.sourceforge.net/lists/listinfo/exist-open
>             <https://lists.sourceforge.net/lists/listinfo/exist-open>
>             >
>              <https://lists.sourceforge.net/lists/listinfo/exist-open
>             <https://lists.sourceforge.net/lists/listinfo/exist-open>>
>             >
>             >
>             >
>             >
>             > --
>             >
>             > W.S. Hager
>             > Lagua Web Solutions
>             > http://lagua.nl <http://lagua.nl/>
>             >
>             >
>             >
>             >
>             ------------------------------------------------------------------------------
>             > Check out the vibrant tech community on one of the world's
>             most
>             > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>             >
>             >
>             >
>             > _______________________________________________
>             > Exist-open mailing list
>             > [hidden email]
>             <mailto:[hidden email]>
>             > https://lists.sourceforge.net/lists/listinfo/exist-open
>             <https://lists.sourceforge.net/lists/listinfo/exist-open>
>             >
>
>
>
>             ------------------------------------------------------------------------------
>             Check out the vibrant tech community on one of the world's most
>             engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>             _______________________________________________
>             Exist-open mailing list
>             [hidden email]
>             <mailto:[hidden email]>
>             https://lists.sourceforge.net/lists/listinfo/exist-open
>             <https://lists.sourceforge.net/lists/listinfo/exist-open>
>
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>
>
>
> _______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Unexpected XQuery issue with new 3.0

Dannes Wessels-3
In reply to this post by Martin Holmes
Hmmm

What does Saxon report on this?

Regards

Dannes

--
www.exist-db.org

> On 10 Feb 2017, at 14:44, Martin Holmes <[hidden email]> wrote:
>
> My question is whether this is a bug or
> not.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Unexpected XQuery issue with new 3.0

Martin Holmes
Saxon has no problem with it (although I think it balks at XQuery
version 3.1 -- switching to 3.0 it runs with no issue).

On 2017-02-10 11:38 AM, Dannes Wessels wrote:

> Hmmm
>
> What does Saxon report on this?
>
> Regards
>
> Dannes
>
> --
> www.exist-db.org
>
>> On 10 Feb 2017, at 14:44, Martin Holmes <[hidden email]> wrote:
>>
>> My question is whether this is a bug or
>> not.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Unexpected XQuery issue with new 3.0

Dannes Wessels-3
Ok thnx!

A PR is made, a test is yet missing.

We'll integrate it asap.

Regards

Dannes

--
www.exist-db.org

> On 10 Feb 2017, at 21:12, Martin Holmes <[hidden email]> wrote:
>
> Saxon has no problem with it (although I think it balks at XQuery
> version 3.1 -- switching to 3.0 it runs with no issue).

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Unexpected XQuery issue with new 3.0

Martin Holmes
In reply to this post by Martin Holmes
Just confirming that this bug seems to be fixed in a fresh build of the
develop branch following this merge:

<https://github.com/eXist-db/exist/commit/114959cfb08c767353851e56ddbc1fe3ed50c2a4>

Thanks to Dmitriy and Adam!

Cheers,
Martin

On 2017-02-09 10:05 AM, Martin Holmes wrote:

> This works fine in RC1 but causes an error in the new release. In
> search.xql, I have this:
>
>
> [...]
> declare variable $searchPagePath := '/db/apps/moeml/data/search.htm';
>
> declare variable $searchPage     := doc($searchPagePath);
> [...]
>
> and eXist then generates this error:
>
> <exception>
> <path>/db/apps/moeml/search.xql</path>
>   <message>
>    err:XPDY0002 variable '$searchPagePath' is not set. [at line 48,
> column 42, source: /db/apps/moeml/search.xql]
>   </message>
> </exception>
>
> Am I missing something obvious here?
>
> Cheers,
> Martin
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Unexpected XQuery issue with new 3.0

Dannes Wessels-3
We plan to release 3.1 with this fix (among others) within 2 weeks....

On Wed, Feb 22, 2017 at 12:46 AM, Martin Holmes <[hidden email]> wrote:
Just confirming that this bug seems to be fixed in a fresh build of the
develop branch following this merge:

<https://github.com/eXist-db/exist/commit/114959cfb08c767353851e56ddbc1fe3ed50c2a4>

Thanks to Dmitriy and Adam!

Cheers,
Martin

On 2017-02-09 10:05 AM, Martin Holmes wrote:
> This works fine in RC1 but causes an error in the new release. In
> search.xql, I have this:
>
>
> [...]
> declare variable $searchPagePath := '/db/apps/moeml/data/search.htm';
>
> declare variable $searchPage     := doc($searchPagePath);
> [...]
>
> and eXist then generates this error:
>
> <exception>
> <path>/db/apps/moeml/search.xql</path>
>   <message>
>    err:XPDY0002 variable '$searchPagePath' is not set. [at line 48,
> column 42, source: /db/apps/moeml/search.xql]
>   </message>
> </exception>
>
> Am I missing something obvious here?
>
> Cheers,
> Martin
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open



--
eXist-db Native XML Database - http://exist-db.org
Join us on linked-in: http://www.linkedin.com/groups?gid=35624

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open