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

2012-08-03 Thread noreply
The proposal to merge lp:~zorba-coders/zorba/bug900677 into lp:zorba has been 
updated.

Status: Approved => Merged

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

2012-08-03 Thread Zorba Build Bot
Validation queue job bug900677-2012-08-03T16-49-13.284Z is finished. The final 
status was:

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

2012-08-03 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/bug900677-2012-08-03T16-49-13.284Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug900677/+merge/118048
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/bug900677 into lp:zorba

2012-08-03 Thread Matthias Brantner
The proposal to merge lp:~zorba-coders/zorba/bug900677 into lp:zorba has been 
updated.

Status: Needs review => Approved

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

2012-08-03 Thread Matthias Brantner
Review: Approve


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

2012-08-03 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/bug900677 into lp:zorba has been 
updated.

Status: Approved => Needs review

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

2012-08-03 Thread Zorba Build Bot
Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, 
Needs Fixing < 1, Pending < 1. Got: 1 Approve, 1 Pending.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug900677/+merge/118048
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/bug900677 into lp:zorba

2012-08-03 Thread Zorba Build Bot
Validation queue job bug900677-2012-08-03T16-15-16.122Z is finished. The final 
status was:

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

2012-08-03 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/bug900677-2012-08-03T16-15-16.122Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug900677/+merge/118048
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/bug900677 into lp:zorba

2012-08-03 Thread David Graf
The proposal to merge lp:~zorba-coders/zorba/bug900677 into lp:zorba has been 
updated.

Status: Needs review => Approved

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

2012-08-03 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/bug900677 into lp:zorba has been 
updated.

Status: Approved => Needs review

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

2012-08-03 Thread Zorba Build Bot
Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, 
Needs Fixing < 1, Pending < 1. Got: 1 Approve, 1 Pending.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug900677/+merge/118048
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/bug900677 into lp:zorba

2012-08-03 Thread Zorba Build Bot
Validation queue job bug900677-2012-08-03T15-33-06.324Z is finished. The final 
status was:

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

2012-08-03 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/bug900677-2012-08-03T15-33-06.324Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug900677/+merge/118048
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/bug900677 into lp:zorba

2012-08-03 Thread Matthias Brantner
The proposal to merge lp:~zorba-coders/zorba/bug900677 into lp:zorba has been 
updated.

Status: Needs review => Approved

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

2012-08-03 Thread David Graf
Review: Approve


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

2012-08-03 Thread David Graf
This is a reproposal because some reviewers on the old proposal are not 
available. Unfortunately, I deleted the old proposals and lost the comments. 
Matthias, if you have them somewhere in your launchpad emails, please add it 
here.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug900677/+merge/118048
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/bug900677 into lp:zorba

2012-08-03 Thread David Graf
The proposal to merge lp:~zorba-coders/zorba/bug900677 into lp:zorba has been 
updated.

Commit Message changed to:

Added a keys() function to the index dml module. This fixes bug #900677.

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

2012-08-03 Thread David Graf
David Graf has proposed merging lp:~zorba-coders/zorba/bug900677 into lp:zorba.

Requested reviews:
  David Graf (davidagraf)
Related bugs:
  Bug #900677 in Zorba: "XQDDF access-keys($index) function"
  https://bugs.launchpad.net/zorba/+bug/900677

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

Added a keys() function to the index dml module. This fixes bug #900677.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug900677/+merge/118048
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2012-08-02 19:36:23 +
+++ ChangeLog	2012-08-03 07:09:20 +
@@ -18,6 +18,8 @@
 http://www.zorba-xquery.com/modules/store/data-structures/unordered-map module.
   * Added support for fragments to fn:path
   * Positional pagination support for collections
+  * Added a function to the http://www.zorba-xquery.com/modules/store/static/indexes/dml module which returns
+the value of all keys contained in an index.
   * Incremental maintenance for general indexes.
 	
 Optimizations:

=== modified file 'doc/zorba/xqddf.dox'
--- doc/zorba/xqddf.dox	2012-07-24 08:48:48 +
+++ doc/zorba/xqddf.dox	2012-08-03 07:09:20 +
@@ -1984,6 +1984,27 @@
 
 
 
+\subsection index_keys Retrieving Index Keys
+In addition to probing an index, the idml module also provides a function that allows listing all the keys contained in an index.
+
+\code
+  idml:keys($indexName as xs:QName) as item()*
+\endcode
+
+This function returns a sequence of element nodes.
+Each node in the sequence represents one key contained in the index and has the following structure:
+
+\code
+ http://www.zorba-xquery.com/modules/store/static/indexes/dml";>
+   
+   ...
+   
+ 
+\endcode
+
+The order of the attribute elements reflects the order of the key specifications in the declaration of the index.
+Also, the types of the values of the attributes are the types of the keys as they are declared.
+If a value attribute is not present, this means that the value of the corresponding key in the index is the empty sequence.
 
 \subsection index_maintenance Index Maintenance
 

