[Zorba-coders] [Bug 948712] [NEW] xqdoc: add schema import info
Public bug reported: In the documentation of the modules that import schemas please give an easy way for people to do copy and paste the schema import statements (the same way we do with the module import). E.g. add a text like: "Please note that the schemas are not automatically imported in the modules that import this module. In order to import and use the schemas, please add: import schema "http://www.zorba-xquery.com/modules/full-text";; (OR WHATEVER SCHEMA) under the section Imported schemas: http://www.zorba-xquery.com/modules/full-text ** Affects: zorba Importance: Medium Assignee: Sorin Marian Nasoi (sorin.marian.nasoi) Status: In Progress ** Tags: xqdoc ** Changed in: zorba Status: New => In Progress -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/948712 Title: xqdoc: add schema import info Status in Zorba - The XQuery Processor: In Progress Bug description: In the documentation of the modules that import schemas please give an easy way for people to do copy and paste the schema import statements (the same way we do with the module import). E.g. add a text like: "Please note that the schemas are not automatically imported in the modules that import this module. In order to import and use the schemas, please add: import schema "http://www.zorba-xquery.com/modules/full-text";; (OR WHATEVER SCHEMA) under the section Imported schemas: http://www.zorba-xquery.com/modules/full-text To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/948712/+subscriptions -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug-945241 into lp:zorba has been updated. Status: Approved => Needs review For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 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-945241 into lp:zorba
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/bug-945241/+merge/96278 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
Validation queue job bug-945241-2012-03-07T02-56-08.435Z is finished. The final status was: All tests succeeded! -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 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/bug935639 into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
Validation queue starting for merge proposal. Log at: http://zorbatest.lambda.nu:8080/remotequeue/bug-945241-2012-03-07T02-56-08.435Z/log.html -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug-945241 into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug-945241 into lp:zorba has been updated. Status: Approved => Needs review For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 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-945241 into lp:zorba
The attempt to merge lp:~zorba-coders/zorba/bug-945241 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 bug-945241-2012-03-07T01-40-12.143Z 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/bug-945241/+merge/96278 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
Validation queue starting for merge proposal. Log at: http://zorbatest.lambda.nu:8080/remotequeue/bug-945241-2012-03-07T01-40-12.143Z/log.html -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 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-945241 into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug-945241 into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug-945241 into lp:zorba has been updated. Commit Message changed to: StaticCollectionManager::declaredIndexes() doesn't return temporary indexes anymore. Also isDeclaredIndex also doesn't return true if asked whether a temporary index is declared. For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
Matthias Brantner has proposed merging lp:~zorba-coders/zorba/bug-945241 into lp:zorba. Requested reviews: Matthias Brantner (matthias-brantner) Till Westmann (tillw) Related bugs: Bug #945241 in Zorba: "StaticCollectionManager::declaredIndexes() and temporary indexes" https://bugs.launchpad.net/zorba/+bug/945241 For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 StaticCollectionManager::declaredIndexes() doesn't return temporary indexes anymore. Also isDeclaredIndex also doesn't return true if asked whether a temporary index is declared. -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/96278 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'ChangeLog' --- ChangeLog 2012-03-06 22:43:17 + +++ ChangeLog 2012-03-07 01:39:21 + @@ -26,6 +26,7 @@ case of early-out) * More efficient implementation for base64Binary items * Added index management function to the C++ api's StaticCollectionManager. + * Fixed bug #945241 (StaticCollectionManager::declaredIndexes() and temporary indexes) * Fixed bug #872288 (reset recursive flag during node rename) * Fixed bug #905041 (allow for the default element and function namespaces to be set multiple times via the c++ api). === modified file 'src/runtime/collections/collections_impl.cpp' --- src/runtime/collections/collections_impl.cpp 2012-02-16 12:48:17 + +++ src/runtime/collections/collections_impl.cpp 2012-03-07 01:39:21 + @@ -30,6 +30,7 @@ #include "context/uri_resolver.h" #include "context/static_context_consts.h" +#include "compiler/xqddf/value_index.h" #include "compiler/xqddf/value_ic.h" #include "runtime/collections/collections.h" @@ -2331,20 +2332,21 @@ PlanState& aPlanState) const { store::Item_t lName; + zorba::IndexDecl* lDecl; PlanIteratorState* lState; DEFAULT_STACK_INIT(PlanIteratorState, lState, aPlanState); consumeNext(lName, theChildren[0].getp(), aPlanState); - if (theSctx->lookup_index(lName.getp()) == 0) + if ((lDecl = theSctx->lookup_index(lName.getp())) && !lDecl->isTemp()) + { +STACK_PUSH(GENV_ITEMFACTORY->createBoolean(aResult, true), lState); + } + else { STACK_PUSH(GENV_ITEMFACTORY->createBoolean(aResult, false), lState); } - else - { -STACK_PUSH(GENV_ITEMFACTORY->createBoolean(aResult, true), lState); - } STACK_END(lState); } @@ -2386,6 +2388,10 @@ for ((lState->nameItState = theSctx->index_names())->open(); lState->nameItState->next(lName); ) { +if (theSctx->lookup_index(lName.getp())->isTemp()) +{ + continue; +} aResult = lName; STACK_PUSH(true, lState); } === modified file 'test/unit/module1.xq' --- test/unit/module1.xq 2011-08-05 02:21:55 + +++ test/unit/module1.xq 2012-03-07 01:39:21 + @@ -18,4 +18,4 @@ import module namespace ddl = "http://www.zorba-xquery.com/modules/store/static/collections/ddl";; -1+1 +mod2:foo() === modified file 'test/unit/module2.xq' --- test/unit/module2.xq 2011-12-21 14:40:33 + +++ test/unit/module2.xq 2012-03-07 01:39:21 + @@ -27,3 +27,14 @@ declare index mod2:index on nodes ddl:collection(xs:QName("mod2:coll")) by data(@id) as xs:string; + + +(: test that a temp index doesn't have impact on the indexes + returned by the static collection mgr :) +declare function mod2:foo() +{ + for $i in 1 to 10 + for $j in 1 to 10 + where $i eq $j + return $i +}; === modified file 'test/unit/staticcollectionmanager.cpp' --- test/unit/staticcollectionmanager.cpp 2012-03-05 23:44:54 + +++ test/unit/staticcollectionmanager.cpp 2012-03-07 01:39:21 + @@ -206,23 +206,25 @@ Item lCollName2 = lFac->createQName("http://www.mod2.com/";, "coll"); lColMgr->createCollection(lCollName2); - Collection_t lColl = lColMgr->getCollection(lCollName2); - - std::vector lAnnotations; - lColl->getAnnotations(lAnnotations); - size_t num_annotations = 0; - for (std::vector::const_iterator lIter = lAnnotations.begin(); - lIter != lAnnotations.end(); ++lIter) - { -std::cout << "Annotation QName " << (*lIter)->getQName().getStringValue() << std::endl; -++num_annotations; - } - - if (num_annotations != 3) - { -return false; - } - + { +Collection_t lColl = lColMgr->getCollection(lCollName2); + +std::vector lAnnotations; +lColl->getAnnotations(lAnnotations); +size_t num_annotations = 0; +for (std::vector::const_iterator lIter = lAnnotations.begin(); + lIter != lAnnotations.end(); ++lIter) +{ + std::cout << "Annotation QName " << (*lIter)->getQName().getStringValue() << std::endl; + ++num_annotations; +} + +if (num_annotations != 3) +{ + return false; +} + } + lColMgr->deleteCollection(lCollName2); return true; } @@ -418,6 +420,46 @@ return true; } +/** + * test that declaredIndexes doesn't return temporary indexes and crashes + * if one tries to cre
[Zorba-coders] [Bug 891209] Re: validation with xsi:type returns untyped
** Changed in: zorba Status: In Progress => Fix Committed -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/891209 Title: validation with xsi:type returns untyped Status in Zorba - The XQuery Processor: Fix Committed Bug description: import module namespace schema = "http://www.zorba- xquery.com/modules/schema"; schema:schema-type( data( validate lax { 2 } ) ) To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/891209/+subscriptions -- 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/bug935639 into lp:zorba
Review: Needs Fixing The Zorba XQuery Processor manage => The Zorba XQuery Processor manages automaticall => automatically -- https://code.launchpad.net/~zorba-coders/zorba/bug935639/+merge/94900 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] [Bug 948259] Re: Store::getNodeReference() should take Item const*
This change would be backwards-compatible at the source level. It would not I think be backwards-compatible at the ABI level (I'm assuming, perhaps rashly, that C++ will generally mangle "const foo" differently than "foo"). However, given that the store isn't yet a public API or ever built separately from its implementations, this point is mostly moot. -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/948259 Title: Store::getNodeReference() should take Item const* Status in Zorba - The XQuery Processor: New Bug description: In the Store class, there is the function that currently has the signature: virtual bool getNodeReference(Item_t& result, Item* node) = 0; Specifically, it takes an Item* (pointer to non-constant Item) because it presumably mutates the Item object if it has to assign a node reference. However, the function signature should really be: virtual bool getNodeReference(Item_t& result, Item const* node) = 0; that is, take an Item const* (pointer to constant Item). The operation is "logically const." An implementation may choose not to alter the Item at all and instead store a mapping between Items and node references elsewhere. However, for an implementation that does store the node reference in an Item itself, that doesn't change the fact that the operation is still "logically const." The node reference data member should be made "mutable." Having the function take an Item* as it does now means that other classes elsewhere that return an Item const* for which you want to obtain its node reference must first const_cast the pointer which is ugly. For example, the FTToken class keeps an Item const* pointing to the Item whence the token came. There is no reason FTToken itself needs the Item to be non-const, hence it declares its data member as Item const*. However, in code elsewhere, we want to obtain the node reference for a token's Item like this: if ( store::Item const *const token_item = token->item() ) { store::Item *const temp = const_cast( token_item ); if ( GENV_STORE.getNodeReference( item, temp ) ) { // ... } } The introduction of the const_cast and temp is ugly and shouldn't be necessary. It would be even more ugly to change the FTToken class to use an Item* because then everything that passes an Item* to FTToken might have to be changed also, i.e., the non-const-ness would ripple throughout the code. Note that changing the function signature to the proposed one using const is a backwards *compatible* change because increasing "const- ness" is always so. (The reverse, however, i.e., making something that is const into non-const, is a backwards incompatible change.) To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/948259/+subscriptions -- 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/bug891209-xsiType into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug891209-xsiType into lp:zorba has been updated. Status: Approved => Merged For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug891209-xsiType/+merge/96248 -- https://code.launchpad.net/~zorba-coders/zorba/bug891209-xsiType/+merge/96248 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/bug891209-xsiType into lp:zorba
Validation queue job bug891209-xsiType-2012-03-06T22-14-04.152Z is finished. The final status was: All tests succeeded! -- https://code.launchpad.net/~zorba-coders/zorba/bug891209-xsiType/+merge/96248 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/bug891209-xsiType into lp:zorba
Validation queue starting for merge proposal. Log at: http://zorbatest.lambda.nu:8080/remotequeue/bug891209-xsiType-2012-03-06T22-14-04.152Z/log.html -- https://code.launchpad.net/~zorba-coders/zorba/bug891209-xsiType/+merge/96248 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/bug891209-xsiType into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug891209-xsiType into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug891209-xsiType/+merge/96248 -- https://code.launchpad.net/~zorba-coders/zorba/bug891209-xsiType/+merge/96248 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/bug891209-xsiType into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/bug891209-xsiType/+merge/96248 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/bug891209-xsiType into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug891209-xsiType into lp:zorba has been updated. Status: Approved => Needs review For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug891209-xsiType/+merge/96248 -- https://code.launchpad.net/~zorba-coders/zorba/bug891209-xsiType/+merge/96248 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/bug891209-xsiType into lp:zorba
Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1. Got: 3 Approve, 1 Pending. -- https://code.launchpad.net/~zorba-coders/zorba/bug891209-xsiType/+merge/96248 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/bug891209-xsiType into lp:zorba
Validation queue job bug891209-xsiType-2012-03-06T21-35-26.248Z is finished. The final status was: All tests succeeded! -- https://code.launchpad.net/~zorba-coders/zorba/bug891209-xsiType/+merge/96248 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/bug891209-xsiType into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/bug891209-xsiType/+merge/96248 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/bug891209-xsiType into lp:zorba
Validation queue starting for merge proposal. Log at: http://zorbatest.lambda.nu:8080/remotequeue/bug891209-xsiType-2012-03-06T21-35-26.248Z/log.html -- https://code.launchpad.net/~zorba-coders/zorba/bug891209-xsiType/+merge/96248 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/bug891209-xsiType into lp:zorba
Review: Approve Unfortunately there is cleaner way to know when dtd validation is required, this is the way to specify. I added a comment like Markos sugested. -- https://code.launchpad.net/~zorba-coders/zorba/bug891209-xsiType/+merge/96248 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/bug891209-xsiType into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug891209-xsiType into lp:zorba has been updated. Commit Message changed to: Fix for bug 891209 : validation with xsi:type returns untyped. For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug891209-xsiType/+merge/96248 -- https://code.launchpad.net/~zorba-coders/zorba/bug891209-xsiType/+merge/96248 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/bug891209-xsiType into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug891209-xsiType into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug891209-xsiType/+merge/96248 -- https://code.launchpad.net/~zorba-coders/zorba/bug891209-xsiType/+merge/96248 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/bug891209-xsiType into lp:zorba
Cezar Andrei has proposed merging lp:~zorba-coders/zorba/bug891209-xsiType into lp:zorba. Requested reviews: Markos Zaharioudakis (markos-za) Matthias Brantner (matthias-brantner) Related bugs: Bug #891209 in Zorba: "validation with xsi:type returns untyped" https://bugs.launchpad.net/zorba/+bug/891209 For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug891209-xsiType/+merge/96248 Fix for bug 891209 : validation with xsi:type returns untyped. Fixxed documentatation for new validation mode suggested by Markos. -- https://code.launchpad.net/~zorba-coders/zorba/bug891209-xsiType/+merge/96248 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'ChangeLog' --- ChangeLog 2012-03-06 03:24:29 + +++ ChangeLog 2012-03-06 21:33:31 + @@ -60,6 +60,7 @@ * Fixed bug with unversioned modules with C++ external functions * Fixed bug #878508 (JSON Module not escaping escape characters) * Fixed bug #912579 (validate-in-place on non-root elements) + * Fixed bug #891209 (validation with xsi:type returns untyped) version 2.1 === modified file 'include/zorba/static_context_consts.h' --- include/zorba/static_context_consts.h 2011-10-07 21:22:20 + +++ include/zorba/static_context_consts.h 2012-03-06 21:33:31 + @@ -57,8 +57,9 @@ /** \brief Revalidation mode as defined in * http://www.w3.org/TR/xquery-update-10/#id-revalidation-declaration + * Note: when DTD validation is needed the use of validate_lax_dtd is required. */ -typedef enum { validate_skip, validate_lax, validate_strict } validation_mode_t; +typedef enum { validate_skip, validate_lax, validate_lax_dtd, validate_strict } validation_mode_t; /** \brief Maintenance mode of an index as defined * in the XQuery Data Definition Facility === modified file 'src/api/staticcontextimpl.cpp' --- src/api/staticcontextimpl.cpp 2012-02-28 20:45:43 + +++ src/api/staticcontextimpl.cpp 2012-03-06 21:33:31 + @@ -1247,6 +1247,9 @@ case validate_lax: valMode = StaticContextConsts::lax_validation; break; + case validate_lax_dtd: +valMode = StaticContextConsts::lax_dtd_validation; +break; case validate_skip: valMode = StaticContextConsts::skip_validation; break; === modified file 'src/compiler/parser/parse_constants.h' --- src/compiler/parser/parse_constants.h 2011-06-14 17:26:33 + +++ src/compiler/parser/parse_constants.h 2012-03-06 21:33:31 + @@ -103,6 +103,7 @@ { val_strict, val_lax, + val_dtd_lax, val_typename }; === modified file 'src/context/static_context.cpp' --- src/context/static_context.cpp 2012-03-06 01:53:26 + +++ src/context/static_context.cpp 2012-03-06 21:33:31 + @@ -1742,10 +1742,19 @@ store::Item_t typeName; QueryLoc loc; -ParseConstants::validation_mode_t mode = -(validationMode == StaticContextConsts::strict_validation ? -ParseConstants::val_strict : -ParseConstants::val_lax ); +ParseConstants::validation_mode_t mode; +switch( validationMode ) +{ +case StaticContextConsts::strict_validation: + mode = ParseConstants::val_strict; + break; +case StaticContextConsts::lax_dtd_validation: + mode = ParseConstants::val_dtd_lax; + break; +case StaticContextConsts::lax_validation: +default: + mode = ParseConstants::val_lax; +} return Validator::effectiveValidationValue(validatedResult, rootElement, === modified file 'src/context/static_context_consts.h' --- src/context/static_context_consts.h 2012-01-11 17:30:25 + +++ src/context/static_context_consts.h 2012-03-06 21:33:31 + @@ -90,6 +90,7 @@ validation_unknown, strict_validation, lax_validation, +lax_dtd_validation, skip_validation }; === modified file 'src/types/schema/EventSchemaValidator.cpp' --- src/types/schema/EventSchemaValidator.cpp 2011-08-19 03:26:59 + +++ src/types/schema/EventSchemaValidator.cpp 2012-03-06 21:33:31 + @@ -163,7 +163,7 @@ StrX typeName(theSchemaValidatorFilter->getTypeName()); StrX typeUri(theSchemaValidatorFilter->getTypeUri()); - //cout << " - getTypeQName: " << typeName << "@" << typeUri <<" "; + //cout << " - getTypeQName: " << typeName << " @ " << typeUri <<" "; store::Item_t typeQName; GENV_ITEMFACTORY->createQName(typeQName, @@ -172,7 +172,7 @@ typeName.localFormOrDefault ("untyped")); //cout << " : " << typeQName->getLocalName() << " @ " - // << typeQName->getNamespace() <<"\n"; + // << typeQName->getNamespace() <<"\n"; std::cout.flush(); return typeQName; } === modified file 'src/types/schema/SchemaValidatorFilter.cpp' --- src/types/schema/SchemaValidatorFilter.cpp 2011-06-14 17:26:33 + +++ src/types/schema/SchemaValidatorFilter.cpp 2012-03-06 21:33:31 + @@ -867,7 +
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug-945241 into lp:zorba has been updated. Status: Approved => Needs review For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95704 -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95704 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-945241 into lp:zorba
Attempt to merge into lp:zorba failed due to conflicts: text conflict in test/unit/staticcollectionmanager.cpp -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95704 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-945241 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug-945241 into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95704 -- https://code.launchpad.net/~zorba-coders/zorba/bug-945241/+merge/95704 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~paul-lucas/zorba/bug-944826 into lp:zorba
The proposal to merge lp:~paul-lucas/zorba/bug-944826 into lp:zorba has been updated. Status: Approved => Merged For more details, see: https://code.launchpad.net/~paul-lucas/zorba/bug-944826/+merge/95589 -- https://code.launchpad.net/~paul-lucas/zorba/bug-944826/+merge/95589 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~paul-lucas/zorba/bug-944826 into lp:zorba
Validation queue job bug-944826-2012-03-06T18-52-59.572Z is finished. The final status was: All tests succeeded! -- https://code.launchpad.net/~paul-lucas/zorba/bug-944826/+merge/95589 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~paul-lucas/zorba/bug-944826 into lp:zorba
Validation queue starting for merge proposal. Log at: http://zorbatest.lambda.nu:8080/remotequeue/bug-944826-2012-03-06T18-52-59.572Z/log.html -- https://code.launchpad.net/~paul-lucas/zorba/bug-944826/+merge/95589 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] [Bug 948259] [NEW] Store::getNodeReference() should take Item const*
Public bug reported: In the Store class, there is the function that currently has the signature: virtual bool getNodeReference(Item_t& result, Item* node) = 0; Specifically, it takes an Item* (pointer to non-constant Item) because it presumably mutates the Item object if it has to assign a node reference. However, the function signature should really be: virtual bool getNodeReference(Item_t& result, Item const* node) = 0; that is, take an Item const* (pointer to constant Item). The operation is "logically const." An implementation may choose not to alter the Item at all and instead store a mapping between Items and node references elsewhere. However, for an implementation that does store the node reference in an Item itself, that doesn't change the fact that the operation is still "logically const." The node reference data member should be made "mutable." Having the function take an Item* as it does now means that other classes elsewhere that return an Item const* for which you want to obtain its node reference must first const_cast the pointer which is ugly. For example, the FTToken class keeps an Item const* pointing to the Item whence the token came. There is no reason FTToken itself needs the Item to be non-const, hence it declares its data member as Item const*. However, in code elsewhere, we want to obtain the node reference for a token's Item like this: if ( store::Item const *const token_item = token->item() ) { store::Item *const temp = const_cast( token_item ); if ( GENV_STORE.getNodeReference( item, temp ) ) { // ... } } The introduction of the const_cast and temp is ugly and shouldn't be necessary. It would be even more ugly to change the FTToken class to use an Item* because then everything that passes an Item* to FTToken might have to be changed also, i.e., the non-const-ness would ripple throughout the code. Note that changing the function signature to the proposed one using const is a backwards *compatible* change because increasing "const-ness" is always so. (The reverse, however, i.e., making something that is const into non-const, is a backwards incompatible change.) ** Affects: zorba Importance: Medium Assignee: Markos Zaharioudakis (markos-za) Status: New ** Tags: item store -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/948259 Title: Store::getNodeReference() should take Item const* Status in Zorba - The XQuery Processor: New Bug description: In the Store class, there is the function that currently has the signature: virtual bool getNodeReference(Item_t& result, Item* node) = 0; Specifically, it takes an Item* (pointer to non-constant Item) because it presumably mutates the Item object if it has to assign a node reference. However, the function signature should really be: virtual bool getNodeReference(Item_t& result, Item const* node) = 0; that is, take an Item const* (pointer to constant Item). The operation is "logically const." An implementation may choose not to alter the Item at all and instead store a mapping between Items and node references elsewhere. However, for an implementation that does store the node reference in an Item itself, that doesn't change the fact that the operation is still "logically const." The node reference data member should be made "mutable." Having the function take an Item* as it does now means that other classes elsewhere that return an Item const* for which you want to obtain its node reference must first const_cast the pointer which is ugly. For example, the FTToken class keeps an Item const* pointing to the Item whence the token came. There is no reason FTToken itself needs the Item to be non-const, hence it declares its data member as Item const*. However, in code elsewhere, we want to obtain the node reference for a token's Item like this: if ( store::Item const *const token_item = token->item() ) { store::Item *const temp = const_cast( token_item ); if ( GENV_STORE.getNodeReference( item, temp ) ) { // ... } } The introduction of the const_cast and temp is ugly and shouldn't be necessary. It would be even more ugly to change the FTToken class to use an Item* because then everything that passes an Item* to FTToken might have to be changed also, i.e., the non-const-ness would ripple throughout the code. Note that changing the function signature to the proposed one using const is a backwards *compatible* change because increasing "const- ness" is always so. (The reverse, however, i.e., making something that is const into non-const, is a backwards incompatible change.) To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/948259/+subscriptions -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@list
[Zorba-coders] [Merge] lp:~paul-lucas/zorba/bug-944826 into lp:zorba
The proposal to merge lp:~paul-lucas/zorba/bug-944826 into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~paul-lucas/zorba/bug-944826/+merge/95589 -- https://code.launchpad.net/~paul-lucas/zorba/bug-944826/+merge/95589 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/bug891209-xsiType into lp:zorba
I looks ok to me too, but the real changes are in code that I don't really understand much, so we have to trust Cezar on this. One thing though: the new dtd_lax validation mode in include/zorba/static_context_consts.h must be documented. The current comment there refers to XQUF spec, but the new flag is not there, of course. -- https://code.launchpad.net/~zorba-coders/zorba/bug891209-xsiType/+merge/96003 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/bug924987 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug924987 into lp:zorba has been updated. Status: Approved => Merged For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug924987/+merge/96047 -- https://code.launchpad.net/~zorba-coders/zorba/bug924987/+merge/96047 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/bug924987 into lp:zorba
Validation queue job bug924987-2012-03-06T14-10-21.545Z is finished. The final status was: All tests succeeded! -- https://code.launchpad.net/~zorba-coders/zorba/bug924987/+merge/96047 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/bug924987 into lp:zorba
Validation queue starting for merge proposal. Log at: http://zorbatest.lambda.nu:8080/remotequeue/bug924987-2012-03-06T14-10-21.545Z/log.html -- https://code.launchpad.net/~zorba-coders/zorba/bug924987/+merge/96047 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/bug924987 into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/bug924987 into lp:zorba has been updated. Status: Needs review => Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug924987/+merge/96047 -- https://code.launchpad.net/~zorba-coders/zorba/bug924987/+merge/96047 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/bug924987 into lp:zorba
Looks good. Thanks! -- https://code.launchpad.net/~zorba-coders/zorba/bug924987/+merge/96047 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/bug924987 into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/bug924987/+merge/96047 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/bug924987 into lp:zorba
Till I have made some small changes to the branch. Take a look. If you approve, then let's merge the branch. -- https://code.launchpad.net/~zorba-coders/zorba/bug924987/+merge/96047 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