[Zorba-coders] [Merge] lp:~zorba-coders/zorba/jsound-validator into lp:zorba

2013-10-03 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/jsound-validator into lp:zorba has 
been updated.

Status: Approved => Work in progress

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/jsound-validator/+merge/186908
-- 
https://code.launchpad.net/~zorba-coders/zorba/jsound-validator/+merge/186908
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/jsound-validator into lp:zorba

2013-10-03 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/jsound-validator into lp:zorba has 
been updated.

Status: Approved => Work in progress

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/jsound-validator/+merge/186908
-- 
https://code.launchpad.net/~zorba-coders/zorba/jsound-validator/+merge/186908
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/jsound-validator into lp:zorba

2013-10-03 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/jsound-validator into lp:zorba has 
been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/jsound-validator/+merge/186908
-- 
https://code.launchpad.net/~zorba-coders/zorba/jsound-validator/+merge/186908
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/jsound-validator into lp:zorba

2013-10-03 Thread Ghislain Fourny
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/jsound-validator/+merge/186908
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/array-unboxing into lp:zorba

2013-09-20 Thread Ghislain Fourny
This looks obsolete, as this is now in the Zorba trunk.
-- 
https://code.launchpad.net/~zorba-coders/zorba/array-unboxing/+merge/168099
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/array-unboxing into lp:zorba

2013-09-20 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/array-unboxing into lp:zorba has 
been updated.

Status: Needs review => Rejected

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/array-unboxing/+merge/168099
-- 
https://code.launchpad.net/~zorba-coders/zorba/array-unboxing/+merge/168099
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq-update into lp:zorba

2013-09-13 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/new-jsoniq-update into lp:zorba 
has been updated.

Commit Message changed to:

Introducing new update syntax in the JSONiq parser.
- Made json keyword mandatory to avoid conflicts.
- Turned "replace json value of" into "replace value of json" to make 
consistent with XML updates, for BOTH parsers.
- New target syntax: delete $obj.foo, delete $arr[[1]], etc.

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq-update/+merge/185295
-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq-update/+merge/185295
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq-update into lp:zorba

2013-09-13 Thread Ghislain Fourny
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq-update/+merge/185295
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq-update into lp:zorba

2013-09-13 Thread Ghislain Fourny
After looking more in depth, I realized that there is an inconsistency across 
parsenodes. Some of them have const exprnode* pointers on their children (like 
JSONObjectLookup had), some others regular exprnode* pointers (like 
JSONObjectLookup has now). The latter seem to correspond to places that the 
parser edits (which is the case also here). So, I think that this change to 
JSONObjectLookup does not break the current design of parse node classes but 
stays within common practice.

Rather than just fix this class, I think that a discussion for a general fix in 
the entire parse node API makes more sense.

Actions taken:
- I am leaving the API of the class as it is.
- I cleaned up the API by replacing set_ functions with release_ functions.

HTH

-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq-update/+merge/185295
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq-update into lp:zorba

2013-09-13 Thread Ghislain Fourny
Hi Matthias,

I am not sure I understand what you are suggesting.

The reason for non-const is that temporary parse nodes (in that case a lookup 
expression node) use regular pointers that they own to child parse nodes, i.e., 
the destructor deletes the object pointed to at the end. However, these child 
parse nodes are still used by the final parsenodes (the updating expression 
nodes).

So one has to release these pointers (set them to NULL) to avoid that 
destruction.

With a unique pointer to temporary parsenodes released after the creation of 
the final parsenode, there would still be the problem that the temporary 
parsenodes would delete parsenodes that are actually used by the final 
parsenodes.

However, I will now attempt to simplify the external API to address this, and 
provide release functions instead.

Does it make sense?



Does it make sense?

-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq-update/+merge/185295
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq into lp:zorba

2013-09-12 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/new-jsoniq into lp:zorba has been 
updated.

Commit Message changed to:

Regenerating pregenerated parser and scanner files (last bug fix was not 
reflected).

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/183640
-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/183640
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq into lp:zorba

2013-09-12 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/new-jsoniq into lp:zorba has been 
updated.

Status: Merged => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/183640
-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/183640
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq into lp:zorba

2013-09-11 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/new-jsoniq into lp:zorba has been 
updated.

Commit Message changed to:

Copying pregenerated parser and scanner files over.

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/183640
-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/183640
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq into lp:zorba

2013-09-11 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/new-jsoniq into lp:zorba has been 
updated.

Commit Message changed to:

A fix for a bug discovered with the 28msec merge.

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/183640
-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/183640
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq into lp:zorba

2013-09-11 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/new-jsoniq into lp:zorba has been 
updated.

Status: Merged => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/183640
-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/183640
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq into lp:zorba

2013-09-11 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/new-jsoniq into lp:zorba has been 
updated.

Status: Approved => Merged

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/183640
-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/183640
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq into lp:zorba

2013-09-11 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/new-jsoniq into lp:zorba has been 
updated.

Status: Merged => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/183640
-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/183640
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq into lp:zorba

2013-09-11 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/new-jsoniq into lp:zorba has been 
updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/183640
-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/183640
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq into lp:zorba

2013-09-11 Thread Ghislain Fourny
Review: Approve

LGTM
-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/183640
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-update-syntax into lp:zorba

2013-09-06 Thread Ghislain Fourny
This is still work in progress, but you can already begin to take a look :-)

-- 
https://code.launchpad.net/~zorba-coders/zorba/new-update-syntax/+merge/184308
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq into lp:zorba

2013-09-06 Thread Ghislain Fourny
Thanks Nicolae!

The following does not seem to work:

jsoniq version "1.0";

variable $a := [];

insert (1, 2) into $a at position 1;

$a

It might be because insert(1, 2) is parsed as a function call. Would it be 
possible to resolve the conflict using the lookahead (whether "into" is here or 
not)?
-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/183640
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-update-syntax into lp:zorba

2013-09-06 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/new-update-syntax into lp:zorba 
has been updated.

Status: Needs review => Work in progress

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/new-update-syntax/+merge/184308
-- 
https://code.launchpad.net/~zorba-coders/zorba/new-update-syntax/+merge/184308
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/html-module-bug-1189804 into lp:zorba/html-module