=== modified file 'modules/com/zorba-xquery/www/modules/store/static/indexes/dml.xq'
--- modules/com/zorba-xquery/www/modules/store/static/indexes/dml.xq	2012-07-24 08:48:48 +
+++ modules/com/zorba-xquery/www/modules/store/static/indexes/dml.xq	2012-08-03 07:09:20 +
@@ -268,3 +268,27 @@
  :)
 declare updating function idml:refresh-index($name as xs:QName) external;
 
+(:~
+ : The keys function returns a sequence of all keys contained in the
+ : index with the given name. Each element has the following structure:
+ :   
+ :   ;
+ : 
+ : 
+ : 
+ :   
+ :   
+ :
+ : @param $name The QName of the index
+ : @return The result of the function is sequence of elements each representing
+ : one key contained in the index.
+ : 
+ : Note that the order of the attribute elements reflects the order of
+ : the keys in the index specification. Also note that the values in
+ : these attributes have the type that is declared in the corresponding
+ : index specification. 
+ :
+ : @error zerr:ZDDY0021 if the index with name $name is not declared.
+ : @error zerr:ZDDY0023 if the index with name $name does not exist.
+ :)
+declare function idml:keys($name as xs:QName) as node()* external;

=== modified file 'src/diagnostics/diagnostic_en.xml'
--- src/diagnostics/diagnostic_en.xml	2012-07-30 12:23:36 +
+++ src/diagnostics/diagnostic_en.xml	2012-08-03 07:09:20 +
@@ -2254,7 +2254,7 @@
 
 
 
-  "$1": index general multikey
+  "$1": number of key expressions for general indexes is restricted to one expression
 
 
 

=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
--- src/diagnostics/pregenerated/dict_en.cpp	2012-07-30 12:23:36 +
+++ src/diagnostics/pregenerated/dict_en.cpp	2012-08-03 07:09:20 +
@@ -383,7 +383,7 @@
   { "ZDST0032", "\"$1\": index references context item" },
   { "ZDST0033", "\"$1\": index non-simple expression" },
   { "ZDST0034", "\"$1\": index can not do automatic maintenance" },
-  { "ZDST0035", "\"$1\": index general multikey" },
+  { "ZDST0035", "\"$1\": number of key expressions for general indexes is restricted to one expression" },
   { "ZDST0036", "\"$1\": index declaration in foreign module" },
   { "ZDST0041", "\"$1\": integrity constraint already declared" },
   { "ZDST0044", "\"$1\": integrity constraint declaration not allowed in main module" },

=== modified file 'src/functions/library.cpp'
--- src/functions/library.cpp	2012-07-24 08:48:48 +
+++ src/functions/library.cpp	2012-08-03 07:09:20 +
@@ -41,6 +41,7 @@
 #include "functions/func_fnput.h"
 #include "functions/func_hoist.h"
 #include "functions/func_index_ddl.h"
+#include "fu

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

2012-07-24 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/bug900677 into lp:zorba has been 
updated.

Status: Approved => Needs review

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

2012-07-24 Thread Zorba Build Bot
The attempt to merge lp:~zorba-coders/zorba/bug900677 into lp:zorba failed. 
Below is the output from the failed tests.


CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 
(message):
  Validation queue job bug900677-2012-07-24T12-23-12.273Z is finished.  The
  final status was:

  

  4 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/bug900677/+merge/116099
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/bug900677 into lp:zorba

2012-07-24 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/bug900677-2012-07-24T12-23-12.273Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug900677/+merge/116099
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/bug900677 into lp:zorba

2012-07-24 Thread William Candillon
The proposal to merge lp:~zorba-coders/zorba/bug900677 into lp:zorba has been 
updated.

Status: Needs review => Approved

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

2012-07-24 Thread William Candillon
Review: Approve


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

2012-07-20 Thread Chris Hillery
I'm afraid I don't feel at all qualified to offer a review on this proposal. I 
can switch my review request to another developer. Otherwise, we can try and go 
over it all in person when I'm in the office next week.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug900677/+merge/116099
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/bug900677 into lp:zorba

2012-07-20 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/bug900677 into lp:zorba has been 
updated.

Status: Approved => Needs review

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

2012-07-20 Thread Zorba Build Bot
The attempt to merge lp:~zorba-coders/zorba/bug900677 into lp:zorba failed. 
Below is the output from the failed tests.


CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 
(message):
  Validation queue job bug900677-2012-07-20T23-56-10.596Z is finished.  The
  final status was:

  

  4 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/bug900677/+merge/116099
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/bug900677 into lp:zorba

2012-07-20 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/bug900677-2012-07-20T23-56-10.596Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug900677/+merge/116099
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/bug900677 into lp:zorba

2012-07-20 Thread Matthias Brantner
The proposal to merge lp:~zorba-coders/zorba/bug900677 into lp:zorba has been 
updated.

Status: Needs review => Approved

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

2012-07-20 Thread Matthias Brantner
Review: Approve


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

2012-07-20 Thread Matthias Brantner
This proposal has been resubmitted because Markos and David are on vacation. 
The original proposal (including plenty of comments) is at 
https://code.launchpad.net/~zorba-coders/zorba/bug900677/+merge/116097.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug900677/+merge/116099
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/bug900677 into lp:zorba

