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

2013-06-07 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/markos-scratch-2013-06-08T06-46-54.906Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/168232
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/markos-scratch into lp:zorba

2013-06-07 Thread Markos Zaharioudakis
The proposal to merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba has 
been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/168232
-- 
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/168232
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/markos-scratch into lp:zorba

2013-06-07 Thread Markos Zaharioudakis
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/168232
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/markos-scratch into lp:zorba

2013-06-07 Thread Markos Zaharioudakis
Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch 
into lp:zorba.

Commit message:
allow item()* as the input of jn:keys and jn:members functions

Requested reviews:
  Markos Zaharioudakis (markos-za)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/168232

allow item()* as the input of jn:keys and jn:members functions
-- 
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/168232
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2013-06-06 18:33:17 +
+++ ChangeLog	2013-06-08 05:35:32 +
@@ -4,7 +4,7 @@
 version 3.0
 
 New Features:
-
+  
 Optimizations:
   * Implemented hoisting optimization for general FLWOR.
   * Implemented flwor-merge optimization for general FLWOR.
@@ -25,7 +25,13 @@
   * Fixed bug #1188100 (regex issues with 'q' flag in fn:tokenize)
   * Fixed invalid memory access error occuring during sequence type matching
 for user-defined types.
-
+  * jn:members function takes item()* as aparameter (instead of item())
+  * jn:keys function takes item()* as aparameter (instead of item())
+  * Object/array navigation allows item()* as the type of the input sequence
+(doing implicit iteration over the input sequence and skipping items
+ that are not objects/arrays).
+  * Bug fix: selector value in object/array navigation is always cast to
+string/integer
 
 version 2.9
 

=== modified file 'modules/org/jsoniq/www/functions.xq'
--- modules/org/jsoniq/www/functions.xq	2013-06-05 00:37:35 +
+++ modules/org/jsoniq/www/functions.xq	2013-06-08 05:35:32 +
@@ -193,7 +193,7 @@
  : @param $o A JSON Object.
  : @return The names of pairs in the object.
  :)
-declare function jn:keys($o as item()) as xs:string* external;
+declare function jn:keys($o as item()*) as xs:string* external;
 
 
 (:~
@@ -248,7 +248,7 @@
  : @param $a A JSON Array.
  : @return The members of the specified array.
  :)
-declare function jn:members($o as item()) as item()* external;
+declare function jn:members($o as item()*) as item()* external;
 
 
 (:~

=== modified file 'src/compiler/translator/translator.cpp'
--- src/compiler/translator/translator.cpp	2013-06-05 07:26:13 +
+++ src/compiler/translator/translator.cpp	2013-06-08 05:35:32 +
@@ -12093,6 +12093,20 @@
 
 break;
   }