2013-09-03 Thread Ghislain Fourny
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/html-module-bug-1189804/+merge/182529
Your team Zorba Coders is subscribed to branch lp:zorba/html-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq into lp:zorba

2013-09-03 Thread Ghislain Fourny
Review: Needs Fixing

Hi Nicolae,

Looks good, thanks ;-) It's getting closer and closer to the git EBNFs!

Here are some comments:

1. Parser.y, line 2259: is "|| (block != NULL && block->isEmpty())" really 
needed? Will block not always be null if a BlockExpr is {} (see 
StatementsAndOptionalExpr nonterminal)?

2. Why is the OBJECT token treated specially and not mentioned in 
GeneralizedAtomicType like array/item/structured-item? Note that jn:object is 
no longer a function, as it was removed (I thought Markos removed it from 
Zorba, too). Then object should also be moved back to invalid function names.

Suggested test: object() throws a parsing error.

3. VersionDecl should not allow xquery in the JSONiq parser. Now, it seems to 
be allowed. A JSONiq query version declaration must be "jsoniq" (if a file 
begins with "xquery" the XQuery parser will be used anyway, so there is no way 
to test).

4. Why is append not authorized as a function? I thought it would be together 
with insert/rename/replace/delete.

Suggested test: local definition for local:append + default function namespace 
and query append().

5. "From" instead of "For" is implemented, but where is "select" instead of 
"return"? (this might require discussion about getting rid of "from", actually. 
I am not sure if the from/select decision was not reverted at some point.)

Suggested test: from $i in 1 to 10 select $i

6. Can you give me details and examples about the two new conflicts?

7. How is [[]] array handled? Is it parsed as a predicate with an array 
constructor and handled in the translator?

8. TRUE/FALSE/NULL/FROM(/SELECT?) should appear in the FUNCTION_NAME rule in a 
JSONIQ_PARSER #ifdef so that they can be used as function names. Or is this 
handled somewhere else?

Suggested test: false(), true(), null() -- from() with a local definition (see 
append above).

I hope it makes sense? Thanks!
-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/183640
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1189804 into lp:zorba

2013-09-02 Thread Ghislain Fourny
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1189804/+merge/181973
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/disable_assert-invariant into lp:zorba

2013-08-30 Thread Ghislain Fourny
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/disable_assert-invariant/+merge/182971
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1189804 into lp:zorba

2013-08-28 Thread Ghislain Fourny
Review: Needs Fixing

Looks good! Here are some comments:

- Did you check that the invalid option type error does not exist already? Will 
it be consistent also in all other modules?
- Should JSONiq modules not be suffixed as .jq (but it's only cosmetics of 
course).
- empty-sequence() -> ()
- array() -> array
- Why remove variadic="true"? I forgot what the semantics for this attribute 
are.
- In the implementation of map:key: why not reserve the vector size at the 
beginning (unless you cannot get the size of an ItemVector in constant time?).

-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1189804/+merge/181973
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1026250 into lp:zorba

2013-08-14 Thread Ghislain Fourny
One of the tests uses ext:nomaterialization without dash. Is this intented?
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1026250/+merge/138044
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/jdbc-mariadb-driver into lp:zorba/jdbc-module

2013-08-06 Thread Ghislain Fourny
Review: Approve

It works like a charm!
-- 
https://code.launchpad.net/~zorba-coders/zorba/jdbc-mariadb-driver/+merge/177036
Your team Zorba Coders is subscribed to branch lp:zorba/jdbc-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/skiplimit into lp:zorba

2013-07-15 Thread Ghislain Fourny
My remark would correspond to your first choice: offset/limit is just a 
syntactic sugar, and count$i-where$i is optimized separately.

-- 
https://code.launchpad.net/~zorba-coders/zorba/skiplimit/+merge/173126
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/skiplimit into lp:zorba

2013-07-15 Thread Ghislain Fourny
Hi William,

I think that count$i-where$i aka offset/limit can be optimized, but in most 
cases not in terms of subsequence: it sets an offset or a limit on the number 
of tuples, not on the number of items (a tuple may well produce zero, or more 
than one item in the end). I think that an early exit, or skipping, in FLWOR 
iterators should be possible when encountering a count$i-where$i. Markos is 
probably more familiar with this code than I am though.

Does it make sense?

-- 
https://code.launchpad.net/~zorba-coders/zorba/skiplimit/+merge/173126
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/skiplimit into lp:zorba

2013-07-12 Thread Ghislain Fourny
Review: Needs Fixing


-- 
https://code.launchpad.net/~zorba-coders/zorba/skiplimit/+merge/173126
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/skiplimit into lp:zorba

2013-07-12 Thread Ghislain Fourny
I have the feeling that this could and should be made more general, i.e., 
introduce "limit" ExprSingle and "offset" ExprSingle as regular FLWOR clauses, 
like any other clauses, that you can put everywhere (as intermediate clauses), 
and that are syntactic sugars for "count $i where $i le ExprSingle" and "count 
$i where $i gt ExprSingle" respectively.
That way, there would no longer be any need to go through syntactic options as 
above as they behave like any other clause.

Concretely, I think that it comes down to something as simple as:

IntermediateClause ::= InitialClause | WhereClause | GroupByClause | 
OrderByClause | CountClause | OffsetClause | LimitClause

OffsetClause ::= "offset" ExprSingle

LimitClause ::= "limit" ExprSingle

-- 
https://code.launchpad.net/~zorba-coders/zorba/skiplimit/+merge/173126
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/process-2 into lp:zorba/process-module

2013-07-10 Thread Ghislain Fourny
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/process-2/+merge/171824
Your team Zorba Coders is subscribed to branch lp:zorba/process-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/fix_ace into lp:zorba

2013-06-21 Thread Ghislain Fourny
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/fix_ace/+merge/170855
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~paul-lucas/zorba/pjl-misc into lp:zorba

2013-06-14 Thread Ghislain Fourny
The proposal to merge lp:~paul-lucas/zorba/pjl-misc into lp:zorba has been 
updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/169270
-- 
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/169270
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~paul-lucas/zorba/pjl-misc into lp:zorba