2012-07-20 Thread Matthias Brantner
Matthias Brantner has proposed merging lp:~zorba-coders/zorba/bug900677 into 
lp:zorba.

Requested reviews:
  Matthias Brantner (matthias-brantner)
  William Candillon (wcandillon)
  Chris Hillery (ceejatec)
Related bugs:
  Bug #900677 in Zorba: "XQDDF access-keys($index) function"
  https://bugs.launchpad.net/zorba/+bug/900677

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

Added a keys() function to the index dml module. This fixes bug #900677.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug900677/+merge/116099
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2012-07-20 02:54:05 +
+++ ChangeLog	2012-07-20 23:54:20 +
@@ -17,6 +17,8 @@
 http://www.zorba-xquery.com/modules/store/data-structures/unordered-map module.
   * Added support for fragments to fn:path
   * Positional pagination support for collections
+  * Added a function to the http://www.zorba-xquery.com/modules/store/static/indexes/dml module which returns
+the value of all keys contained in an index.
   * Incremental maintenance for general indexes.
 	
 Optimizations:

=== modified file 'doc/zorba/xqddf.dox'
--- doc/zorba/xqddf.dox	2012-07-12 17:29:55 +
+++ doc/zorba/xqddf.dox	2012-07-20 23:54:20 +
@@ -1984,6 +1984,27 @@
 
 
 
+\subsection index_keys Retrieving Index Keys
+In addition to probing an index, the idml module also provides a function that allows listing all the keys contained in an index.
+
+\code
+  idml:keys($indexName as xs:QName) as item()*
+\endcode
+
+This function returns a sequence of element nodes.
+Each node in the sequence represents one key contained in the index and has the following structure:
+
+\code
+ http://www.zorba-xquery.com/modules/store/static/indexes/dml";>
+   
+   ...
+   
+ 
+\endcode
+
+The order of the attribute elements reflects the order of the key specifications in the declaration of the index.
+Also, the types of the values of the attributes are the types of the keys as they are declared.
+If a value attribute is not present, this means that the value of the corresponding key in the index is the empty sequence.
 
 \subsection index_maintenance Index Maintenance
 

=== modified file 'modules/com/zorba-xquery/www/modules/store/static/indexes/dml.xq'
--- modules/com/zorba-xquery/www/modules/store/static/indexes/dml.xq	2012-07-12 17:29:55 +
+++ modules/com/zorba-xquery/www/modules/store/static/indexes/dml.xq	2012-07-20 23:54:20 +
@@ -268,3 +268,27 @@
  :)
 declare updating function idml:refresh-index($name as xs:QName) external;
 
+(:~
+ : The keys function returns a sequence of all keys contained in the
+ : index with the given name. Each element has the following structure:
+ :   
+ :   ;
+ : 
+ : 
+ : 
+ :   
+ :   
+ :
+ : @param $name The QName of the index
+ : @return The result of the function is sequence of elements each representing
+ : one key contained in the index.
+ : 
+ : Note that the order of the attribute elements reflects the order of
+ : the keys in the index specification. Also note that the values in
+ : these attributes have the type that is declared in the corresponding
+ : index specification. 
+ :
+ : @error zerr:ZDDY0021 if the index with name $name is not declared.
+ : @error zerr:ZDDY0023 if the index with name $name does not exist.
+ :)
+declare function idml:keys($name as xs:QName) as node()* external;

=== modified file 'src/diagnostics/diagnostic_en.xml'
--- src/diagnostics/diagnostic_en.xml	2012-07-17 13:37:41 +
+++ src/diagnostics/diagnostic_en.xml	2012-07-20 23:54:20 +
@@ -2254,7 +2254,7 @@
 
 
 
-  "$1": index general multikey
+  "$1": number of key expressions for general indexes is restricted to one expression
 
 
 

=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
--- src/diagnostics/pregenerated/dict_en.cpp	2012-07-17 13:37:41 +
+++ src/diagnostics/pregenerated/dict_en.cpp	2012-07-20 23:54:20 +
@@ -380,7 +380,7 @@
   { "ZDST0032", "\"$1\": index references context item" },
   { "ZDST0033", "\"$1\": index non-simple expression" },
   { "ZDST0034", "\"$1\": index can not do automatic maintenance" },
-  { "ZDST0035", "\"$1\": index general multikey" },
+  { "ZDST0035", "\"$1\": number of key expressions for general indexes is restricted one expression" },
   { "ZDST0036", "\"$1\": index declaration in foreign module" },
   { "ZDST0041", "\"$1\": integrity constraint already declared" },
   { "ZDST0044", "\"$1\": integrity constraint declaration not allowed in main module" },

=== modified file 'src/functions/library.cpp'
--- src/functions/library.cpp	2012-07-12 17:29:55 +
+++ src/functions/library.cpp	2012-07-20 23:54:20 +
@@ -41,6 +41,7 @@
 #include "functions/func_fnput.h"
 #includ

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

2012-07-20 Thread Matthias Brantner
Matthias Brantner has proposed merging lp:~zorba-coders/zorba/bug900677 into 
lp:zorba.

Requested reviews:
  Matthias Brantner (matthias-brantner)
  Markos Zaharioudakis (markos-za)
  William Candillon (wcandillon)
