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

2011-11-07 Thread Nicolae Brinza
The proposal to merge lp:~nbrinza/zorba/bugs into lp:zorba has been updated.

Status: Needs review => Approved

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

2011-11-07 Thread Nicolae Brinza
Nicolae Brinza has proposed merging lp:~nbrinza/zorba/bugs into lp:zorba.

Requested reviews:
  Matthias Brantner (matthias-brantner)
Related bugs:
  Bug #867256 in Zorba: ""instance of document-node(element(x))" in predicate"
  https://bugs.launchpad.net/zorba/+bug/867256

For more details, see:
https://code.launchpad.net/~nbrinza/zorba/bugs/+merge/81480

Fix for lp: bug #867256 - test Steps-leading-lone-slash-8a is failing
-- 
https://code.launchpad.net/~nbrinza/zorba/bugs/+merge/81480
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2011-11-04 11:40:20 +
+++ ChangeLog	2011-11-07 18:34:31 +
@@ -1,7 +1,8 @@
 Zorba - The XQuery Processor
 
 version 2.x
-
+  
+  * Fixed bug #867256 (document-node(element(x)) types and tests were not working correctly)
   * Custom Full-text thesaurus.
   * Fixed bug #3401971 (node-by-reference on dynamic collections)
   * Optimization for positioned sequence access (e.g. $x[$x[1]] where $x is a

=== modified file 'src/types/typeimpl.cpp'
--- src/types/typeimpl.cpp	2011-07-01 05:22:12 +
+++ src/types/typeimpl.cpp	2011-11-07 18:34:31 +
@@ -361,7 +361,7 @@
 
 
 bool NodeXQType::is_subtype(
-const TypeManager* tm, 
+const TypeManager* tm,
 const NodeXQType& supertype,
 const QueryLoc& loc) const
 {
@@ -443,7 +443,7 @@
 
 
 bool NodeXQType::is_supertype(
-const TypeManager* tm, 
+const TypeManager* tm,
 const store::Item* subitem,
 const QueryLoc& loc) const
 {
@@ -488,14 +488,30 @@
 }
   }
 
-  if (m_node_kind != store::StoreConsts::elementNode && 
-  m_node_kind != store::StoreConsts::attributeNode)
+  // document-node( E ) matches any document node that contains exactly one element
+  // node, optionally accompanied by one or more comment and processing instruction
+  // nodes, if E is an ElementTest or SchemaElementTest that matches the element node.
+  bool is_element_test = (
+  m_node_kind == store::StoreConsts::documentNode &&
+  m_content_type != NULL &&
+  m_content_type->type_kind() == XQType::NODE_TYPE_KIND &&
+  dynamic_cast(m_content_type.getp())->m_schema_test == false);
+
+  if (m_node_kind != store::StoreConsts::elementNode &&
+  m_node_kind != store::StoreConsts::attributeNode &&
+  !is_element_test)
 return true;
 
   if (m_content_type == NULL ||
   m_content_type->type_kind() == XQType::ANY_TYPE_KIND)
 return true;
 
+  if (is_element_test)
+  {
+xqtref_t documentNodeType = tm->create_value_type(subitem, loc);
+return TypeOps::is_subtype(tm, *documentNodeType, *this);
+  }
+
   xqtref_t subContentType = tm->create_named_type(subitem->getType(),
   TypeConstants::QUANT_ONE,
   loc,

-- 
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:~nbrinza/zorba/bugs into lp:zorba

2011-11-07 Thread Nicolae Brinza
The proposal to merge lp:~nbrinza/zorba/bugs into lp:zorba has been updated.

Status: Needs review => Approved

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

2011-11-07 Thread Zorba Build Bot
The proposal to merge lp:~nbrinza/zorba/bugs into lp:zorba has been updated.

Status: Approved => Needs review

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

2011-11-07 Thread Zorba Build Bot
Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1. 
Got: 1 Approve.
-- 
https://code.launchpad.net/~nbrinza/zorba/bugs/+merge/81424
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:~nbrinza/zorba/bugs into lp:zorba

2011-11-07 Thread Zorba Build Bot
Validation queue job bugs-2011-11-07T18-09-02.8Z is finished. The final status 
was:

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

2011-11-07 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/bugs-2011-11-07T18-09-02.8Z/log.html
-- 
https://code.launchpad.net/~nbrinza/zorba/bugs/+merge/81424
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:~nbrinza/zorba/bugs into lp:zorba

2011-11-07 Thread Matthias Brantner
The proposal to merge lp:~nbrinza/zorba/bugs into lp:zorba has been updated.

Status: Needs review => Approved

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

2011-11-07 Thread Matthias Brantner
Review: Approve


-- 
https://code.launchpad.net/~nbrinza/zorba/bugs/+merge/81424
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:~nbrinza/zorba/bugs into lp:zorba

2011-11-07 Thread Zorba Build Bot
The proposal to merge lp:~nbrinza/zorba/bugs into lp:zorba has been updated.

Status: Approved => Needs review

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

2011-11-07 Thread Zorba Build Bot
Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1. 
Got: 1 Pending.
-- 
https://code.launchpad.net/~nbrinza/zorba/bugs/+merge/81424
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:~nbrinza/zorba/bugs into lp:zorba

2011-11-07 Thread Zorba Build Bot
Validation queue job bugs-2011-11-07T17-48-33.425Z is finished. The final 
status was:

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

2011-11-07 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/bugs-2011-11-07T17-48-33.425Z/log.html
-- 
https://code.launchpad.net/~nbrinza/zorba/bugs/+merge/81424
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:~nbrinza/zorba/bugs into lp:zorba

2011-11-07 Thread Nicolae Brinza
The proposal to merge lp:~nbrinza/zorba/bugs into lp:zorba has been updated.

Status: Needs review => Approved

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

2011-11-07 Thread Zorba Build Bot
The proposal to merge lp:~nbrinza/zorba/bugs into lp:zorba has been updated.

Status: Approved => Needs review

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

2011-11-07 Thread Zorba Build Bot
Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1. 
Got: 1 Pending.
-- 
https://code.launchpad.net/~nbrinza/zorba/bugs/+merge/81424
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:~nbrinza/zorba/bugs into lp:zorba

2011-11-07 Thread Zorba Build Bot
Validation queue job bugs-2011-11-07T17-26-04.331Z is finished. The final 
status was:

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

2011-11-07 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/bugs-2011-11-07T17-26-04.331Z/log.html
-- 
https://code.launchpad.net/~nbrinza/zorba/bugs/+merge/81424
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:~nbrinza/zorba/bugs into lp:zorba

2011-11-07 Thread Matthias Brantner
The proposal to merge lp:~nbrinza/zorba/bugs into lp:zorba has been updated.

Commit Message changed to:

Fix for lp: bug #867256 - test Steps-leading-lone-slash-8a is failing

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

2011-11-07 Thread Matthias Brantner
The proposal to merge lp:~nbrinza/zorba/bugs into lp:zorba has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~nbrinza/zorba/bugs/+merge/81424
-- 
https://code.launchpad.net/~nbrinza/zorba/bugs/+merge/81424
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