2013-06-14 Thread Ghislain Fourny
Review: Approve

It works, thanks!
-- 
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/169270
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~paul-lucas/zorba/pjl-misc into lp:zorba

2013-06-13 Thread Ghislain Fourny
The proposal to merge lp:~paul-lucas/zorba/pjl-misc into lp:zorba has been 
updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/169221
-- 
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/169221
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~paul-lucas/zorba/pjl-misc into lp:zorba

2013-06-13 Thread Ghislain Fourny
Review: Approve

Perfect, thanks Paul!

-- 
https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/169221
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq into lp:zorba

2013-05-15 Thread Ghislain Fourny
The parser must be regenerated I think.
-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/162375
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq into lp:zorba

2013-05-15 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/new-jsoniq into lp:zorba has been 
updated.

Status: Rejected => Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/162375
-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/162375
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq into lp:zorba

2013-05-15 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/new-jsoniq into lp:zorba has been 
updated.

Status: Approved => Rejected

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/162375
-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/162375
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq into lp:zorba

2013-05-15 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/new-jsoniq into lp:zorba has been 
updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/162375
-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/162375
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/null-type-fix into lp:~zorba-coders/zorba/new-jsoniq

2013-05-15 Thread Ghislain Fourny
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/null-type-fix/+merge/163902
Your team Zorba Coders is subscribed to branch 
lp:~zorba-coders/zorba/new-jsoniq.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq into lp:zorba

2013-05-15 Thread Ghislain Fourny
Pending approval and merge of null-type-fix before sending to the trunk.

-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/162375
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/null-type-fix into lp:~zorba-coders/zorba/new-jsoniq

2013-05-15 Thread Ghislain Fourny
Ghislain Fourny has proposed merging lp:~zorba-coders/zorba/null-type-fix into 
lp:~zorba-coders/zorba/new-jsoniq.

Commit message:
Fixing null type parsing.

Requested reviews:
  Chris Hillery (ceejatec)
  Nicolae Brinza (nbrinza)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/null-type-fix/+merge/163902

Fixing null type parsing.
-- 
https://code.launchpad.net/~zorba-coders/zorba/null-type-fix/+merge/163902
Your team Zorba Coders is subscribed to branch 
lp:~zorba-coders/zorba/new-jsoniq.
=== modified file 'src/compiler/parser/parser.y'
--- src/compiler/parser/parser.y	2013-05-13 15:02:42 +
+++ src/compiler/parser/parser.y	2013-05-15 12:38:15 +
@@ -5451,6 +5451,12 @@
 {
   $$ = new GeneralizedAtomicType( LOC(@$), static_cast($1) );
 }
+#ifdef JSONIQ_PARSER
+|   NULL_TOKEN
+{
+  $$ = new GeneralizedAtomicType( LOC(@$), new QName(LOC(@$), "null") );
+}
+#endif
 ;
 
 

=== modified file 'src/context/root_static_context.cpp'
--- src/context/root_static_context.cpp	2013-04-08 19:44:58 +
+++ src/context/root_static_context.cpp	2013-05-15 12:38:15 +
@@ -140,6 +140,7 @@
 "fn", static_context::W3C_FN_NS,
 #ifdef ZORBA_WITH_JSON
 "jn", static_context::JSONIQ_FN_NS,
+"js", static_context::JSONIQ_DM_NS,
 #endif
 "local", XQUERY_LOCAL_FN_NS,
 "xml", XML_NS,

=== added file 'test/rbkt/ExpQueryResults/zorba/jsoniq/js_null_type.xml.res'
--- test/rbkt/ExpQueryResults/zorba/jsoniq/js_null_type.xml.res	1970-01-01 00:00:00 +
+++ test/rbkt/ExpQueryResults/zorba/jsoniq/js_null_type.xml.res	2013-05-15 12:38:15 +
@@ -0,0 +1,1 @@
+true

=== added file 'test/rbkt/ExpQueryResults/zorba/jsoniq/null_type.xml.res'
--- test/rbkt/ExpQueryResults/zorba/jsoniq/null_type.xml.res	1970-01-01 00:00:00 +
+++ test/rbkt/ExpQueryResults/zorba/jsoniq/null_type.xml.res	2013-05-15 12:38:15 +
@@ -0,0 +1,1 @@
+true

=== added file 'test/rbkt/Queries/zorba/jsoniq/js_null_type.xq'
--- test/rbkt/Queries/zorba/jsoniq/js_null_type.xq	1970-01-01 00:00:00 +
+++ test/rbkt/Queries/zorba/jsoniq/js_null_type.xq	2013-05-15 12:38:15 +
@@ -0,0 +1,1 @@
+jn:null() instance of js:null

=== added file 'test/rbkt/Queries/zorba/jsoniq/null_type.xq'
--- test/rbkt/Queries/zorba/jsoniq/null_type.xq	1970-01-01 00:00:00 +
+++ test/rbkt/Queries/zorba/jsoniq/null_type.xq	2013-05-15 12:38:15 +
@@ -0,0 +1,2 @@
+jsoniq version "1.0";
+null instance of null

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/null-type-fix into lp:zorba

2013-05-15 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/null-type-fix into lp:zorba has 
been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/null-type-fix/+merge/163883
-- 
https://code.launchpad.net/~zorba-coders/zorba/null-type-fix/+merge/163883
Your team Zorba Coders is subscribed to branch 
lp:~zorba-coders/zorba/new-jsoniq.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq into lp:zorba

2013-05-15 Thread Ghislain Fourny
Thanks Nicolae, this is perfect now.
-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/162375
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/null-type-fix into lp:zorba

2013-05-15 Thread Ghislain Fourny
Ghislain Fourny has proposed merging lp:~zorba-coders/zorba/null-type-fix into 
lp:zorba with lp:~zorba-coders/zorba/new-jsoniq as a prerequisite.

Commit message:
Fixing null type syntax.

Requested reviews:
  Chris Hillery (ceejatec)
  Nicolae Brinza (nbrinza)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/null-type-fix/+merge/163883