Related bugs:
  Bug #900677 in Zorba: "XQDDF access-keys($index) function"
  https://bugs.launchpad.net/zorba/+bug/900677

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

Added a keys() function to the index dml module. This fixes bug #900677.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug900677/+merge/116097
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2012-07-20 02:54:05 +
+++ ChangeLog	2012-07-20 23:52:30 +
@@ -17,6 +17,8 @@
 http://www.zorba-xquery.com/modules/store/data-structures/unordered-map module.
   * Added support for fragments to fn:path
   * Positional pagination support for collections
+  * Added a function to the http://www.zorba-xquery.com/modules/store/static/indexes/dml module which returns
+the value of all keys contained in an index.
   * Incremental maintenance for general indexes.
 	
 Optimizations:

=== modified file 'doc/zorba/xqddf.dox'
--- doc/zorba/xqddf.dox	2012-07-12 17:29:55 +
+++ doc/zorba/xqddf.dox	2012-07-20 23:52:30 +
@@ -1984,6 +1984,27 @@
 
 
 
+\subsection index_keys Retrieving Index Keys
+In addition to probing an index, the idml module also provides a function that allows listing all the keys contained in an index.
+
+\code
+  idml:keys($indexName as xs:QName) as item()*
+\endcode
+
+This function returns a sequence of element nodes.
+Each node in the sequence represents one key contained in the index and has the following structure:
+
+\code
+ http://www.zorba-xquery.com/modules/store/static/indexes/dml";>
+   
+   ...
+   
+ 
+\endcode
+
+The order of the attribute elements reflects the order of the key specifications in the declaration of the index.
+Also, the types of the values of the attributes are the types of the keys as they are declared.
+If a value attribute is not present, this means that the value of the corresponding key in the index is the empty sequence.
 
 \subsection index_maintenance Index Maintenance
 

=== modified file 'modules/com/zorba-xquery/www/modules/store/static/indexes/dml.xq'
--- modules/com/zorba-xquery/www/modules/store/static/indexes/dml.xq	2012-07-12 17:29:55 +
+++ modules/com/zorba-xquery/www/modules/store/static/indexes/dml.xq	2012-07-20 23:52:30 +
@@ -268,3 +268,27 @@
  :)
 declare updating function idml:refresh-index($name as xs:QName) external;
 
+(:~
+ : The keys function returns a sequence of all keys contained in the
+ : index with the given name. Each element has the following structure:
+ :   
+ :   ;
+ : 
+ : 
+ : 
+ :   
+ :   
+ :
+ : @param $name The QName of the index
+ : @return The result of the function is sequence of elements each representing
+ : one key contained in the index.
+ : 
+ : Note that the order of the attribute elements reflects the order of
+ : the keys in the index specification. Also note that the values in
+ : these attributes have the type that is declared in the corresponding
+ : index specification. 
+ :
+ : @error zerr:ZDDY0021 if the index with name $name is not declared.
+ : @error zerr:ZDDY0023 if the index with name $name does not exist.
+ :)
+declare function idml:keys($name as xs:QName) as node()* external;

=== modified file 'src/diagnostics/diagnostic_en.xml'
--- src/diagnostics/diagnostic_en.xml	2012-07-17 13:37:41 +
+++ src/diagnostics/diagnostic_en.xml	2012-07-20 23:52:30 +
@@ -2254,7 +2254,7 @@
 
 
 
-  "$1": index general multikey
+  "$1": number of key expressions for general indexes is restricted to one expression
 
 
 

=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
--- src/diagnostics/pregenerated/dict_en.cpp	2012-07-17 13:37:41 +
+++ src/diagnostics/pregenerated/dict_en.cpp	2012-07-20 23:52:30 +
@@ -380,7 +380,7 @@
   { "ZDST0032", "\"$1\": index references context item" },
   { "ZDST0033", "\"$1\": index non-simple expression" },
   { "ZDST0034", "\"$1\": index can not do automatic maintenance" },
-  { "ZDST0035", "\"$1\": index general multikey" },
+  { "ZDST0035", "\"$1\": number of key expressions for general indexes is restricted one expression" },
   { "ZDST0036", "\"$1\": index declaration in foreign module" },
   { "ZDST0041", "\"$1\": integrity constraint already declared" },
   { "ZDST0044", "\"$1\": integrity constraint declaration not allowed in main module" },

=== modified file 'src/functions/library.cpp'
--- src/functions/library.cpp	2012-07-12 17:29:55 +
+++ src/functions/library.cpp	2012-07-20 23:52:30 +
@@ -41,6 +41,7 @@
 #include "functions/func_fnput.h"

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

2012-07-12 Thread Markos Zaharioudakis
Also, the documentation should say that the function is not yet implemented for 
general indexes, and the implementation should throw an error in this case.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug900677/+merge/88973
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/bug900677 into lp:zorba

2012-07-12 Thread Markos Zaharioudakis
Review: Needs Fixing


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

2012-07-12 Thread Markos Zaharioudakis
1. The function::producesDistinctNodes() and function::producesSortedNodes() 
methods must be redefined for the keys function.