+  case FunctionConsts::FN_JSONIQ_KEYS_1:
+  {
+if (arguments[0]->get_return_type()->max_card() <= 1)
+  f = BUILTIN_FUNC(OP_ZORBA_KEYS_1);
+
+break;
+  }
+  case FunctionConsts::FN_JSONIQ_MEMBERS_1:
+  {
+if (arguments[0]->get_return_type()->max_card() <= 1)
+  f = BUILTIN_FUNC(OP_ZORBA_MEMBERS_1);
+
+break;
+  }
   case FunctionConsts::FN_CONCAT_N:
   {
 if (numArgs < 2)
@@ -12380,11 +12394,11 @@
 {
   if (TypeOps::is_subtype(tm, *srcType, *theRTM.JSON_ARRAY_TYPE_STAR))
   {
-func = BUILTIN_FUNC(FN_JSONIQ_MEMBERS_1);
+func = BUILTIN_FUNC(OP_ZORBA_MEMBERS_1);
   }
   else if (TypeOps::is_subtype(tm, *srcType, *theRTM.JSON_OBJECT_TYPE_STAR))
   {
-func = BUILTIN_FUNC(FN_JSONIQ_KEYS_1);
+func = BUILTIN_FUNC(OP_ZORBA_KEYS_1);
   }
   else
   {

=== modified file 'src/functions/func_jsoniq_functions_impl.cpp'
--- src/functions/func_jsoniq_functions_impl.cpp	2013-02-07 17:24:36 +
+++ src/functions/func_jsoniq_functions_impl.cpp	2013-06-08 05:35:32 +
@@ -31,7 +31,39 @@
 namespace zorba
 {
 
-#ifdef ZORBA_WITH_JSON
+
+/***
+
+/
+PlanIter_t fn_jsoniq_keys::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector& argv,
+  expr& arg) const
+{
+  if (arg.get_return_type()->max_card() <= 1)
+return new SingleObjectNamesIterator(sctx, loc, argv[0]);
+
+  return new JSONObjectNamesIterator(sctx, loc, argv[0]);
+}
+
+
+/***
+
+/
+PlanIter_t fn_jsoniq_members::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector& argv,
+  expr& arg) const
+{
+  if (arg.get_return_type()->max_card() <= 1)
+return new SingleArrayMembersIterator(sctx, loc, argv[0]);
+
+  return new JSONArrayMembersIterator(sctx, loc, argv[0]);
+}
 
 
 /***
@@ -174,8 +206,6 @@
 }
 
 
-#endif // ZORBA_WITH_JSON
-
 } /* namespace zorba */
 
 /* vim:set et sw=2 ts=2: */

=== modified file 'src/functions/pregenerated/func_jsoniq_functions.cpp'
--- src/functions/pregenerated/func_jsoniq_functions.cpp	2013-06-05 00:37:35 +
+++ src/functions/pregenerated/func_jsoniq_functions.cpp	2013-06-08 05:35:32 +
@@ -72,14 +72,15 @@
   return new JSONItemAccessorIterator(sctx, loc, 

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

2013-06-07 Thread Chris Hillery
I actually don't find this change too terrible. I like it a lot better than the 
earlier version which actually changed which StaticContext object was passed 
based on the module URI, at least. If we can change the ExternalFunction API to 
directly pass the invoking StaticContext, however (as being discussed in 
email), that would be the better choice.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1133806_xqxq_base_uri/+merge/168020
Your team Zorba Coders is requested to review the proposed merge of 
lp:~zorba-coders/zorba/bug1133806_xqxq_base_uri into 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/windows-fixes into lp:zorba

2013-06-07 Thread noreply
The proposal to merge lp:~zorba-coders/zorba/windows-fixes into lp:zorba has 
been updated.

Status: Approved => Merged

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/windows-fixes/+merge/168194
-- 
https://code.launchpad.net/~zorba-coders/zorba/windows-fixes/+merge/168194
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/windows-fixes into lp:zorba

2013-06-07 Thread Zorba Build Bot
Validation queue job windows-fixes-2013-06-07T21-28-45.185Z is finished. The 
final status was:

All tests succeeded!
-- 
https://code.launchpad.net/~zorba-coders/zorba/windows-fixes/+merge/168194
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/windows-fixes into lp:zorba

2013-06-07 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/windows-fixes-2013-06-07T21-28-45.185Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/windows-fixes/+merge/168194
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/windows-fixes into lp:zorba

2013-06-07 Thread Paul J. Lucas
The proposal to merge lp:~zorba-coders/zorba/windows-fixes into lp:zorba has 
been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/windows-fixes/+merge/168194
-- 
https://code.launchpad.net/~zorba-coders/zorba/windows-fixes/+merge/168194
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/windows-fixes into lp:zorba

2013-06-07 Thread Paul J. Lucas
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/windows-fixes/+merge/168194
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/windows-fixes into lp:zorba

2013-06-07 Thread Juan Zacarias
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/windows-fixes/+merge/168194
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/windows-fixes into lp:zorba

2013-06-07 Thread Juan Zacarias
Juan Zacarias has proposed merging lp:~zorba-coders/zorba/windows-fixes into 
lp:zorba.

Commit message:
Fixes for Windows.

Requested reviews:
  Juan Zacarias (juan457)
  Paul J. Lucas (paul-lucas)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/windows-fixes/+merge/168194

Fixes for Windows.
-- 
https://code.launchpad.net/~zorba-coders/zorba/windows-fixes/+merge/168194
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/zorbatypes/decimal.h'
--- src/zorbatypes/decimal.h	2013-05-16 19:05:52 +
+++ src/zorbatypes/decimal.h	2013-06-07 21:27:00 +
@@ -408,7 +408,7 @@
   return value_.sign();
 }
 
-inline Decimal::operator explicit_bool::type() const {
+inline Decimal::operator internal::ztd::explicit_bool::type() const {
   return explicit_bool::value_of( sign() );
 }
 

=== modified file 'src/zorbatypes/integer.h'
--- src/zorbatypes/integer.h	2013-05-20 20:29:45 +
+++ src/zorbatypes/integer.h	2013-06-07 21:27:00 +
@@ -1215,7 +1215,7 @@
 #endif /* ZORBA_WITH_BIG_INTEGER */
 
 template
-inline IntegerImpl::operator explicit_bool::type() const {
+inline IntegerImpl::operator internal::ztd::explicit_bool::type() const {
   return explicit_bool::value_of( sign() );
 }
 

=== modified file 'src/zorbatypes/timezone.h'
--- src/zorbatypes/timezone.h	2013-05-22 16:12:01 +
+++ src/zorbatypes/timezone.h	2013-06-07 21:27:00 +
@@ -131,7 +131,7 @@
   return gmtoff_;
 }
 
-inline TimeZone::operator explicit_bool::type() const {
+inline TimeZone::operator internal::ztd::explicit_bool::type() const {
   return explicit_bool::value_of( !timezone_not_set_ );
 }
 

-- 
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-06-07 Thread Zorba Build Bot
The attempt to merge lp:~zorba-coders/zorba/array-unboxing into lp:zorba 
failed. Below is the output from the failed tests.


CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:281 
(message):
  Validation queue job array-unboxing-2013-06-07T15-12-48.584Z is finished.
  The final status was:

  

  1 tests did not succeed - changes not commited.


Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

-- 
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-06-07 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/array-unboxing into lp:zorba has 
been updated.

Status: Approved => Needs review

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/array-unboxing into lp:zorba

2013-06-07 Thread Nicolae Brinza
The proposal to merge lp:~zorba-coders/zorba/array-unboxing into lp:zorba has 
been updated.

Status: Needs review => Approved

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/array-unboxing into lp:zorba

2013-06-07 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/array-unboxing-2013-06-07T15-12-48.584Z/log.html
-- 
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-navigation into lp:zorba

2013-06-07 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/array-navigation into lp:zorba has 
been updated.

Status: Approved => Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/array-navigation/+merge/168069
-- 
https://code.launchpad.net/~zorba-coders/zorba/array-navigation/+merge/168069
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-navigation into lp:zorba

2013-06-07 Thread Zorba Build Bot
Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, 
Needs Fixing < 1, Pending < 1, Needs Information < 1, Resubmit < 1. Got: 2 
Pending.
-- 
https://code.launchpad.net/~zorba-coders/zorba/array-navigation/+merge/168069
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-navigation into lp:zorba

2013-06-07 Thread Zorba Build Bot
Validation queue job array-navigation-2013-06-07T14-33-01.358Z is finished. The 
final status was:

All tests succeeded!
-- 
https://code.launchpad.net/~zorba-coders/zorba/array-navigation/+merge/168069
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-navigation into lp:zorba

2013-06-07 Thread Markos Zaharioudakis
The proposal to merge lp:~zorba-coders/zorba/array-navigation into lp:zorba has 
been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/array-navigation/+merge/168069
-- 
https://code.launchpad.net/~zorba-coders/zorba/array-navigation/+merge/168069
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-navigation into lp:zorba

2013-06-07 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/array-navigation-2013-06-07T14-33-01.358Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/array-navigation/+merge/168069
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-1180220 into lp:zorba

2013-06-07 Thread Paul J. Lucas
> 1. What's the difference between include/zorba/internal and
> include/zorba/util?

Internal is for our use only.  We make no claim that stuff in there will not 
either change or be removed at any time.

> 2. Was it necessary/a good idea to move cxx_util.h and error_util.h into the
> set of shipped headers?

Because they're necessary for fs_util.h.

> 3. Why was cxx_util.h moved to internal/ and error_util.h to util/ ?

Because cxx_util.h is a temporary measure until C++0x compilers are wide-spread 
and the file may disappear at any time; error_util.h will stick around (see #1 
answer above).

> 4. Have you done any testing on Windows?

It's pretty much impossible for me to do that.

> There are several #ifdef WIN32
> changes. If necessary I could request Juan or Luis to test it out (would
> prefer Rodolfo but he's busy with website stuff).

You can, if you like.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1180220/+merge/167177
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-navigation into lp:zorba

2013-06-07 Thread Markos Zaharioudakis
Markos Zaharioudakis has proposed merging 
lp:~zorba-coders/zorba/array-navigation into lp:zorba.

Commit message:
New array unboxing/navigation ($a[])[1]

Requested reviews:
  Markos Zaharioudakis (markos-za)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/array-navigation/+merge/168069

New array unboxing/navigation ($a[])[1]
-- 
https://code.launchpad.net/~zorba-coders/zorba/array-navigation/+merge/168069
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/compiler/parser/parser.y'
--- src/compiler/parser/parser.y	2013-05-15 10:00:58 +
+++ src/compiler/parser/parser.y	2013-06-07 14:11:57 +
@@ -4454,6 +4454,10 @@
  {
$$ = new DynamicFunctionInvocation(LOC(@$), $1, dynamic_cast($3), false);
  }
+  | FilterExpr LBRACK RBRACK
+{
+  $$ = new JSONArrayUnboxing(LOC(@$), $1);
+}
 #ifdef JSONIQ_PARSER 
   |  FilterExpr DOT QNAME
  {
@@ -4482,27 +4486,28 @@
 
 // [81]
 PredicateList :
-Predicate
-{
-PredicateList *pl = new PredicateList( LOC(@$) );
-pl->push_back( dynamic_cast($1) );
-$$ = pl;
-}
-|   PredicateList Predicate
-{
-if ( PredicateList *pl = dynamic_cast($1) )
-pl->push_back( dynamic_cast($2) );
-$$ = $1;
-}
-;
+Predicate
+{
+  PredicateList* pl = new PredicateList( LOC(@$) );
+  pl->push_back(dynamic_cast($1));
+  $$ = pl;
+}
+  | PredicateList Predicate
+{
+  if (PredicateList* pl = dynamic_cast($1))
+pl->push_back(dynamic_cast($2));
+
+  $$ = $1;
+}
+;
 
 // [82]
 Predicate :
-LBRACK Expr RBRACK
-{
-$$ = $2;
-}
-;
+LBRACK Expr RBRACK
+{
+  $$ = $2;
+}
+;
 
 // [83]
 PrimaryExpr :

=== modified file 'src/compiler/parsetree/parsenode_print_xml_visitor.cpp'
--- src/compiler/parsetree/parsenode_print_xml_visitor.cpp	2013-05-08 20:14:47 +
+++ src/compiler/parsetree/parsenode_print_xml_visitor.cpp	2013-06-07 14:11:57 +
@@ -1066,6 +1066,8 @@
 // JSON ///
 BEGIN_END_TAG(JSONObjectLookup)
 
+BEGIN_END_TAG(JSONArrayUnboxing)
+
 BEGIN_END_TAG(JSONArrayConstructor)
 
 BEGIN_END_TAG(JSONObjectConstructor)

=== modified file 'src/compiler/parsetree/parsenode_print_xqdoc_visitor.cpp'
--- src/compiler/parsetree/parsenode_print_xqdoc_visitor.cpp	2013-04-16 21:12:12 +
+++ src/compiler/parsetree/parsenode_print_xqdoc_visitor.cpp	2013-06-07 14:11:57 +
@@ -1534,6 +1534,7 @@
 XQDOC_NO_BEGIN_END_TAG (WindowVars)
 
 XQDOC_NO_BEGIN_END_TAG (JSONObjectLookup)
+XQDOC_NO_BEGIN_END_TAG (JSONArrayUnboxing)
 XQDOC_NO_BEGIN_END_TAG (JSONArrayConstructor)
 XQDOC_NO_BEGIN_END_TAG (JSONObjectConstructor)
 XQDOC_NO_BEGIN_END_TAG (JSONDirectObjectConstructor)

=== modified file 'src/compiler/parsetree/parsenode_print_xquery_visitor.cpp'
--- src/compiler/parsetree/parsenode_print_xquery_visitor.cpp	2013-03-22 00:38:18 +
+++ src/compiler/parsetree/parsenode_print_xquery_visitor.cpp	2013-06-07 14:11:57 +
@@ -2055,6 +2055,8 @@
   /* JSON-related */
   DEFAULT_VISIT (JSONObjectLookup);
 
+  DEFAULT_VISIT (JSONArrayUnboxing);
+
   DEFAULT_VISIT (JSONArrayConstructor);
 
   DEFAULT_VISIT (JSONObjectConstructor);

=== modified file 'src/compiler/parsetree/parsenode_visitor.h'
--- src/compiler/parsetree/parsenode_visitor.h	2013-03-22 00:38:18 +
+++ src/compiler/parsetree/parsenode_visitor.h	2013-06-07 14:11:57 +
@@ -283,6 +283,7 @@
 
 /* JSON */
   DECL_PARSENODE_VISITOR_VISIT_MEM_FNS( JSONObjectLookup );
+  DECL_PARSENODE_VISITOR_VISIT_MEM_FNS( JSONArrayUnboxing );
   DECL_PARSENODE_VISITOR_VISIT_MEM_FNS( JSONArrayConstructor );
   DECL_PARSENODE_VISITOR_VISIT_MEM_FNS( JSONObjectConstructor );
   DECL_PARSENODE_VISITOR_VISIT_MEM_FNS( JSONDirectObjectConstructor );

=== modified file 'src/compiler/parsetree/parsenodes.cpp'
--- src/compiler/parsetree/parsenodes.cpp	2013-05-11 12:22:50 +
+++ src/compiler/parsetree/parsenodes.cpp	2013-06-07 14:11:57 +
@@ -5921,15 +5921,21 @@
 }
 
 // JSON ///
+
+
+/***
+
+/
 JSONObjectLookup::JSONObjectLookup(
 const QueryLoc& loc,
 const QueryLoc& a_dot_loc,
 const exprnode* aObjectExpr,
 const exprnode* aSelectorExpr)
-  : exprnode(loc),
-dot_loc(a_dot_loc),
-theObjectExpr(aObjectExpr),
-theSelectorExpr(aSelectorExpr)
+  :
+  exprnode(loc),
+  dot_loc(a_dot_loc),
+  theObjectExpr(aObjectExpr),
+  theSelectorExpr(aSelectorExpr)
 {
 }
 
@@ -5950,6 +5956,36 @@
 }
 
 
+/***
+
+/
+JSONArrayUnb

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

2013-06-07 Thread Chris Hillery
The proposal to merge lp:~zorba-coders/zorba/bug1133806_xqxq_base_uri into 
lp:zorba has been updated.

Description changed to:

Just want to see the diff here.

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug1133806_xqxq_base_uri/+merge/168020
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1133806_xqxq_base_uri/+merge/168020
Your team Zorba Coders is requested to review the proposed merge of 
lp:~zorba-coders/zorba/bug1133806_xqxq_base_uri into 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/bug1133806_xqxq_base_uri into lp:zorba

2013-06-07 Thread Chris Hillery
Chris Hillery has proposed merging 
lp:~zorba-coders/zorba/bug1133806_xqxq_base_uri into lp:zorba.

Requested reviews:
  Zorba Coders (zorba-coders)
Related bugs:
  Bug #1133806 in Zorba: "XQXQ should set base URI of execution context"
  https://bugs.launchpad.net/zorba/+bug/1133806

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug1133806_xqxq_base_uri/+merge/168020

Just want to see the diff here.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1133806_xqxq_base_uri/+merge/168020
Your team Zorba Coders is requested to review the proposed merge of 
lp:~zorba-coders/zorba/bug1133806_xqxq_base_uri into lp:zorba.
=== modified file 'modules/xqxq/xqxq.xq.src/xqxq.cpp'
--- modules/xqxq/xqxq.xq.src/xqxq.cpp	2013-05-28 00:58:27 +
+++ modules/xqxq/xqxq.xq.src/xqxq.cpp	2013-06-07 11:18:32 +
@@ -469,8 +469,9 @@
   String lQueryString = getOneStringArgument(aArgs, 0); 
 
   XQuery_t lQuery;
-
+
   StaticContext_t ltempSctx = lZorba->createStaticContext();
+  ltempSctx->setBaseURI(aSctx->getBaseURI());
 
   std::auto_ptr lResolver;
   std::auto_ptr lMapper;
@@ -938,7 +939,7 @@
 
   zorba::DynamicContext* lCtx = lQuery->getDynamicContext();
   zorba::String lNS = lVarQName.getNamespace(), lLocal = lVarQName.getLocalName();
-
+  
   try
   {
 lIsBoundVariable = lCtx->isBoundExternalVariable(lNS, lLocal);

=== modified file 'src/runtime/core/fncall_iterator.cpp'
--- src/runtime/core/fncall_iterator.cpp	2013-04-24 01:35:58 +
+++ src/runtime/core/fncall_iterator.cpp	2013-06-07 11:18:32 +
@@ -804,7 +804,6 @@
 
   // The planState.theQuery maybe null, e.g. in the case of constant-folding
   // of global variable expressions
-
   StaticContextImpl theSctxWrapper(theModuleSctx,
(planState.theQuery == NULL?
 NULL :
@@ -814,9 +813,13 @@
 planState.theGlobalDynCtx,
 theModuleSctx);
 
+  if (lNonePureFct->getURI() == "http://www.zorba-xquery.com/modules/xqxq";)
+theSctxWrapper.setBaseURI(theSctx->get_base_uri().c_str());
+
   state->theResult = lNonePureFct->evaluate(state->m_extArgs,
 &theSctxWrapper,
 &theDctxWrapper);
+  
   if(state->theResult.get() != NULL)
 state->theResultIter = state->theResult->getIterator();
 } // if (!theFunction->isContextual())

-- 
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/bug1123835 into lp:zorba

2013-06-07 Thread Chris Hillery
Review: Needs Fixing

Sorry, but this implementation isn't right. You're still sucking the entire 
contents of the istream into memory via that stringstream. That's not 
acceptable. (You also have a potential memory leak since you don't use an 
auto_ptr<> for the stringstream you allocate on the stack, but that will be 
irrelevant since there shouldn't be a stringstream at all.)

I believe this implementation will also throw an error if there aren't at least 
3 bytes in the input stream.

Please re-read my comment from 2013-04-24. The best solution would be to 
implement a buffer::attach() iostreams class with a 3-byte buffer. This would 
allow you to safely read and, if necessary, put back 3 bytes to check for a 
BOM. You could then attach THAT to either unparsed::attach() or 
transcode::attach() as you do here. I kind of feel like there must be an 
open-source class that does that already; it's completely generic.

Failing that, the closest thing to a right answer would be to revert to the 
code you had before using istream::unget(), with an additional check that the 
stream is seekable before attempting it. It's half a solution, but it's better 
than no solution.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1123835/+merge/158978
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/oauth-status-codes into lp:zorba/oauth-module

2013-06-07 Thread noreply
The proposal to merge lp:~zorba-coders/zorba/oauth-status-codes into 
lp:zorba/oauth-module has been updated.

Status: Approved => Merged

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/oauth-status-codes/+merge/167707
-- 
https://code.launchpad.net/~zorba-coders/zorba/oauth-status-codes/+merge/167707
Your team Zorba Coders is subscribed to branch lp:zorba/oauth-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


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/oauth-status-codes into lp:zorba/oauth-module

2013-06-07 Thread Zorba Build Bot
Validation queue job oauth-status-codes-2013-06-07T10-01-50.171Z is finished. 
The final status was:

All tests succeeded!
-- 
https://code.launchpad.net/~zorba-coders/zorba/oauth-status-codes/+merge/167707
Your team Zorba Coders is subscribed to branch lp:zorba/oauth-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


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/oauth-status-codes into lp:zorba/oauth-module

2013-06-07 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/oauth-status-codes-2013-06-07T10-01-50.171Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/oauth-status-codes/+merge/167707
Your team Zorba Coders is subscribed to branch lp:zorba/oauth-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


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/oauth-status-codes into lp:zorba/oauth-module

2013-06-07 Thread Sorin Marian Nasoi
The proposal to merge lp:~zorba-coders/zorba/oauth-status-codes into 
lp:zorba/oauth-module has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/oauth-status-codes/+merge/167707
-- 
https://code.launchpad.net/~zorba-coders/zorba/oauth-status-codes/+merge/167707
Your team Zorba Coders is subscribed to branch lp:zorba/oauth-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


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/oauth-status-codes into lp:zorba/oauth-module

2013-06-07 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/oauth-status-codes into 
lp:zorba/oauth-module has been updated.

Status: Approved => Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/oauth-status-codes/+merge/167707
-- 
https://code.launchpad.net/~zorba-coders/zorba/oauth-status-codes/+merge/167707
Your team Zorba Coders is subscribed to branch lp:zorba/oauth-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/oauth-status-codes into lp:zorba/oauth-module

2013-06-07 Thread Zorba Build Bot
The attempt to merge lp:~zorba-coders/zorba/oauth-status-codes into 
lp:zorba/oauth-module failed. Below is the output from the failed tests.


CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:281 
(message):
  Validation queue job oauth-status-codes-2013-06-07T08-32-01.744Z is
  finished.  The final status was:

  

  1 tests did not succeed - changes not commited.


Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

-- 
https://code.launchpad.net/~zorba-coders/zorba/oauth-status-codes/+merge/167707
Your team Zorba Coders is subscribed to branch lp:zorba/oauth-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


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

2013-06-07 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/new-jsoniq into lp:zorba has been 
updated.

Status: Approved => Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/167907
-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/167907
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/oauth-status-codes into lp:zorba/oauth-module

2013-06-07 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/oauth-status-codes-2013-06-07T08-32-01.744Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/oauth-status-codes/+merge/167707
Your team Zorba Coders is subscribed to branch lp:zorba/oauth-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-06-07 Thread Zorba Build Bot
The attempt to merge lp:~zorba-coders/zorba/new-jsoniq into lp:zorba failed. 
Below is the output from the failed tests.


CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:281 
(message):
  Validation queue job new-jsoniq-2013-06-07T08-07-50.452Z is finished.  The
  final status was:

  

  2 tests did not succeed - changes not commited.


Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/167907
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/oauth-status-codes into lp:zorba/oauth-module

2013-06-07 Thread Sorin Marian Nasoi
The proposal to merge lp:~zorba-coders/zorba/oauth-status-codes into 
lp:zorba/oauth-module has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/oauth-status-codes/+merge/167707
-- 
https://code.launchpad.net/~zorba-coders/zorba/oauth-status-codes/+merge/167707
Your team Zorba Coders is subscribed to branch lp:zorba/oauth-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/oauth-status-codes into lp:zorba/oauth-module

2013-06-07 Thread Sorin Marian Nasoi
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/oauth-status-codes/+merge/167707
Your team Zorba Coders is subscribed to branch lp:zorba/oauth-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


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

2013-06-07 Thread Nicolae Brinza
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/167907
-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/167907
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-06-07 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/new-jsoniq-2013-06-07T08-07-50.452Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/167907
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-06-07 Thread Nicolae Brinza
The proposal to merge lp:~zorba-coders/zorba/new-jsoniq into lp:zorba has been 
updated.

Status: Needs review => Rejected

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/167824
-- 
https://code.launchpad.net/~zorba-coders/zorba/new-jsoniq/+merge/167824
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