Fixing null type syntax.
-- 
https://code.launchpad.net/~zorba-coders/zorba/null-type-fix/+merge/163883
Your team Zorba Coders is subscribed to branch 
lp:~zorba-coders/zorba/new-jsoniq.
=== modified file 'src/compiler/parser/parser.y'
--- src/compiler/parser/parser.y	2013-05-15 10:04:30 +
+++ src/compiler/parser/parser.y	2013-05-15 10:04:31 +
@@ -5451,6 +5451,12 @@
 {
   $$ = new GeneralizedAtomicType( LOC(@$), static_cast($1) );
 }
+#ifdef JSONIQ_PARSER
+|   NULL_TOKEN
+{
+  $$ = new GeneralizedAtomicType( LOC(@$), new QName(LOC(@$), "null") );
+}
+#endif
 ;
 
 

=== modified file 'src/context/root_static_context.cpp'
--- src/context/root_static_context.cpp	2013-04-08 19:44:58 +
+++ src/context/root_static_context.cpp	2013-05-15 10:04:31 +
@@ -140,6 +140,7 @@
 "fn", static_context::W3C_FN_NS,
 #ifdef ZORBA_WITH_JSON
 "jn", static_context::JSONIQ_FN_NS,
+"js", static_context::JSONIQ_DM_NS,
 #endif
 "local", XQUERY_LOCAL_FN_NS,
 "xml", XML_NS,

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq into lp:zorba

2013-05-15 Thread Ghislain Fourny
Your comment makes a lot of sense too, thanks!

-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/162375
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq into lp:zorba

2013-05-15 Thread Ghislain Fourny
Review: Approve

Approving because the last open issue is not release-critical.
-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/162375
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq into lp:zorba

2013-05-15 Thread Ghislain Fourny
Review: Needs Fixing

I can not see any warning if a version declaration is present. Was it fixed? Am 
I doing something wrong?

jsoniq version "1.0";
declare namespace op = "http://www.zorba-xquery.com/options/features";;
declare option op:enable "common-language";
{ "foo" : "bar" }

-> no warning for me.

-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/162375
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq into lp:zorba

2013-05-15 Thread Ghislain Fourny
> > > Why would you need a qualified value if the option itself is already
> > qualified?
> >
> > I guess because the option name and the option value may not live in the
> same
> > namespace.
> 
> Why not? It's not as if you do schema validation on the options and their
> values. The option needs to be qualified to distinguish it from XQuery
> options, but the value needs not. And the validation is done entirely in the
> code so there is no schema validation.

Technically, it is up to us - does the op:enable option accept QName or string 
values? If it is strings, I agree. If it is QNames, the namespace is important 
I think.

-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/162375
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq into lp:zorba

2013-05-13 Thread Ghislain Fourny
Review: Needs Fixing

Thanks for fixing the warnings. I successfully checked, except for two things:

1.

"\" (XQuery parser) or "&" (JSONiq parser) leads to a warning about disallowed 
character entity references/JSON character escape sequence. I think the warning 
could be made more general and say that XML character and entity references, 
JSON backslash escapes, as well as standalone ampersands and backslashes are 
not allowed.

(by the way, character entity references do not exist in XML. There are 
character references (&#...;) and entity references (&...;), but not both at 
the same time if I am correct :-) )

2.

/(foo)

(in the XQuery parser) does not seem to be caught with a warning.
-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/162375
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq into lp:zorba

2013-05-13 Thread Ghislain Fourny
> Why would you need a qualified value if the option itself is already 
> qualified?

I guess because the option name and the option value may not live in the same 
namespace.
-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/162375
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/new-jsoniq into lp:zorba

2013-05-10 Thread Ghislain Fourny
Review: Needs Fixing

It looks good on the whole. For convenience, I am pasting the list of the 
findings I sent to the zorba-dev mailing list, as of revision 11342 of this 
branch, here:

- The dot context item should be a syntax error in the JSONiq parser, but { 
"foo" : "bar" } ! . seems to parse fine.
- No error is thrown when beginning a path expression with an axis step in the 
JSONiq parser, e.g. /(foo) (mind the parentheses, i.e., foo does 
begin a path expression) should not parse with JSONiq.


- Use of \ or & in literals in the common language (both parsers) does not seem 
to raise warnings. 
- Use of {} in the common language (both parsers) does not seem to raise 
warnings.
- Use of true/false/null literals in the common language (JSONiq parser) does 
not seem to raise warnings.
- Use of () for the empty sequence type syntax in the common language (JSONiq 
parser) does not seem to raise warnings.
- Use of simplified update syntax (no "json") in the common language (JSONiq 
parser) does not seem to raise warnings.
- Use of single-quoted literals in the common language (XQuery parser) does not 
seem to raise warnings.
- Use of unquoted object keys in the common language (JSONiq parser) does not 
seem to raise warnings.
- Use of a path expression beginning with an axis step in the common language 
(XQuery parser) seems to raise the wrong warning (is : context item expression, 
should be : path expression may not begin with an axis step).
-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/162375
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1123165 into lp:zorba

2013-04-23 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/bug-1123165 into lp:zorba has been 
updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1123165/+merge/159822
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1123165/+merge/159822
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1123165 into lp:zorba

2013-04-23 Thread Ghislain Fourny
This is one of the cases that we will have to live with. It's a conflict between
JSONiq and HOF. We were trying to push the W3C to make the dynamic function 
invocation
a map (i.e. $f could be () or a sequence of function items). However, the w3c 
didn't
want to go this way.

-> In this case, $f is not the empty object - it is just a virtual single item 
(as is always the case for a for variable, without "allowing empty") that it 
will never get bound to.

We do not have to consider $f an object lookup in this case, right? I have the 
more general feeling that there might be something wrong in type inference 
regarding for loops on empty sequences.

-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1123165/+merge/159822
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1123165 into lp:zorba

2013-04-23 Thread Ghislain Fourny
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1123165/+merge/159822
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1123165 into lp:zorba

2013-04-23 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/bug-1123165 into lp:zorba has been 
updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1123165/+merge/159822
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1123165/+merge/159822
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1123165 into lp:zorba

2013-04-23 Thread Ghislain Fourny
Review: Disapprove

Disapproving to allow running tests without merging.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1123165/+merge/159822
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1123165 into lp:zorba