2. Why not use element()* as the return type of keys?

3. IndexKeysIterator::nextImpl() create a new QName (lKeyNodeName) every time 
it is called, and the same QName is created again (!) in 
createIndexKeyElement(). The QName must be created only once, in the 
IndexKeysIterator constructor and stored as a data member. Same for the other 
constant qnames used in the constructed XML tree.

4. No need for a new file and class to implement function 
createIndexKeyElement(). You can just add it as a static function in 
index_func_impl.cpp

5. The type of the value attribute should be xs:untypedAtomic, not xs:untyped
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug900677/+merge/88973
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/bug900677 into lp:zorba

2012-01-20 Thread William Candillon
> > > > Should the actual atomic type be present in the attribute element?
> > > What's the use case for this? The type is declared in the index which
> should
> > > be know by the user. It could be done but it's not clear how this would
> look
> > > like. Do you want the QName of the atomic type of the sequence type?
> > >
> > > > If you have "by @id" where @id can be 1 or "1", you might want to create
> > two
> > > > index keys?
> > > I don't understand this.
> > Is it possible to have an index key as xs:anyAtomicType?
> > If yes, you might have an index key of value xs:string("1") and another key
> of
> > value xs:integer(1).
> > Is this use case possible?
> >
> 
> It is not for value indexes, but it is for general indexes. Currently, the
> keys() function is not implemented for general indexes. If it is implemented
> for general indexes, then the type info should be included.
> 
> 
> > >
> > > > If a key returns (), you might want to distinguish with empty string for
> > > > probing later?
> > > I have made a fix such that the value attribute is only present if the
> entry
> > > is not the empty sequence.
> > Cool.
> > Consider the following index key declaration:
> > by xs:string(@team) as xs:string,
> >xs:string(@country) as xs:string?,
> >xs:string(@league) as xs:string?;
> >
> > If keys() returns:
> > 
> >   
> >   
> > 
> > It's not good because I cannot probe the index with this info.
> > Does it makes sense?
> >
> Yes, William is right. I think we need an extra attribute per key item. The
> attribute name would be something like "is_empty", and its value "true" or
> "false". The is_empty attribute could be optional; if it is not there, "false"
> is implied.
> 
> By the way, I really dislike "attribute" as the tag name of an element.
> Something like "key_item" would have been much better.
> 
> > >
> > >
> > > > By using keys(), I got the following output:
> > > > http://www.zorba-
> > > > xquery.com/modules/store/static/indexes/dml"> > > > value="hello">
> > > >
> > > > Is the namespace useful or does it just make the life of the user
> harder?
> > > It's consistent with the keys function of the maps module. We can remove
> it
> > > but should remove it for both then (which is a backwards incompatible
> > change).
> > I would fix it here and fix it for map() in 3.0.
> > Except if the local name attribute means something.
> >
> 
> I don't have a strong preference for this. Either way looks ok to me.
So sorry it's a mistake from me, I meant to write about the local-name 
attribute, I'm fine with the namespace.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug900677/+merge/88973
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/bug900677 into lp:zorba

2012-01-20 Thread Markos Zaharioudakis
> > > Should the actual atomic type be present in the attribute element?
> > What's the use case for this? The type is declared in the index which should
> > be know by the user. It could be done but it's not clear how this would look
> > like. Do you want the QName of the atomic type of the sequence type?
> >
> > > If you have "by @id" where @id can be 1 or "1", you might want to create
> two
> > > index keys?
> > I don't understand this.
> Is it possible to have an index key as xs:anyAtomicType?
> If yes, you might have an index key of value xs:string("1") and another key of
> value xs:integer(1).
> Is this use case possible?
> 

It is not for value indexes, but it is for general indexes. Currently, the 
keys() function is not implemented for general indexes. If it is implemented 
for general indexes, then the type info should be included.


> >
> > > If a key returns (), you might want to distinguish with empty string for
> > > probing later?
> > I have made a fix such that the value attribute is only present if the entry
> > is not the empty sequence.
> Cool.
> Consider the following index key declaration:
> by xs:string(@team) as xs:string,
>xs:string(@country) as xs:string?,
>xs:string(@league) as xs:string?;
> 
> If keys() returns:
> 
>   
>   
> 
> It's not good because I cannot probe the index with this info.
> Does it makes sense?
> 
Yes, William is right. I think we need an extra attribute per key item. The 
attribute name would be something like "is_empty", and its value "true" or 
"false". The is_empty attribute could be optional; if it is not there, "false" 
is implied.

By the way, I really dislike "attribute" as the tag name of an element. 
Something like "key_item" would have been much better.
 
> >
> >
> > > By using keys(), I got the following output:
> > > http://www.zorba-
> > > xquery.com/modules/store/static/indexes/dml"> > > value="hello">
> > >
> > > Is the namespace useful or does it just make the life of the user harder?
> > It's consistent with the keys function of the maps module. We can remove it
> > but should remove it for both then (which is a backwards incompatible
> change).
> I would fix it here and fix it for map() in 3.0.
> Except if the local name attribute means something.
> 

I don't have a strong preference for this. Either way looks ok to me.


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

2012-01-20 Thread Markos Zaharioudakis
Matthias, the function is not implemented for general indexes, right? If yes, 
you should say this in the documentation and raise appropriate error in the 
code, unless you plan to extend it to general indexes before the next release.

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

2012-01-20 Thread William Candillon
I hope that these comments are a little bit more clear.
I'm just trying to make sure of a single thing which is:
- Anything that is returned by keys() must be easily fed back in 
probe-index-point()

Therefore I'm wondering about index key types and index keys with empty 
sequence.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug900677/+merge/88973
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/bug900677 into lp:zorba

2012-01-20 Thread William Candillon
> > Should the actual atomic type be present in the attribute element?
> What's the use case for this? The type is declared in the index which should
> be know by the user. It could be done but it's not clear how this would look
> like. Do you want the QName of the atomic type of the sequence type?
> 
> > If you have "by @id" where @id can be 1 or "1", you might want to create two
> > index keys?
> I don't understand this.
Is it possible to have an index key as xs:anyAtomicType?
If yes, you might have an index key of value xs:string("1") and another key of 
value xs:integer(1).
Is this use case possible?

> 
> > If a key returns (), you might want to distinguish with empty string for
> > probing later?
> I have made a fix such that the value attribute is only present if the entry
> is not the empty sequence.
Cool.
Consider the following index key declaration:
by xs:string(@team) as xs:string,
   xs:string(@country) as xs:string?,
   xs:string(@league) as xs:string?;
   
If keys() returns:

  
  

It's not good because I cannot probe the index with this info.
Does it makes sense?

> 
> 
> > By using keys(), I got the following output:
> > http://www.zorba-
> > xquery.com/modules/store/static/indexes/dml"> > value="hello">
> >
> > Is the namespace useful or does it just make the life of the user harder?
> It's consistent with the keys function of the maps module. We can remove it
> but should remove it for both then (which is a backwards incompatible change).
I would fix it here and fix it for map() in 3.0.
Except if the local name attribute means something.

> 
> > Why isn't it:
> > 
> > Again, could you explain me how I'm supposed to probe from such XDM if one
> of
> > the actual key returned empty sequence?
> Is there a way to probe for entries where one of the keys is the empty
> sequence? I don't think there
> is. We should have a separate bug for this.
In Sausalito it's possible.
It was the only way to replace a particular query with an index.
How do we go forward on this?

> 
> > Should the keys have a position attribute or something?
> The index of the attribute elements determines the position. Is an additional
> attribute really needed?
> 
> > The doc/zorba/xqddf.dox doesn't seem to mention the function, it should no?
> Yes, that's done.
> 
> > > The xqdoc seems to have a formatting problem: the output example for
> keys()
> > goes out of its box.
> Fixed.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug900677/+merge/88973
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/bug900677 into lp:zorba

2012-01-18 Thread Matthias Brantner
Review: Needs Information

> Should the actual atomic type be present in the attribute element?
What's the use case for this? The type is declared in the index which should be 
know by the user. It could be done but it's not clear how this would look like. 
Do you want the QName of the atomic type of the sequence type?

> If you have "by @id" where @id can be 1 or "1", you might want to create two
> index keys?
I don't understand this.

> If a key returns (), you might want to distinguish with empty string for
> probing later?
I have made a fix such that the value attribute is only present if the entry is 
not the empty sequence.


> By using keys(), I got the following output:
> http://www.zorba-
> xquery.com/modules/store/static/indexes/dml"> value="hello">
> 
> Is the namespace useful or does it just make the life of the user harder?
It's consistent with the keys function of the maps module. We can remove it but 
should remove it for both then (which is a backwards incompatible change).

> Why isn't it:
> 
> Again, could you explain me how I'm supposed to probe from such XDM if one of
> the actual key returned empty sequence? 
Is there a way to probe for entries where one of the keys is the empty 
sequence? I don't think there
is. We should have a separate bug for this.

> Should the keys have a position attribute or something?
The index of the attribute elements determines the position. Is an additional 
attribute really needed?

> The doc/zorba/xqddf.dox doesn't seem to mention the function, it should no?
Yes, that's done.

> > The xqdoc seems to have a formatting problem: the output example for keys()
> goes out of its box.
Fixed.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug900677/+merge/88973
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/bug900677 into lp:zorba

2012-01-18 Thread William Candillon
Review: Needs Information

It looks very good.

Should the actual atomic type be present in the attribute element?
If you have "by @id" where @id can be 1 or "1", you might want to create two 
index keys?
If a key returns (), you might want to distinguish with empty string for 
probing later?

By using keys(), I got the following output:
http://www.zorba-xquery.com/modules/store/static/indexes/dml";>

Is the namespace useful or does it just make the life of the user harder?
Why isn't it:

Again, could you explain me how I'm supposed to probe from such XDM if one of 
the actual key returned empty sequence? Should the keys have a position 
attribute or something?

The doc/zorba/xqddf.dox doesn't seem to mention the function, it should no?

The xqdoc seems to have a formatting problem: the output example for keys() 
goes out of its box.

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

2012-01-17 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/bug900677 into lp:zorba has been 
updated.

Status: Approved => Needs review

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