2013-04-23 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/bug-1123165 into lp:zorba has been 
updated.

Status: Approved => Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1123165/+merge/159822
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1123165/+merge/159822
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1123165 into lp:zorba

2013-04-23 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/bug-1123165 into lp:zorba has been 
updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1123165/+merge/159822
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1123165/+merge/159822
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1123165 into lp:zorba

2013-04-23 Thread Ghislain Fourny
EXPECTED_FOTS_FAILURE (prod-RequireProhibitFeature 
require-all-optional-features-5-s 0)

-> I removed it because the test suite got updated in the trunk.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1123165/+merge/159822
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1123165 into lp:zorba

2013-04-23 Thread Ghislain Fourny
I opened the bug for the first two expected failures here: bug 1171860.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1123165/+merge/159822
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1123165 into lp:zorba

2013-04-23 Thread Ghislain Fourny
I think I addressed all comments.

There are three expected failures left:

EXPECTED_FOTS_FAILURE (prod-RequireProhibitFeature 
require-higher-order-function-5-s 0)
EXPECTED_FOTS_FAILURE (prod-RequireProhibitFeature 
require-higher-order-function-10-s 0)

-> This is the for $f in () return $f(1, ?) issue, which needs to be solved 
separately.

EXPECTED_FOTS_FAILURE (prod-RequireProhibitFeature 
require-all-optional-features-5-s 0)

-> This is because the new package with the W3C-FOTS fix is not there yet.


-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1123165/+merge/159822
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1123165 into lp:zorba

2013-04-23 Thread Ghislain Fourny
- The style of the error messages is not consistent with the other error 
messages. They should be changed as follows:
  XQST0120 "$1": feature not supported
  XQST0128 "$1": unable to disable a supported feature
  XQST0126 impossible to activate all extension features

DONE
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1123165/+merge/159822
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1123165 into lp:zorba

2013-04-23 Thread Ghislain Fourny
- It feels like most of the implementation should go into the translator and 
not into the static context.

DONE
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1123165/+merge/159822
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1123165 into lp:zorba

2013-04-23 Thread Ghislain Fourny
- The function check_xquery_feature_options is too long. Could this be 
simplified and/or split into multiple functions?

DONE
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1123165/+merge/159822
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bump_FOTS_snapshot_Apr_23 into lp:zorba

2013-04-23 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/bump_FOTS_snapshot_Apr_23 into 
lp:zorba has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bump_FOTS_snapshot_Apr_23/+merge/160232
-- 
https://code.launchpad.net/~zorba-coders/zorba/bump_FOTS_snapshot_Apr_23/+merge/160232
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bump_FOTS_snapshot_Apr_23 into lp:zorba

2013-04-23 Thread Ghislain Fourny
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/bump_FOTS_snapshot_Apr_23/+merge/160232
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1123165 into lp:zorba

2013-04-22 Thread Ghislain Fourny
- The fix for dynamic_function_invocation seems to be orthogonal. Why is this 
fixed in this merge proposal? I couldn't find a test to cover this behavior.

It does fix some of the W3C tests:

  for $f in () return $f(1, ?)

Raised an error in zorba because it was considered an object lookup. But it 
looks like valid XQuery to me?
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1123165/+merge/159822
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-compare_null into lp:zorba

2013-04-22 Thread Ghislain Fourny
Review: Approve

Perfect!

I wondered why the .res was not modified for a wee bit of a second :-)


-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-compare_null/+merge/159871
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-compare_null into lp:zorba

2013-04-22 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/feature-compare_null into lp:zorba 
has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/feature-compare_null/+merge/159871
-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-compare_null/+merge/159871
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1123165 into lp:zorba

2013-04-19 Thread Ghislain Fourny
Ghislain Fourny has proposed merging lp:~zorba-coders/zorba/bug-1123165 into 
lp:zorba.

Requested reviews:
  Matthias Brantner (matthias-brantner)
Related bugs:
  Bug #1123165 in Zorba: "failures in require-feature and prohibit-feature (at 
least 27)"
  https://bugs.launchpad.net/zorba/+bug/1123165

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1123165/+merge/159822

Fixing bug 1123165 (prohibit/require feature tests).
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1123165/+merge/159822
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'include/zorba/pregenerated/diagnostic_list.h'
--- include/zorba/pregenerated/diagnostic_list.h	2013-04-04 04:14:46 +
+++ include/zorba/pregenerated/diagnostic_list.h	2013-04-19 13:05:34 +
@@ -162,8 +162,14 @@
 
 extern ZORBA_DLL_PUBLIC XQueryErrorCode XQST0114;
 
+extern ZORBA_DLL_PUBLIC XQueryErrorCode XQST0120;
+
 extern ZORBA_DLL_PUBLIC XQueryErrorCode XQST0123;
 
+extern ZORBA_DLL_PUBLIC XQueryErrorCode XQST0126;
+
+extern ZORBA_DLL_PUBLIC XQueryErrorCode XQST0128;
+
 extern ZORBA_DLL_PUBLIC XQueryErrorCode XPDY0002;
 
 extern ZORBA_DLL_PUBLIC XQueryErrorCode XPDY0050;

=== modified file 'modules/w3c/pregenerated/xqt-errors.xq'
--- modules/w3c/pregenerated/xqt-errors.xq	2013-04-04 04:14:46 +
+++ modules/w3c/pregenerated/xqt-errors.xq	2013-04-19 13:05:34 +
@@ -692,6 +692,15 @@
 
 (:~
  :
+ : It is a static error if a feature required by require-feature is not
+ : supported by the implementation.
+ : 
+ : @see http://www.w3.org/2005/xqt-errors
+:)
+declare variable $err:XQST0120 as xs:QName := fn:QName($err:NS, "err:XQST0120");
+
+(:~
+ :
  : It is a static error if the name of a feature in require-feature is not
  : recognized by the implementation.
  : 
@@ -701,6 +710,24 @@
 
 (:~
  :
+ : It is a static error if all-extensions appears in a require-feature option declaration.
+ : 
+ : @see http://www.w3.org/2005/xqt-errors
+:)
+declare variable $err:XQST0126 as xs:QName := fn:QName($err:NS, "err:XQST0126");
+
+(:~
+ :
+ : It is a static error if a feature name that an implementation supports appears
+ : in a prohibit-feature option declaration, and the implementation is unable to
+ : disable the feature.
+ : 
+ : @see http://www.w3.org/2005/xqt-errors
+:)
+declare variable $err:XQST0128 as xs:QName := fn:QName($err:NS, "err:XQST0128");
+
+(:~
+ :
  : It is a dynamic error if evaluation of an expression relies on some part
  : of the dynamic context that has not been assigned a value.
  : 

=== modified file 'src/compiler/parser/scanner.l'
--- src/compiler/parser/scanner.l	2013-04-17 22:41:05 +
+++ src/compiler/parser/scanner.l	2013-04-19 13:05:34 +
@@ -147,8 +147,8 @@
|
|  String literal definitions
|__*/
-NonQuotAnd  [^""&]
-NonAposAnd  [^''&]
+NonQuotAnd  [^\"&]
+NonAposAnd  [^\'&]
 #ifdef XQUERY_SCANNER
 StringLiteral   ({Quote}({EscapeQuot}|{Ref}|{NonQuotAnd})*{Quote})|({Apos}({EscapeApos}|{Ref}|{NonAposAnd})*{Apos})
 #else

=== modified file 'src/compiler/translator/translator.cpp'
--- src/compiler/translator/translator.cpp	2013-04-18 08:47:43 +
+++ src/compiler/translator/translator.cpp	2013-04-19 13:05:34 +
@@ -3856,6 +3856,8 @@
 bind_fn(f, numParams, loc);
   }
 
+  theSctx->check_xquery_feature_options(loc);
+
   return no_state;
 }
 
@@ -11718,7 +11720,21 @@
   TypeManager* tm = sourceExpr->get_type_manager();
   xqtref_t srcType = sourceExpr->get_return_type();
 
-  if (TypeOps::is_subtype(tm, *srcType, *theRTM.JSON_ITEM_TYPE_STAR))
+  if (TypeOps::is_subtype(tm, *srcType, *theRTM.EMPTY_TYPE) &&
+  numArgs > 1)
+  {
+// If the source expression is the empty sequence and there is more than
+// one parameter, we should still consider it a dynamic invocation.
+fc->set_allowing_empty(true);
+
+expr* dynFuncInvocation =
+CREATE(dynamic_function_invocation)(theRootSctx, theUDF, loc,
+flworVarExpr,
+arguments);
+
+flworExpr->set_return_expr(dynFuncInvocation);
+  }
+  else if (TypeOps::is_subtype(tm, *srcType, *theRTM.JSON_ITEM_TYPE_STAR))
   {
 if (numArgs > 1)
 {

=== modified file 'src/context/static_context.cpp'
--- src/context/static_context.cpp	2013-04-16 07:43:15 +
+++ src/context/static_context.cpp	2013-04-19 13:05:34 +
@@ -3505,6 +3505,217 @@
 // //
 /
 
+/***//**
+
+***

Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-objnav_contextitem into lp:zorba

2013-04-12 Thread Ghislain Fourny
It looks good!

- Could we add a test that checks that $object.$$ parses?
- Why was type promotion changed to a treat-as in FO normalization? Is it for 
performance? The only promotion I can think to happen is a URI being promoted 
to a string in an object lookup. We have not discussed this yet I think, but it 
could make sense?

-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-objnav_contextitem/+merge/158448
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1111487 into lp:zorba

2013-04-08 Thread Ghislain Fourny
I updated the ChangeLog.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-487/+merge/145868
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-compare_null into lp:zorba

2013-04-05 Thread Ghislain Fourny
Review: Approve

Hi Matthias,

It looks good!

Are you aware that in orderby01.jq, () is converted to a null in the object 
constructor, so that it is not actually testing how () compares to null with a 
sort?

Perhaps you can add tests that check that "() eq null" and "null eq ()" return 
()?

(It should be the case, I checked on the command line).

-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-compare_null/+merge/157008
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/xml-in-json-indices into lp:zorba

2013-02-21 Thread Ghislain Fourny
Hi Paul,

I formerly assessed the risk of reaching the limits of the int/long range for a 
position as highly unlikely, but I do have doubts about whether a negative 
number might go through. So I changed assert(false) to a proper processor 
exception. I also changed to const&.
-- 
https://code.launchpad.net/~zorba-coders/zorba/xml-in-json-indices/+merge/122548
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/xml-in-json-indices into lp:zorba

2013-02-21 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/xml-in-json-indices into lp:zorba 
has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/xml-in-json-indices/+merge/122548
-- 
https://code.launchpad.net/~zorba-coders/zorba/xml-in-json-indices/+merge/122548
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/xml-in-json-indices into lp:zorba

2013-02-18 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/xml-in-json-indices into lp:zorba 
has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/xml-in-json-indices/+merge/122548
-- 
https://code.launchpad.net/~zorba-coders/zorba/xml-in-json-indices/+merge/122548
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/xml-in-json-indices into lp:zorba

2013-02-18 Thread Ghislain Fourny
I just noticed you are in a Need Fixing state, so I am pushing to the patch 
queue.
-- 
https://code.launchpad.net/~zorba-coders/zorba/xml-in-json-indices/+merge/122548
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/xml-in-json-indices into lp:zorba

2013-02-18 Thread Ghislain Fourny
Good catch Paul. Do the changes fulfil your expectations provided all tests 
pass? I am not pushing yet to the patch queue because it might get through 
without your approval.
-- 
https://code.launchpad.net/~zorba-coders/zorba/xml-in-json-indices/+merge/122548
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/xml-in-json-indices into lp:zorba

2013-02-18 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/xml-in-json-indices into lp:zorba 
has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/xml-in-json-indices/+merge/122548
-- 
https://code.launchpad.net/~zorba-coders/zorba/xml-in-json-indices/+merge/122548
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/xml-in-json-indices into lp:zorba

2013-02-04 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/xml-in-json-indices into lp:zorba 
has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/xml-in-json-indices/+merge/122548
-- 
https://code.launchpad.net/~zorba-coders/zorba/xml-in-json-indices/+merge/122548
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1111487 into lp:zorba

2013-01-31 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/bug-487 into lp:zorba has been 
updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-487/+merge/145868
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-487/+merge/145868
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1111487 into lp:zorba

2013-01-31 Thread Ghislain Fourny
Ghislain Fourny has proposed merging lp:~zorba-coders/zorba/bug-487 into 
lp:zorba.

Commit message:
Fixing bug 487 (db:edit swaps).

Requested reviews:
  Dennis Knochenwefel (dennis-knochenwefel)
  Till Westmann (tillw)
Related bugs:
  Bug #487 in Zorba: "When editing a node in a collection, the collection 
information does not get swapped."
  https://bugs.launchpad.net/zorba/+bug/487

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-487/+merge/145868

Fixing bug 487 (db:edit swaps).
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-487/+merge/145868
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/store/naive/node_items.cpp'
--- src/store/naive/node_items.cpp	2013-01-11 00:45:15 +
+++ src/store/naive/node_items.cpp	2013-01-31 14:16:24 +
@@ -767,20 +767,13 @@
   assert(theParent == NULL);
   assert(lOtherItem->theParent == NULL);
 
-  // Swap flags expect hasReference.
-  bool lHasReference = haveReference();
-  bool lOtherHasReference = lOtherItem->haveReference();
-  std::swap(theFlags, lOtherItem->theFlags);
-  if(lHasReference)
-  {
-setHaveReference();
-  }
-  if(lOtherHasReference)
-  {
-setHaveReference();
-  }
-  
-  // Swap root nodes and adjust type maps.
+  // But some things must be "unswapped"
+  std::swap(getTree()->thePos, lOtherItem->getTree()->thePos);
+  std::swap(getTree()->theId, lOtherItem->getTree()->theId);
+  std::swap(getTree()->theCollection, lOtherItem->getTree()->theCollection);
+
+  // Before unswapping root nodes as well, their references in the type maps
+  // must be erased.
   store::Item_t lRootNodeType;
   store::Item_t lOtherRootNodeType;
   bool lRootHasType = getTree()->theTypesMap->get(
@@ -796,7 +789,11 @@
 lOtherItem->getTree()->theTypesMap->erase(
 lOtherItem->getTree()->theRootNode);
   }
+
+  // Now unswapping root nodes.
   std::swap(getTree()->theRootNode, lOtherItem->getTree()->theRootNode);
+
+  // And putting references back into the type maps.
   if(lRootHasType)
   {
 getTree()->theTypesMap->insert(getTree()->theRootNode, lRootNodeType);
@@ -807,10 +804,19 @@
 lOtherItem->getTree()->theRootNode, lOtherRootNodeType);
   }
 
-  // Adjust trees.
-#ifndef EMBEDED_TYPE
-  std::swap(getTree()->theTypesMap, lOtherItem->getTree()->theTypesMap);
-#endif
+  // Swap flags expect hasReference.
+  bool lHasReference = haveReference();
+  bool lOtherHasReference = lOtherItem->haveReference();
+  std::swap(theFlags, lOtherItem->theFlags);
+  if(lHasReference)
+  {
+setHaveReference();
+  }
+  if(lOtherHasReference)
+  {
+setHaveReference();
+  }
+
 }
 
 /***

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/xml-in-json-indices into lp:zorba

2013-01-30 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/xml-in-json-indices into lp:zorba 
has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/xml-in-json-indices/+merge/122548
-- 
https://code.launchpad.net/~zorba-coders/zorba/xml-in-json-indices/+merge/122548
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/xml-in-json-indices into lp:zorba

2013-01-30 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/xml-in-json-indices into lp:zorba 
has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/xml-in-json-indices/+merge/122548
-- 
https://code.launchpad.net/~zorba-coders/zorba/xml-in-json-indices/+merge/122548
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/xml-in-json-indices into lp:zorba

2013-01-29 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/xml-in-json-indices into lp:zorba 
has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/xml-in-json-indices/+merge/122548
-- 
https://code.launchpad.net/~zorba-coders/zorba/xml-in-json-indices/+merge/122548
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/xml-in-json-indices into lp:zorba

2013-01-29 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/xml-in-json-indices into lp:zorba 
has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/xml-in-json-indices/+merge/122548
-- 
https://code.launchpad.net/~zorba-coders/zorba/xml-in-json-indices/+merge/122548
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-reference_module into lp:zorba

2013-01-11 Thread Ghislain Fourny
Review: Approve

Thanks! It looks good now.
-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-reference_module/+merge/138345
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-reference_module into lp:zorba

2013-01-10 Thread Ghislain Fourny
Perhaps we can move this if clause out of the store and into the old module 
code?
-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-reference_module/+merge/138345
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-reference_module into lp:zorba

2013-01-08 Thread Ghislain Fourny
Hi Matthias,

For ref:dereference's not throwing any error, I am not sure I understand your 
comment - looking at the code, it seems to not differentiate between nodes, 
objects and arrays. I have the feeling it is only about removing the if 
statement that throws the error in SimpleStore::getNodeByReference, is it not?


-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-reference_module/+merge/138345
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-reference_module into lp:zorba

2013-01-07 Thread Ghislain Fourny
I am not sure about switching back to xs:string instead of xs:anyURI - somehow, 
I find it semantically weird. Perhaps this deserves an offline discussion?

-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-reference_module/+merge/138345
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-reference_module into lp:zorba

2013-01-07 Thread Ghislain Fourny
Review: Needs Fixing

Hi Matthias,

It looks good! I have the following comments:

- 104 : JSON reference -> did you mean JSON array?

- Why return an error if ref:dereference is called with an unrecognized URI, 
while returning the empty sequence if it is recognized but unbound? Can we 
unify and always return the empty sequence? Or is it part of the API that 
references have a certain format? I thought of them as blackbox URIs.

- The error code text only mentions objects not in a collection, but not arrays.

- With the changes pending in xml-in-json-indices, the code could become 
considerably simpler (less, perhaps even no more casts to XmlNode or JSONItem).


-- 
https://code.launchpad.net/~zorba-coders/zorba/feature-reference_module/+merge/138345
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1092842 into lp:zorba

2012-12-21 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/bug-1092842 into lp:zorba has been 
updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1092842/+merge/141049
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1092842/+merge/141049
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1092842 into lp:zorba

2012-12-21 Thread Ghislain Fourny
Ghislain Fourny has proposed merging lp:~zorba-coders/zorba/bug-1092842 into 
lp:zorba.

Commit message:
"Fixing bug 1092842 (tree pointers of nested items in an object or array do not 
get swapped correctly upon dml:edit.)"

Requested reviews:
  Chris Hillery (ceejatec)
  Matthias Brantner (matthias-brantner)
Related bugs:
  Bug #1092842 in Zorba: "Assertion fails when dml:editing nested JSON items."
  https://bugs.launchpad.net/zorba/+bug/1092842

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1092842/+merge/141049

"Fixing bug 1092842 (tree pointers of nested items in an object or array do not 
get swapped correctly upon dml:edit.)"
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1092842/+merge/141049
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/store/naive/json_items.cpp'
--- src/store/naive/json_items.cpp	2012-12-14 13:11:51 +
+++ src/store/naive/json_items.cpp	2012-12-21 10:07:25 +
@@ -503,6 +503,8 @@
   assert(lOther);
   std::swap(theKeys, lOther->theKeys);
   std::swap(thePairs, lOther->thePairs);
+  setTree(getTree());
+  lOther->setTree(lOther->getTree());
 }
 
 /**
@@ -934,6 +936,8 @@
   SimpleJSONArray* lOther = dynamic_cast(anotherItem);
   assert(lOther);
   std::swap(theContent, lOther->theContent);
+  setTree(getTree());
+  lOther->setTree(lOther->getTree());
 }
 
 /**

=== added file 'test/rbkt/ExpQueryResults/zorba/collections/edit/edit_collection_018.xml.res'
--- test/rbkt/ExpQueryResults/zorba/collections/edit/edit_collection_018.xml.res	1970-01-01 00:00:00 +
+++ test/rbkt/ExpQueryResults/zorba/collections/edit/edit_collection_018.xml.res	2012-12-21 10:07:25 +
@@ -0,0 +1,1 @@
+{ "bar" : "foo", "foo" : [ { "foo" : "bar" } ] }

=== added file 'test/rbkt/ExpQueryResults/zorba/collections/edit/edit_collection_019.xml.res'
--- test/rbkt/ExpQueryResults/zorba/collections/edit/edit_collection_019.xml.res	1970-01-01 00:00:00 +
+++ test/rbkt/ExpQueryResults/zorba/collections/edit/edit_collection_019.xml.res	2012-12-21 10:07:25 +
@@ -0,0 +1,1 @@
+[ 1, 2, 3, [ { "foo" : "bar" } ] ]

=== modified file 'test/rbkt/Queries/zorba/collections/collection_001.xqdata'
--- test/rbkt/Queries/zorba/collections/collection_001.xqdata	2012-12-11 14:47:49 +
+++ test/rbkt/Queries/zorba/collections/collection_001.xqdata	2012-12-21 10:07:25 +
@@ -8,6 +8,8 @@
 
 declare collection ns:collection-objects as object()*;
 
+declare collection ns:collection-arrays as array()*;
+
 declare %ann:ordered collection ns:collection2;
 
 declare %ann:const collection ns:collection_const as node()*;

=== added file 'test/rbkt/Queries/zorba/collections/edit/edit_collection_018.xq'
--- test/rbkt/Queries/zorba/collections/edit/edit_collection_018.xq	1970-01-01 00:00:00 +
+++ test/rbkt/Queries/zorba/collections/edit/edit_collection_018.xq	2012-12-21 10:07:25 +
@@ -0,0 +1,12 @@
+import module namespace ddl = "http://www.zorba-xquery.com/modules/store/static/collections/ddl";;
+import module namespace dml = "http://www.zorba-xquery.com/modules/store/static/collections/dml";;
+
+import module namespace ns = "http://www.example.com/example"; at "../collection_001.xqdata";
+
+ddl:create(xs:QName("ns:collection-objects"));
+
+dml:insert(xs:QName("ns:collection-objects"), { "foo" : "bar", "bar" : [ 1, 2, 3, { "foo" : "bar" } ]  });
+
+dml:edit(dml:collection(xs:QName("ns:collection-objects")), { "bar" : "foo", "foo" : [ { "foo" : "bar" } ] });
+
+dml:collection(xs:QName("ns:collection-objects"))

=== added file 'test/rbkt/Queries/zorba/collections/edit/edit_collection_019.xq'
--- test/rbkt/Queries/zorba/collections/edit/edit_collection_019.xq	1970-01-01 00:00:00 +
+++ test/rbkt/Queries/zorba/collections/edit/edit_collection_019.xq	2012-12-21 10:07:25 +
@@ -0,0 +1,12 @@
+import module namespace ddl = "http://www.zorba-xquery.com/modules/store/static/collections/ddl";;
+import module namespace dml = "http://www.zorba-xquery.com/modules/store/static/collections/dml";;
+
+import module namespace ns = "http://www.example.com/example"; at "../collection_001.xqdata";
+
+ddl:create(xs:QName("ns:collection-arrays"));
+
+dml:insert(xs:QName("ns:collection-arrays"), [ { "foo" : "bar" }, 1, 2, 3 ]);
+
+dml:edit(dml:collection(xs:QName("ns:collection-arrays")), [ 1, 2, 3, [ { "foo" : "bar" } ] ]);
+
+dml:collection(xs:QName("ns:collection-arrays"))

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1092842 into lp:zorba

2012-12-21 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/bug-1092842 into lp:zorba has been 
updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1092842/+merge/141049
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1092842/+merge/141049
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/replace-node-cleanup into lp:zorba

2012-12-17 Thread Ghislain Fourny
The proposal to merge lp:~zorba-coders/zorba/replace-node-cleanup into lp:zorba 
has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/replace-node-cleanup/+merge/140161
-- 
https://code.launchpad.net/~zorba-coders/zorba/replace-node-cleanup/+merge/140161
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


  1   2   3   4   5   6   >