2012-01-17 Thread Zorba Build Bot
Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1. 
Got: 3 Pending.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug900677/+merge/88973
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/bug900677 into lp:zorba

2012-01-17 Thread Zorba Build Bot
Validation queue job bug900677-2012-01-18T01-16-57.605Z is finished. The final 
status was:

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

2012-01-17 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/bug900677-2012-01-18T01-16-57.605Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug900677/+merge/88973
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/bug900677 into lp:zorba

2012-01-17 Thread Matthias Brantner
The proposal to merge lp:~zorba-coders/zorba/bug900677 into lp:zorba has been 
updated.

Status: Needs review => Approved

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

2012-01-17 Thread Matthias Brantner
The proposal to merge lp:~zorba-coders/zorba/bug900677 into lp:zorba has been 
updated.

Commit Message changed to:

Added a keys() function to the index dml module. This fixes bug #900677.

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

2012-01-17 Thread Matthias Brantner
Matthias Brantner has proposed merging lp:~zorba-coders/zorba/bug900677 into 
lp:zorba.

Requested reviews:
  Markos Zaharioudakis (markos-za)
  William Candillon (wcandillon)
Related bugs:
  Bug #900677 in Zorba: "XQDDF access-keys($index) function"
  https://bugs.launchpad.net/zorba/+bug/900677

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

Added a keys() function to the index dml module. This fixes bug #900677.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug900677/+merge/88973
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2012-01-11 17:30:25 +
+++ ChangeLog	2012-01-18 01:10:33 +
@@ -21,6 +21,8 @@
 support.
   * zerr is not predeclared anymore to be http://www.zorba-xquery.com/errors
   * Added API method Item::getNamespaceBindings().
+  * Added a function to the http://www.zorba-xquery.com/modules/store/static/indexes/dml module which returns
+the value of all keys contained in an index.
 
 version 2.1
 

=== modified file 'modules/com/zorba-xquery/www/modules/store/static/indexes/dml.xq'
--- modules/com/zorba-xquery/www/modules/store/static/indexes/dml.xq	2011-11-01 15:59:24 +
+++ modules/com/zorba-xquery/www/modules/store/static/indexes/dml.xq	2012-01-18 01:10:33 +
@@ -268,3 +268,28 @@
  :)
 declare updating function idml:refresh-index($name as xs:QName) external;
 
+(:~
+ : The keys function returns a sequence of all keys contained in the
+ : index with the given name.
+ :
+ : @param $name The QName of the index
+ : @return The result of the function is sequence of elements each representing
+ : one key contained in the index. Each element has the following
+ : structure:
+ : 
+ : 
+ :   
+ :   
+ :   
+ : 
+ : 
+ : 
+ : Note that the order of the attribute elements reflects the order of
+ : the keys in the index specification. Also note that the values in
+ : these attributes have the type that is declared in the corresponding
+ : index specification. 
+ :
+ : @error zerr:ZDDY0021 if the index with name $name is not declared.
+ : @error zerr:ZDDY0023 if the index with name $name does not exist.
+ :)
+declare function idml:keys($name as xs:QName) as node()* external;

=== modified file 'src/functions/library.cpp'
--- src/functions/library.cpp	2011-10-14 07:35:51 +
+++ src/functions/library.cpp	2012-01-18 01:10:33 +
@@ -41,6 +41,7 @@
 #include "functions/func_fnput.h"
 #include "functions/func_hoist.h"
 #include "functions/func_index_ddl.h"
+#include "functions/func_index_func.h"
 #include "functions/func_ic_ddl.h"
 #include "functions/func_maths.h"
 #include "functions/func_nodes.h"
@@ -106,6 +107,7 @@
   populate_context_errors_and_diagnostics(sctx);
   populate_context_fnput(sctx);
   populate_context_index_ddl(sctx);
+  populate_context_index_func(sctx);
   populate_context_ic_ddl(sctx);
   populate_context_maths(sctx);
   populate_context_nodes(sctx);

=== added file 'src/functions/pregenerated/func_index_func.cpp'
--- src/functions/pregenerated/func_index_func.cpp	1970-01-01 00:00:00 +
+++ src/functions/pregenerated/func_index_func.cpp	2012-01-18 01:10:33 +
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// **
+// **
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME   *
+// **
+// **
+
+
+#include "stdafx.h"
+#include "runtime/indexing/index_func.h"
+#include "functions/func_index_func.h"
+
+
+namespace zorba{
+
+
+
+PlanIter_t zorba_store_indexes_static_dml_keys::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector& argv,
+  AnnotationHolder& ann) const
+{
+  return new IndexKeysIterator(sctx, loc, argv);
+}
+
+void populate_context_index_func(static_context* sctx)
+{
+  {
+
+
+DECL_WITH_KIND(sctx, zorba_store_indexes_static_dml_keys,
+(createQName("http://www.zorba-xquery.com/modules/store/static/indexes/dml","","keys";), 
+GENV_TYPESYSTEM.QNAME_TYPE_ONE, 
+GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR),
+FunctionCons

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

2012-01-17 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/bug900677 into lp:zorba has been 
updated.

Status: Approved => Needs review

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

2012-01-17 Thread Zorba Build Bot
The attempt to merge lp:~zorba-coders/zorba/bug900677 into lp:zorba failed. 
Below is the output from the failed tests.


CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:273 
(message):
  Validation queue job bug900677-2012-01-18T01-02-56.733Z is finished.  The
  final status was:

  

  No tests were run - build or configure step must have failed.

  Not commiting changes.


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

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

2012-01-17 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/bug900677-2012-01-18T01-02-56.733Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug900677/+merge/88972
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/bug900677 into lp:zorba

2012-01-17 Thread Matthias Brantner
The proposal to merge lp:~zorba-coders/zorba/bug900677 into lp:zorba has been 
updated.

Status: Needs review => Approved

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

2012-01-17 Thread Matthias Brantner
Matthias Brantner has proposed merging lp:~zorba-coders/zorba/bug900677 into 
lp:zorba.

Requested reviews:
  Markos Zaharioudakis (markos-za)
  William Candillon (wcandillon)
Related bugs:
  Bug #900677 in Zorba: "XQDDF access-keys($index) function"
  https://bugs.launchpad.net/zorba/+bug/900677

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

Added a keys() function to the index dml module. This fixes bug #900677.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug900677/+merge/88972
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2012-01-11 17:30:25 +
+++ ChangeLog	2012-01-18 01:01:25 +
@@ -21,6 +21,8 @@
 support.
   * zerr is not predeclared anymore to be http://www.zorba-xquery.com/errors
   * Added API method Item::getNamespaceBindings().
+  * Added a function to the http://www.zorba-xquery.com/modules/store/static/indexes/dml module which returns
+the value of all keys contained in an index.
 
 version 2.1
 

=== modified file 'modules/com/zorba-xquery/www/modules/store/static/indexes/dml.xq'
--- modules/com/zorba-xquery/www/modules/store/static/indexes/dml.xq	2011-11-01 15:59:24 +
+++ modules/com/zorba-xquery/www/modules/store/static/indexes/dml.xq	2012-01-18 01:01:25 +
@@ -268,3 +268,28 @@
  :)
 declare updating function idml:refresh-index($name as xs:QName) external;
 
+(:~
+ : The keys function returns a sequence of all keys contained in the
+ : index with the given name.
+ :
+ : @param $name The QName of the index
+ : @return The result of the function is sequence of elements each representing
+ : one key contained in the index. Each element has the following
+ : structure:
+ : 
+ : 
+ :   
+ :   
+ :   
+ : 
+ : 
+ : 
+ : Note that the order of the attribute elements reflects the order of
+ : the keys in the index specification. Also note that the values in
+ : these attributes have the type that is declared in the corresponding
+ : index specification. 
+ :
+ : @error zerr:ZDDY0021 if the index with name $name is not declared.
+ : @error zerr:ZDDY0023 if the index with name $name does not exist.
+ :)
+declare function idml:keys($name as xs:QName) as node()* external;

=== modified file 'src/functions/library.cpp'
--- src/functions/library.cpp	2011-10-14 07:35:51 +
+++ src/functions/library.cpp	2012-01-18 01:01:25 +
@@ -41,6 +41,7 @@
 #include "functions/func_fnput.h"
 #include "functions/func_hoist.h"
 #include "functions/func_index_ddl.h"
+#include "functions/func_index_func.h"
 #include "functions/func_ic_ddl.h"
 #include "functions/func_maths.h"
 #include "functions/func_nodes.h"
@@ -106,6 +107,7 @@
   populate_context_errors_and_diagnostics(sctx);
   populate_context_fnput(sctx);
   populate_context_index_ddl(sctx);
+  populate_context_index_func(sctx);
   populate_context_ic_ddl(sctx);
   populate_context_maths(sctx);
   populate_context_nodes(sctx);

=== added file 'src/functions/pregenerated/func_index_func.cpp'
--- src/functions/pregenerated/func_index_func.cpp	1970-01-01 00:00:00 +
+++ src/functions/pregenerated/func_index_func.cpp	2012-01-18 01:01:25 +
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2006-2008 The FLWOR Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+// **
+// **
+// * THIS IS A GENERATED FILE. DO NOT EDIT! *
+// * SEE .xml FILE WITH SAME NAME   *
+// **
+// **
+
+
+#include "stdafx.h"
+#include "runtime/indexing/index_func.h"
+#include "functions/func_index_func.h"
+
+
+namespace zorba{
+
+
+
+PlanIter_t zorba_store_indexes_static_dml_keys::codegen(
+  CompilerCB*,
+  static_context* sctx,
+  const QueryLoc& loc,
+  std::vector& argv,
+  AnnotationHolder& ann) const
+{
+  return new IndexKeysIterator(sctx, loc, argv);
+}
+
+void populate_context_index_func(static_context* sctx)
+{
+  {
+
+
+DECL_WITH_KIND(sctx, zorba_store_indexes_static_dml_keys,
+(createQName("http://www.zorba-xquery.com/modules/store/static/indexes/dml","","keys";), 
+GENV_TYPESYSTEM.QNAME_TYPE_ONE, 
+GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR),
+FunctionCons