Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/api-var-annot into lp:zorba
Review: Approve I have the same question as Matthias, maybe it make sense to offer the feature for all module level variable declarations. Apart from that, it looks good. -- https://code.launchpad.net/~zorba-coders/zorba/api-var-annot/+merge/218485 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/fix-boost-typedef into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/fix-boost-typedef/+merge/217976 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/fix-boost-typedef into lp:zorba
The choice of the data structure to hold the flags is open to discussion. I considered: - std::bitset - uint64 - vectorbool (storage optimized specialization is mandated by the standard) The size of std::bitset is determined at compile time, boost:dynamic_bitset brings the boost dependency, so I went with vectorbool because the structure will be non empty in exceptional cases. I preferred to not put a limit on function arity or deal with potential multiple bitfields. No strong opinion though, comments are welcome. -- https://code.launchpad.net/~zorba-coders/zorba/fix-boost-typedef/+merge/217976 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/fix-boost-typedef into lp:zorba
Federico Cavalieri has proposed merging lp:~zorba-coders/zorba/fix-boost-typedef into lp:zorba. Commit message: Removed boost dependency Fixed typedef Requested reviews: Matthias Brantner (matthias-brantner) Federico Cavalieri (fcavalieri) Paul J. Lucas (paul-lucas) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/fix-boost-typedef/+merge/217976 Removed boost dependency Fixed typedef -- https://code.launchpad.net/~zorba-coders/zorba/fix-boost-typedef/+merge/217976 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'src/functions/cacheable_function.cpp' --- src/functions/cacheable_function.cpp 2014-04-16 18:23:55 + +++ src/functions/cacheable_function.cpp 2014-05-01 19:54:22 + @@ -41,8 +41,8 @@ / FunctionCache::FunctionCache( static_context* aSctx, -boost::dynamic_bitset aExcludeFromCacheKey, -boost::dynamic_bitset aCompareWithDeepEqual, +std::vectorbool aExcludeFromCacheKey, +std::vectorbool aCompareWithDeepEqual, bool aAcrossSnapshots): FunctionCacheBaseMap(aSctx, aExcludeFromCacheKey, aCompareWithDeepEqual), theAcrossSnapshots(aAcrossSnapshots), @@ -173,9 +173,6 @@ if (theAreCacheSettingsComputed) return; - theExcludeFromCacheKey = boost::dynamic_bitset(theSignature.paramCount()); - theCompareWithDeepEqual = boost::dynamic_bitset(theSignature.paramCount()); - if (!theTypeManager) theTypeManager = getTypeManager(); @@ -368,13 +365,14 @@ /*** / void cacheable_function::parseCachingAnnotation(AnnotationInternal* aAnnotation, -boost::dynamic_bitset aBitset, +std::vectorbool aFlags, XQueryDiagnostics* aDiag) { if (!aAnnotation) return; - aBitset = boost::dynamic_bitset(theSignature.paramCount()); + aFlags.resize(theSignature.paramCount(), false); + csize lNum = aAnnotation-getNumLiterals(); if (lNum) { @@ -418,7 +416,7 @@ } else { - aBitset[lIndex-1] = 1; + aFlags[lIndex-1] = true; } } } @@ -432,30 +430,30 @@ /*** / -void cacheable_function::saveDynamicBitset(const boost::dynamic_bitset aBitset, ::zorba::serialization::Archiver ar) +void cacheable_function::saveFlags(const std::vectorbool aFlags, ::zorba::serialization::Archiver ar) { - size_t lSize = aBitset.size(); + std::vectorbool::size_type lSize = aFlags.size(); ar lSize; bool lValue; - for (boost::dynamic_bitset::size_type i = 0; ilSize; ++i) + for (std::vectorbool::size_type i = 0; ilSize; ++i) { -lValue = (bool)aBitset[i]; +lValue = aFlags[i]; ar lValue; } } /*** / -void cacheable_function::loadDynamicBitset(boost::dynamic_bitset aBitset, ::zorba::serialization::Archiver ar) +void cacheable_function::loadFlags(std::vectorbool aFlags, ::zorba::serialization::Archiver ar) { - size_t lSize = 0; + std::vectorbool::size_type lSize = 0; ar lSize; - aBitset.resize(lSize); + aFlags.resize(lSize, false); bool lValue; - for (boost::dynamic_bitset::size_type i = 0; ilSize; ++i) + for (std::vectorbool::size_type i = 0; ilSize; ++i) { ar lValue; -aBitset[i] = lValue; +aFlags[i] = lValue; } } === modified file 'src/functions/cacheable_function.h' --- src/functions/cacheable_function.h 2014-04-16 18:23:55 + +++ src/functions/cacheable_function.h 2014-05-01 19:54:22 + @@ -20,22 +20,22 @@ #include functions/function.h #include zorbautils/hashmap_itemh_cache.h #include store/api/item_handle.h -#include boost/dynamic_bitset.hpp +#include vector namespace zorba { class expr; -typedef typename zorba::ItemHandleCacheHashMap std::vectorstore::Item_t FunctionCacheBaseMap; +typedef zorba::ItemHandleCacheHashMap std::vectorstore::Item_t FunctionCacheBaseMap; class FunctionCache : public FunctionCacheBaseMap { public: - typedef typename FunctionCacheBaseMap::iterator iterator; + typedef FunctionCacheBaseMap::iterator iterator; FunctionCache(static_context* aSctx, - boost::dynamic_bitset aExcludeFromCacheKey, - boost::dynamic_bitset aCompareWithDeepEqual, + std::vectorbool aExcludeFromCacheKey, + std::vectorbool aCompareWithDeepEqual, bool aAcrossSnapshots); FunctionCache::iterator find(const store::Item_t aKey, PlanState aPlanState); @@ -87,8 +87,8 @@ bool theCacheAcrossSnapshots; bool theIsCacheAutomatic; bool theAreCacheSettingsComputed; - boost
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-caching into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/feature-caching/+merge/216291 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-caching-annotations into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/feature-caching-annotations/+merge/216293 Your team Zorba Coders is subscribed to branch lp:~zorba-coders/zorba/feature-caching. -- 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/http-client-update into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/http-client-update/+merge/216204 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/http-client-update into lp:zorba
Federico Cavalieri has proposed merging lp:~zorba-coders/zorba/http-client-update into lp:zorba. Commit message: Updated http client with deterministic send-request functions, improved documentation, transparent retries and patch method support. Requested reviews: Matthias Brantner (matthias-brantner) Federico Cavalieri (fcavalieri) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/http-client-update/+merge/216204 Updated http client with deterministic send-request functions, improved documentation, transparent retries and patch method support. -- https://code.launchpad.net/~zorba-coders/zorba/http-client-update/+merge/216204 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/fix-fncall-iterator into lp:zorba
I found a regression, investigating -- https://code.launchpad.net/~zorba-coders/zorba/fix-fncall-iterator/+merge/215934 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/fix-fncall-iterator into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/fix-fncall-iterator/+merge/215934 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/fix-external_func_exceptions into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/fix-external_func_exceptions/+merge/200922 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/fix-accesses-dyn-ctx into lp:zorba
Federico Cavalieri has proposed merging lp:~zorba-coders/zorba/fix-accesses-dyn-ctx into lp:zorba. Commit message: Fixed dynamic context access declaration in the General Functions and Operators on Sequences module Requested reviews: Federico Cavalieri (fcavalieri) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/fix-accesses-dyn-ctx/+merge/200322 Fixed dynamic context access declaration in the General Functions and Operators on Sequences module -- https://code.launchpad.net/~zorba-coders/zorba/fix-accesses-dyn-ctx/+merge/200322 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'src/functions/pregenerated/func_sequences.h' --- src/functions/pregenerated/func_sequences.h 2013-03-05 23:11:50 + +++ src/functions/pregenerated/func_sequences.h 2014-01-02 16:17:12 + @@ -633,6 +633,8 @@ theXQueryVersion = StaticContextConsts::xquery_version_3_0; } + bool accessesDynCtx() const { return true; } + CODEGEN_DECL(); }; @@ -648,6 +650,8 @@ theXQueryVersion = StaticContextConsts::xquery_version_3_0; } + bool accessesDynCtx() const { return true; } + CODEGEN_DECL(); }; @@ -663,6 +667,10 @@ theXQueryVersion = StaticContextConsts::xquery_version_3_0; } + bool accessesDynCtx() const { return true; } + + bool isSource() const { return true; } + CODEGEN_DECL(); }; @@ -678,6 +686,10 @@ theXQueryVersion = StaticContextConsts::xquery_version_3_0; } + bool accessesDynCtx() const { return true; } + + bool isSource() const { return true; } + CODEGEN_DECL(); }; @@ -693,6 +705,10 @@ theXQueryVersion = StaticContextConsts::xquery_version_3_0; } + bool accessesDynCtx() const { return true; } + + bool isSource() const { return true; } + CODEGEN_DECL(); }; === modified file 'src/runtime/spec/sequences/sequences.xml' --- src/runtime/spec/sequences/sequences.xml 2013-09-17 21:12:49 + +++ src/runtime/spec/sequences/sequences.xml 2014-01-02 16:17:12 + @@ -1173,6 +1173,10 @@ zorba:signature localname=available-environment-variables prefix=fn version=3.0 zorba:outputxs:string*/zorba:output /zorba:signature + +zorba:methods + zorba:accessesDynCtx returnValue=true/ +/zorba:methods /zorba:function @@ -1181,10 +1185,6 @@ brief=the current iterator/ /zorba:state - zorba:methods -zorba:accessesDynCtx returnValue=true/ - /zorba:methods - /zorba:iterator !-- @@ -1206,11 +1206,12 @@ zorba:paramxs:string/zorba:param zorba:outputxs:string?/zorba:output /zorba:signature + +zorba:methods + zorba:accessesDynCtx returnValue=true/ +/zorba:methods + /zorba:function - - zorba:methods -zorba:accessesDynCtx returnValue=true/ - /zorba:methods /zorba:iterator @@ -1238,13 +1239,15 @@ zorba:paramxs:string/zorba:param zorba:outputxs:string?/zorba:output /zorba:signature + +zorba:methods + zorba:accessesDynCtx returnValue=true/ + zorba:isSource returnValue=true/ +/zorba:methods + /zorba:function - zorba:methods -zorba:accessesDynCtx returnValue=true/ -zorba:isSource returnValue=true/ - /zorba:methods - + /zorba:iterator !-- @@ -1273,13 +1276,13 @@ zorba:outputxs:string?/zorba:output /zorba:signature +zorba:methods + zorba:accessesDynCtx returnValue=true/ + zorba:isSource returnValue=true/ +/zorba:methods + /zorba:function - - zorba:methods -zorba:accessesDynCtx returnValue=true/ -zorba:isSource returnValue=true/ - /zorba:methods - + /zorba:iterator !-- @@ -1306,6 +1309,12 @@ zorba:paramxs:string/zorba:param zorba:outputxs:string*/zorba:output /zorba:signature + + zorba:methods +zorba:accessesDynCtx returnValue=true/ +zorba:isSource returnValue=true/ + /zorba:methods + /zorba:function @@ -1317,11 +1326,6 @@ brief=the current iterator/ /zorba:state -zorba:methods - zorba:accessesDynCtx returnValue=true/ - zorba:isSource returnValue=true/ -/zorba:methods - /zorba:iterator /zorba:iterators -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/fix-accesses-dyn-ctx into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/fix-accesses-dyn-ctx/+merge/200322 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/fix-random-annotation into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/fix-random-annotation/+merge/199706 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/fix-dbedit-parse-xml-segfault into lp:zorba
Review: Approve Validation queue result for https://code.launchpad.net/~zorba-coders/zorba /fix-dbedit-parse-xml-segfault/+merge/199707 Stage CommitZorba failed. Check console output at http://jenkins.lambda.nu:8180/job/CommitZorba/260/console to view the results. -- https://code.launchpad.net/~zorba-coders/zorba/fix-dbedit-parse-xml-segfault/+merge/199707 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/fix-random-annotation into lp:zorba
Federico Cavalieri has proposed merging lp:~zorba-coders/zorba/fix-random-annotation into lp:zorba. Commit message: Fixed random#0 function annotation. Requested reviews: Zorba Coders (zorba-coders) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/fix-random-annotation/+merge/199706 Fixed random#0 function annotation. -- https://code.launchpad.net/~zorba-coders/zorba/fix-random-annotation/+merge/199706 Your team Zorba Coders is requested to review the proposed merge of lp:~zorba-coders/zorba/fix-random-annotation into lp:zorba. === modified file 'src/runtime/spec/random/random.xml' --- src/runtime/spec/random/random.xml 2013-05-08 20:14:47 + +++ src/runtime/spec/random/random.xml 2013-12-19 19:00:01 + @@ -59,7 +59,7 @@ zorba:member type=xs_integer name=theCurrCounter brief=/ /zorba:state - zorba:function isDeterministic=true + zorba:function isDeterministic=false zorba:signature localname=random prefix=fn-zorba-random zorba:paramxs:integer/zorba:param !-- num of number to be genreated -- -- 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/fix-dbedit-parse-xml-segfault into lp:zorba
Federico Cavalieri has proposed merging lp:~zorba-coders/zorba/fix-dbedit-parse-xml-segfault into lp:zorba. Commit message: Fixed db:edit and fn:parse-xml segfault Requested reviews: Zorba Coders (zorba-coders) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/fix-dbedit-parse-xml-segfault/+merge/199707 Fixed db:edit and fn:parse-xml segfault -- https://code.launchpad.net/~zorba-coders/zorba/fix-dbedit-parse-xml-segfault/+merge/199707 Your team Zorba Coders is requested to review the proposed merge of lp:~zorba-coders/zorba/fix-dbedit-parse-xml-segfault into lp:zorba. === modified file 'src/store/naive/node_items.cpp' --- src/store/naive/node_items.cpp 2013-09-17 21:12:49 + +++ src/store/naive/node_items.cpp 2013-12-19 19:15:18 + @@ -798,35 +798,24 @@ // Before unswapping root nodes as well, their references in the type maps // must be erased. - store::Item_t lRootNodeType; - store::Item_t lOtherRootNodeType; - bool lRootHasType = getTree()-theTypesMap-get( - getTree()-theRootNode, lRootNodeType); - bool lOtherRootHasType = lOtherItem-getTree()-theTypesMap-get( - lOtherItem-getTree()-theRootNode, lOtherRootNodeType); - if(lRootHasType) - { -getTree()-theTypesMap-erase(getTree()-theRootNode); - } - if(lOtherRootHasType) - { -lOtherItem-getTree()-theTypesMap-erase( -lOtherItem-getTree()-theRootNode); - } + store::Item_t lRootNodeType = getTree()-getType(getTree()-theRootNode); + store::Item_t lOtherRootNodeType = lOtherItem-getTree()-getType( + lOtherItem-getTree()-theRootNode); + + if (lRootNodeType != NULL) +getTree()-removeType(getTree()-theRootNode); + if (lOtherRootNodeType != NULL) +lOtherItem-getTree()-removeType(lOtherItem-getTree()-theRootNode); // Now unswapping root nodes. std::swap(getTree()-theRootNode, lOtherItem-getTree()-theRootNode); // And putting references back into the type maps. - if(lRootHasType) - { -getTree()-theTypesMap-insert(getTree()-theRootNode, lRootNodeType); - } - if(lOtherRootHasType) - { -lOtherItem-getTree()-theTypesMap-insert( -lOtherItem-getTree()-theRootNode, lOtherRootNodeType); - } + if (lRootNodeType != NULL) +getTree()-addType(getTree()-theRootNode, lRootNodeType); + if (lOtherRootNodeType != NULL) +lOtherItem-getTree()-addType(lOtherItem-getTree()-theRootNode, +lOtherRootNodeType); // Swap flags expect hasReference. bool lHasReference = haveReference(); === added file 'test/rbkt/ExpQueryResults/zorba/collections/static-edit/static-edit-20.xml.res' --- test/rbkt/ExpQueryResults/zorba/collections/static-edit/static-edit-20.xml.res 1970-01-01 00:00:00 + +++ test/rbkt/ExpQueryResults/zorba/collections/static-edit/static-edit-20.xml.res 2013-12-19 19:15:18 + @@ -0,0 +1,1 @@ +a/d/c/ === added file 'test/rbkt/Queries/zorba/collections/static-edit/static-edit-20.xq' --- test/rbkt/Queries/zorba/collections/static-edit/static-edit-20.xq 1970-01-01 00:00:00 + +++ test/rbkt/Queries/zorba/collections/static-edit/static-edit-20.xq 2013-12-19 19:15:18 + @@ -0,0 +1,12 @@ +import module namespace ddl = http://zorba.io/modules/store/static/collections/ddl;; +import module namespace dml = http://zorba.io/modules/store/static/collections/dml;; + +import module namespace ns = http://www.example.com/example; at ../collection_001.xqdata; + +ddl:create(xs:QName(ns:collection)); + +dml:insert(xs:QName(ns:collection), (a/, b/, c/)); + +dml:edit(dml:collection(xs:QName(ns:collection))[2], parse-xml(d/)/*); + +dml:collection(xs:QName(ns:collection)) -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1026250 into lp:zorba
Thanks for the feedback. Merging -- https://code.launchpad.net/~zorba-coders/zorba/bug-1026250/+merge/138044 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1026250 into lp:zorba
Thanks for the review. Can you explain me why SYNC_CODE(theCollection-theLatch.rlock();) and SYNC_CODE(theCollection-theLatch.unlock();) has been commented in this branch? They were already commented in the branch when I started working on it. -- https://code.launchpad.net/~zorba-coders/zorba/bug-1026250/+merge/138044 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1026250 into lp:zorba
Ready for review -- https://code.launchpad.net/~zorba-coders/zorba/bug-1026250/+merge/138044 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1026250 into lp:zorba
nope, let me fix it On Wed, Aug 14, 2013 at 3:14 PM, Ghislain Fourny ghislain.fou...@28msec.com wrote: One of the tests uses ext:nomaterialization without dash. Is this intented? -- https://code.launchpad.net/~zorba-coders/zorba/bug-1026250/+merge/138044 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp -- https://code.launchpad.net/~zorba-coders/zorba/bug-1026250/+merge/138044 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1026250 into lp:zorba
Fixed and pushed On Wed, Aug 14, 2013 at 9:36 PM, Federico Cavalieri federico.cavali...@28msec.com wrote: nope, let me fix it On Wed, Aug 14, 2013 at 3:14 PM, Ghislain Fourny ghislain.fou...@28msec.com wrote: One of the tests uses ext:nomaterialization without dash. Is this intented? -- https://code.launchpad.net/~zorba-coders/zorba/bug-1026250/+merge/138044 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp -- https://code.launchpad.net/~zorba-coders/zorba/bug-1026250/+merge/138044 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug1207668 into lp:zorba
Federico Cavalieri has proposed merging lp:~zorba-coders/zorba/bug1207668 into lp:zorba. Commit message: Fixed bug 1207668 Requested reviews: Matthias Brantner (matthias-brantner) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/bug1207668/+merge/178223 Fixed bug 1207668 -- https://code.launchpad.net/~zorba-coders/zorba/bug1207668/+merge/178223 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'modules/http-client/json/http-client.xq.src/http_response_parser.cpp' --- modules/http-client/json/http-client.xq.src/http_response_parser.cpp 2013-07-30 18:35:31 + +++ modules/http-client/json/http-client.xq.src/http_response_parser.cpp 2013-08-02 09:05:38 + @@ -41,10 +41,12 @@ namespace http_client { -void parse_content_type( std::string const s, std::string *mime_type, -std::string *charset ) { - std::string::size_type pos = s.find( ';' ); - *mime_type = s.substr( 0, pos ); +void parse_content_type( std::string const media_type, std::string *mime_type, +std::string *charset ) +{ + std::string::size_type start = 0; + std::string::size_type end = media_type.find( ';' ); + *mime_type = media_type.substr( start, end - start ); if ( std::strncmp( mime_type-c_str(), text/, 5 ) == 0 ) { // @@ -61,29 +63,44 @@ } else charset-clear(); - if ( pos != std::string::npos ) { -// -// Parse: charset=?X?[ (comment)] -// -if ( (pos = s.find( '=' )) != std::string::npos ) { - std::string t = s.substr( pos + 1 ); - if ( !t.empty() ) { -if ( t[0] == '' ) { + //media-type = type / subtype *( ; parameter ) + //type = token + //subtype = token + //parameter = attribute = value + //attribute = token + //value = token | quoted-string + //quoted-string = ( *(qdtext) ) + //qdtext = any TEXT except + std::vectorstd::string fields; + while ((end = media_type.find(';',start)) != std::string::npos) + { +fields.push_back(media_type.substr(start,end-start)); +start = end+1; + } + fields.push_back(media_type.substr(start)); + + std::vectorstd::string::iterator it = fields.begin(); + for (;it!=fields.end();++it) + { +std::string field =*it; +std::transform(field.begin(), field.end(), field.begin(), ::tolower); +field.erase(remove_if(field.begin(), field.end(), ::isspace), field.end()); +if ((start = field.find(charset=)) != std::string::npos) +{ + std::string t = field.substr(start + 8); + if (!t.empty()) + { +if (t[0] == '' t[t.length()-1] == '') + { t.erase( 0, 1 ); - if ( (pos = t.find( '' )) != std::string::npos ) -t.erase( pos ); -} else { - if ( (pos = t.find( ' ' )) != std::string::npos ) -t.erase( pos ); -} + t.erase(t.length() -1, 1); + } *charset = t; - } + } } } } - - HttpResponseParser::HttpResponseParser(HttpResponseHandler aHandler, CURL* aCurl, ErrorThrower aErrorThrower, std::string aOverridenContentType, === added file 'test/rbkt/ExpQueryResults/zorba/http-client/json/send-request/http3-charset.xml.res' --- test/rbkt/ExpQueryResults/zorba/http-client/json/send-request/http3-charset.xml.res 1970-01-01 00:00:00 + +++ test/rbkt/ExpQueryResults/zorba/http-client/json/send-request/http3-charset.xml.res 2013-08-02 09:05:38 + @@ -0,0 +1,1 @@ +wrongone wrongone \ No newline at end of file === added file 'test/rbkt/ExpQueryResults/zorba/http-client/json/send-request/http3-charset2.xml.res' --- test/rbkt/ExpQueryResults/zorba/http-client/json/send-request/http3-charset2.xml.res 1970-01-01 00:00:00 + +++ test/rbkt/ExpQueryResults/zorba/http-client/json/send-request/http3-charset2.xml.res 2013-08-02 09:05:38 + @@ -0,0 +1,2 @@ +http:request xmlns:http=http://expath.org/ns/http-client; href=zorbatest.lambda.nu:8080/http-test-data/request.php method=POSThttp:header name=User-Agent value=libcurl-agent/1.0/http:headerhttp:header name=Host value=zorbatest.lambda.nu:8080/http:headerhttp:header name=Accept value=*/*/http:headerhttp:header name=foo value=bar/http:headerhttp:header name=Content-Type value=multipart/form-data; boundary=4ebf00fbcf09/http:headerhttp:header name=Content-Length value=37/http:headerhttp:multipart boundary=4ebf00fbcf09 content-type=multipart/form-data + /http:multipart/http:request \ No newline at end of file === added file 'test/rbkt/Queries/zorba/http-client/json/send-request/http3-charset.xq' --- test/rbkt/Queries/zorba/http-client/json/send-request/http3-charset.xq 1970-01-01 00:00:00 + +++ test/rbkt/Queries/zorba/http-client/json/send-request/http3-charset.xq 2013-08-02 09:05:38 + @@ -0,0 +1,44 @@ +jsoniq version 1.0; +import module namespace http = http://zorba.io/modules/http
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-cloudant into lp:zorba
- The indentation has several problems. Could you please make it consistent. Especially in the C++ code. sure. - Why don't you use the same approach as we did for xbrl-cloud and keep the connection map in JSONiq (using the map module)? I think that would be more appropriate for this module than replicating 400 lines of c++ code. If this is a recurring pattern, we might think about providing core support for it but I feel that the JSONiq map is good enough for now. Also, I wouldn't worry about the disconnect at this point. When the story was discussed I was suggested to manage connections as the JDBC module does. But I probably misunderstood. I updated the code to manage connection from XQuery and removed all c++ code. -- https://code.launchpad.net/~zorba-coders/zorba/feature-cloudant/+merge/177111 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-external-cloudant-module into lp:zorba
Module in lp:~zorba-coders/zorba/cloudant-module -- https://code.launchpad.net/~zorba-coders/zorba/feature-external-cloudant-module/+merge/178255 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-cloudant into lp:zorba
Review: Resubmit External module merge proposal in lp:~zorba-coders/zorba/feature-external-cloudant-module and lp:~zorba-coders/zorba/cloudant-module -- https://code.launchpad.net/~zorba-coders/zorba/feature-cloudant/+merge/177111 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-cloudant into lp:zorba
I did not find a description of the process necessary to propose a new module in the wiki. What should I do? Thanks -- https://code.launchpad.net/~zorba-coders/zorba/feature-cloudant/+merge/177111 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-cloudant into lp:zorba
Given the comments I received for the http-module I fear that the way I am disconnecting from cloudant is not correct, because curl_global_init/cleanup must not be called multiple times from different modules. I tried disconnecting invoking an XQuery function but this does not work because the static context is already destroyed. I left it commented in case my code was just wrong. If disconnecting via XQuery is not possible, i guess we can: 1) avoid loggin in. There is another way of communicating with cloudant where each request contains user and password. 2) not disconnect. 3) share the singleton class which manages curl for the http client Do you have another idea or a hint? Thanks -- https://code.launchpad.net/~zorba-coders/zorba/feature-cloudant/+merge/177111 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-cloudant into lp:zorba
Hi Chris, thanks for the quick review. I think it is currently a core module due to the auto-disconnect functionality. External module can have cpp external functions? However, as I wrote in my previous comment, this feature is almost certainly wrong at the moment. If I recall correctly, Matthias suggested me to make the module autodisconnect similarly to the way the JDBC module does. So I am not sure if my implementation is wrong but the autodisconnect feature possible. Thanks for the comments -- https://code.launchpad.net/~zorba-coders/zorba/feature-cloudant/+merge/177111 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-cloudant into lp:zorba
Actually, a few code problems: 1. ConnectionMap::destroy() invokes a function in the http://28msec.io/modules/cloudant namespace. I think that should be in http://zorba.io/modules/cloudant, right? This is commented out :) I tried doing it in XQuery but I didn't manage so I left the code commented to get a feedback if the code was just wrong or using the static context to call a XQuery function when the connectionmap is destroyed is just impossible. 2. The files in cloudant.xq.src have 28msec copyright notices. Thanks. I didn't update them all apparently. 3. I think the changes in modules/CMakeLists.txt are wrong; why are you eliminating the http-client subdirectory, for instance? Also, the search for CURL needs to only be once; will you remove the FIND_PACKAGE(CURL) from the http-client subdirectory, once those modules are all merged? Since in its current state this module depends on CURL i made a single search for the CURL library and moved both the ADD_DIRECTORY(http-client) and ADD..(cloudant) inside the same check. The http client cmakelist doesn't do the search again. At least this was my intention, I asked Matthias offline if this make sense. However, since I am not sure of the autodisconnect approach anymore this change may need to be reverted. I asked Matthias via mail if that mak To make a single FIND_PACKAGE(CURL) -- https://code.launchpad.net/~zorba-coders/zorba/feature-cloudant/+merge/177111 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-cloudant into lp:zorba
Ahh, I see, that call in ConnectionMap::destroy() is commented out. Didn't notice that the first time. Regarding the curl disconnect problems: That would all go away if this module used the http-client module, rather than using C++ to invoke CURL directly. Is there a reason this module couldn't be written in pure XQuery? Dana's original goal for Zorba was the the built-in http-client module would be the single way to access HTTP, and all uses would go through that. We're not perfect yet, but we're getting better. I tried doing it in XQuery but I didn't manage so I left the code commented to get a feedback if the code was just wrong or using the static context to call a XQuery function when the connectionmap is destroyed is just impossible. -- https://code.launchpad.net/~zorba-coders/zorba/feature-cloudant/+merge/177111 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/expath-http-on-json-http into lp:zorba/http-client-module
The proposal to merge lp:~zorba-coders/zorba/expath-http-on-json-http into lp:zorba/http-client-module has been updated. Commit Message changed to: Updated the expath http client on top of the json http client For more details, see: https://code.launchpad.net/~zorba-coders/zorba/expath-http-on-json-http/+merge/176996 -- https://code.launchpad.net/~zorba-coders/zorba/expath-http-on-json-http/+merge/176996 Your team Zorba Coders is subscribed to branch lp:zorba/http-client-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/expath-http-on-json-http into lp:zorba/http-client-module
The proposal to merge lp:~zorba-coders/zorba/expath-http-on-json-http into lp:zorba/http-client-module has been updated. Commit Message changed to: Updated the expath http client to use the json http client For more details, see: https://code.launchpad.net/~zorba-coders/zorba/expath-http-on-json-http/+merge/176996 -- https://code.launchpad.net/~zorba-coders/zorba/expath-http-on-json-http/+merge/176996 Your team Zorba Coders is subscribed to branch lp:zorba/http-client-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/feature-cloudant into lp:zorba
I agree that an external module is best suited for this module. I will look in the wiki to see the submit procedure. -- https://code.launchpad.net/~zorba-coders/zorba/feature-cloudant/+merge/177111 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/json-http-module into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/json-http-module into lp:zorba has been updated. Commit Message changed to: Added JSON HTTP client module. Fixed initialization, error reporting and encoding bugs in the XML HTTP client. Reimplemented XML HTTP client on top of the JSON HTTP client module. For more details, see: https://code.launchpad.net/~zorba-coders/zorba/json-http-module/+merge/169579 -- https://code.launchpad.net/~zorba-coders/zorba/json-http-module/+merge/169579 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/http-client-based-on-json-http-client into lp:zorba/http-client-module
Review: Needs Information 1. Do we need to promote this to version 2.0 of the EXpath module? Isn't the public API exactly the same, as defined by EXpath? I understand the implementation is different, but I don't believe that's relevant for module versioning. 2. (Possibly the same question) Do we need to keep the old version of this module, what we're calling 1.0? Again, they have the same interface, so why would anyone care about importing one or the other? I agree, let us keep the same version. 3. FYI the XQDoc has a link to the scripting tutorial on http://www.zorba- xquery.com/ . That might even be a broken link now, but it should presumably be updated to http://www.zorba.io/ . 4. Also FYI, the example given (reading the Zorba blog RSS feed) almost certainly won't work, since (a) the URL is old and (b) our blog isn't working at the moment. Fixed, will be committed soon. Now that we have updated the core XML HTTP client in zorba to be based on the new core JSON HTTP module there is some code replication here and in the XML HTTP client to convert XML requests into JSON requests and JSON responses in XML responses (600 xquery lines) + error catching and rethrowing. 1) Ignore the replication, (the XML http client will be removed at some point?) 2) Create a non-advertised module for doing the conversions? Are there some best-practices in Zorba? 3) Base the module on the XML http client which is based on the JSON http client (4 conversions for one request) Personally I would go with 1 or 2. Thanks -- https://code.launchpad.net/~zorba-coders/zorba/http-client-based-on-json-http-client/+merge/169578 Your team Zorba Coders is subscribed to branch lp:zorba/http-client-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/http-client-wrapper into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/http-client-wrapper into lp:zorba has been updated. Status: Needs review = Work in progress For more details, see: https://code.launchpad.net/~zorba-coders/zorba/http-client-wrapper/+merge/176980 -- https://code.launchpad.net/~zorba-coders/zorba/http-client-wrapper/+merge/176980 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/http-client-based-on-json-http-client into lp:zorba/http-client-module
Depends on lp:~zorba-coders/zorba/http-client-wrapper -- https://code.launchpad.net/~zorba-coders/zorba/http-client-based-on-json-http-client/+merge/169578 Your team Zorba Coders is subscribed to branch lp:zorba/http-client-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/http-client-wrapper into lp:zorba
To avoid replicating conversion code (600-700 lines) between the core XML http client and the Expath http client as discussed in: https://code.launchpad.net/~zorba-coders/zorba/http-client-based-on-json-http-client/+merge/169578 I introduced a wrapper module for doing all conversions. -- https://code.launchpad.net/~zorba-coders/zorba/http-client-wrapper/+merge/176980 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/expath-http-on-json-http into lp:zorba/http-client-module
Federico Cavalieri has proposed merging lp:~zorba-coders/zorba/expath-http-on-json-http into lp:zorba/http-client-module. Requested reviews: Cezar Andrei (cezar-andrei) Chris Hillery (ceejatec) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/expath-http-on-json-http/+merge/176996 -- https://code.launchpad.net/~zorba-coders/zorba/expath-http-on-json-http/+merge/176996 Your team Zorba Coders is subscribed to branch lp:zorba/http-client-module. === removed file 'src/CMakeLists.txt' --- src/CMakeLists.txt 2011-07-26 10:42:50 + +++ src/CMakeLists.txt 1970-01-01 00:00:00 + @@ -1,19 +0,0 @@ -# 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. - -# all external module libraries are generated in the directory -# of the corresponding .xq file -MESSAGE(STATUS Add org) -ADD_SUBDIRECTORY(org) -MESSAGE(STATUS End modules) === renamed file 'src/org/expath/ns/CMakeLists.txt' = 'src/CMakeLists.txt' === renamed file 'src/org/expath/ns/http-client.xq' = 'src/http-client.xq' --- src/org/expath/ns/http-client.xq 2013-06-15 19:39:40 + +++ src/http-client.xq 2013-07-25 16:52:28 + @@ -30,22 +30,23 @@ : p : In general, both functions take a description of the HTTP request to make : as parameter, execute the request, and return a representation of the HTTP - : response. For instance, in the following code snippet, we fetch the blog feed from Zorba: + : response. For instance, in the following code snippet, we fetch the Zorba + : home page: : /p - : pre class=ace-static ace-mode=xquery![CDATA[import module namespace http = http://expath.org/ns/http-client;; + : pre + : import module namespace http = http://expath.org/ns/http-client;; : : http:send-request( - : http:request href=http://www.zorba-xquery.com/blog/feed; method=get / + : http:request href=http://zorba.io; method=get / : ) - : ]]/pre - : pYou can try this example a href=http://www.zorba-xquery.com/html/demo#GKnscDSYqVadJ+CQftvnRw+LUd0=;live/a./p + : /pre : : p : The codehttp:send-request()/code functions are declared as sequential. : Sequential functions are allowed to have side effects. For example, most probably, : an HTTP POST request is a request that has side effects because it adds/changes : a remote resource. Sequential functions are specified in the - : a href=http://www.zorba-xquery.com/html/documentation/latest/zorba/scripting_tutorial;XQuery Scripting Extension/a. + : a href=http://www.zorba.io/documentation/latest/zorba/scripting_tutorial.html;XQuery Scripting Extension/a. : In contrast, the http:read() functions are not declared as sequential - : they are declared as nondeterministic though, which : means that several calls may return different results. @@ -97,7 +98,7 @@ : a href=http://expath.org/spec/http-client#d2e491;specification/a. : /p : - : @author Markus Pilman + : @author Federico Cavalieri, Markus Pilman : @see a href=http://www.w3.org/TR/xquery-3/#FunctionDeclns;XQuery 3.0: Function Declaration/a : @library a href=http://curl.haxx.se/;cURL Library/a : @project EXPath/EXPath HTTP Client @@ -105,7 +106,7 @@ :) module namespace http = http://expath.org/ns/http-client;; -import module namespace zorba-http = http://www.zorba-xquery.com/modules/http-client;; +import module namespace http-wrapper = http://zorba.io/modules/http-client-wrapper;; import module namespace err = http://expath.org/ns/error;; import module namespace tidy=http://www.zorba-xquery.com/modules/converters/html;; @@ -152,7 +153,7 @@ try { { - variable $result := zorba-http:send-request($request, $href, $bodies); + variable $result := http-wrapper:http-sequential-request($request, $href, $bodies); http:tidy-result($result, fn:data($request/@override-media-type)) } } catch XPTY0004 { @@ -223,4 +224,4 @@ tidy:parse($body) else $body -}; +}; === removed directory 'src/org' === removed file 'src/org/CMakeLists.txt' --- src/org/CMakeLists.txt 2011-10-06 08:18:34 + +++ src/org/CMakeLists.txt 1970-01-01 00:00:00 + @@ -1,14 +0,0 @@ -# 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
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/expath-http-on-json-http into lp:zorba/http-client-module
The proposal to merge lp:~zorba-coders/zorba/expath-http-on-json-http into lp:zorba/http-client-module has been updated. Status: Needs review = Work in progress For more details, see: https://code.launchpad.net/~zorba-coders/zorba/expath-http-on-json-http/+merge/176996 -- https://code.launchpad.net/~zorba-coders/zorba/expath-http-on-json-http/+merge/176996 Your team Zorba Coders is subscribed to branch lp:zorba/http-client-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/expath-http-on-json-http into lp:zorba/http-client-module
Federico Cavalieri has proposed merging lp:~zorba-coders/zorba/expath-http-on-json-http into lp:zorba/http-client-module. Requested reviews: Cezar Andrei (cezar-andrei) Chris Hillery (ceejatec) For more details, see: https://code.launchpad.net/~zorba-coders/zorba/expath-http-on-json-http/+merge/176996 -- https://code.launchpad.net/~zorba-coders/zorba/expath-http-on-json-http/+merge/176996 Your team Zorba Coders is subscribed to branch lp:zorba/http-client-module. === removed file 'src/CMakeLists.txt' --- src/CMakeLists.txt 2011-07-26 10:42:50 + +++ src/CMakeLists.txt 1970-01-01 00:00:00 + @@ -1,19 +0,0 @@ -# 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. - -# all external module libraries are generated in the directory -# of the corresponding .xq file -MESSAGE(STATUS Add org) -ADD_SUBDIRECTORY(org) -MESSAGE(STATUS End modules) === renamed file 'src/org/expath/ns/CMakeLists.txt' = 'src/CMakeLists.txt' === renamed file 'src/org/expath/ns/http-client.xq' = 'src/http-client.xq' --- src/org/expath/ns/http-client.xq 2013-06-15 19:39:40 + +++ src/http-client.xq 2013-07-25 16:52:28 + @@ -30,22 +30,23 @@ : p : In general, both functions take a description of the HTTP request to make : as parameter, execute the request, and return a representation of the HTTP - : response. For instance, in the following code snippet, we fetch the blog feed from Zorba: + : response. For instance, in the following code snippet, we fetch the Zorba + : home page: : /p - : pre class=ace-static ace-mode=xquery![CDATA[import module namespace http = http://expath.org/ns/http-client;; + : pre + : import module namespace http = http://expath.org/ns/http-client;; : : http:send-request( - : http:request href=http://www.zorba-xquery.com/blog/feed; method=get / + : http:request href=http://zorba.io; method=get / : ) - : ]]/pre - : pYou can try this example a href=http://www.zorba-xquery.com/html/demo#GKnscDSYqVadJ+CQftvnRw+LUd0=;live/a./p + : /pre : : p : The codehttp:send-request()/code functions are declared as sequential. : Sequential functions are allowed to have side effects. For example, most probably, : an HTTP POST request is a request that has side effects because it adds/changes : a remote resource. Sequential functions are specified in the - : a href=http://www.zorba-xquery.com/html/documentation/latest/zorba/scripting_tutorial;XQuery Scripting Extension/a. + : a href=http://www.zorba.io/documentation/latest/zorba/scripting_tutorial.html;XQuery Scripting Extension/a. : In contrast, the http:read() functions are not declared as sequential - : they are declared as nondeterministic though, which : means that several calls may return different results. @@ -97,7 +98,7 @@ : a href=http://expath.org/spec/http-client#d2e491;specification/a. : /p : - : @author Markus Pilman + : @author Federico Cavalieri, Markus Pilman : @see a href=http://www.w3.org/TR/xquery-3/#FunctionDeclns;XQuery 3.0: Function Declaration/a : @library a href=http://curl.haxx.se/;cURL Library/a : @project EXPath/EXPath HTTP Client @@ -105,7 +106,7 @@ :) module namespace http = http://expath.org/ns/http-client;; -import module namespace zorba-http = http://www.zorba-xquery.com/modules/http-client;; +import module namespace http-wrapper = http://zorba.io/modules/http-client-wrapper;; import module namespace err = http://expath.org/ns/error;; import module namespace tidy=http://www.zorba-xquery.com/modules/converters/html;; @@ -152,7 +153,7 @@ try { { - variable $result := zorba-http:send-request($request, $href, $bodies); + variable $result := http-wrapper:http-sequential-request($request, $href, $bodies); http:tidy-result($result, fn:data($request/@override-media-type)) } } catch XPTY0004 { @@ -223,4 +224,4 @@ tidy:parse($body) else $body -}; +}; === removed directory 'src/org' === removed file 'src/org/CMakeLists.txt' --- src/org/CMakeLists.txt 2011-10-06 08:18:34 + +++ src/org/CMakeLists.txt 1970-01-01 00:00:00 + @@ -1,14 +0,0 @@ -# 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
Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/expath-http-on-json-http into lp:zorba/http-client-module
Ready for review. This is updates the expath http client to be based on the wrapper module introduced in lp:~zorba-coders/zorba/http-client-wrapper The comments of the previous branch (outdated links, wrapper conversion module) have been addressed. -- https://code.launchpad.net/~zorba-coders/zorba/expath-http-on-json-http/+merge/176996 Your team Zorba Coders is subscribed to branch lp:zorba/http-client-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/http-client-wrapper into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/http-client-wrapper into lp:zorba has been updated. Commit Message changed to: HTTP client request/response conversion in a separate module For more details, see: https://code.launchpad.net/~zorba-coders/zorba/http-client-wrapper/+merge/176980 -- https://code.launchpad.net/~zorba-coders/zorba/http-client-wrapper/+merge/176980 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/expath-http-on-json-http into lp:zorba/http-client-module
Apparently the Expath HTTP Client queries 2 and 3 fail on the zorba demo website (http://zorbawebsite2.my28msec.com/html/demo) This does not seem to depend on the latest http client merge which apparently is not there yet. Is this a known problem? -- https://code.launchpad.net/~zorba-coders/zorba/expath-http-on-json-http/+merge/176996 Your team Zorba Coders is subscribed to branch lp:zorba/http-client-module. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
[Zorba-coders] [Merge] lp:~zorba-coders/zorba/json-http-module into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/json-http-module into lp:zorba has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/json-http-module/+merge/169579 -- https://code.launchpad.net/~zorba-coders/zorba/json-http-module/+merge/169579 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/json-http-module into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/json-http-module into lp:zorba has been updated. Status: Approved = Needs review For more details, see: https://code.launchpad.net/~zorba-coders/zorba/json-http-module/+merge/169579 -- https://code.launchpad.net/~zorba-coders/zorba/json-http-module/+merge/169579 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/json-http-module into lp:zorba
Chris, thanks for the comments. I think I resolved all reported issues with the module. The old http module is xquery only now. I also did a cleaning pass over the cpp and removed two small initialization bugs. -- https://code.launchpad.net/~zorba-coders/zorba/json-http-module/+merge/169579 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/json-http-module into lp:zorba
The old http-module when you send an http-request, specifying a non textual mime-type, the current http-client invokes the serializer specifiying the (unaccessible from XQuery code) binary method. If the body is an xml node it gets converted in a very strange way: hellothere/hello becomes hello there then it is encoded as base64 and sent encoded. There is a test which specifically verifies this case. Trying to send a JSON object results in an error. A base64 value is sent encoded as is. Anything else is first converted into a string and then encoded in base64. I personally believe that this does not make sense at all and the JSON http client behaves differently. Is this really the intended behaviour (there is a test which verifies it)? Is there some code depending on it? What is the rationale of the conversion from hellothere/hello to hello there (it cannot even be reproduced without a UDF)? Should I reproduce this behaviour? -- https://code.launchpad.net/~zorba-coders/zorba/json-http-module/+merge/169579 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/json-http-module into lp:zorba
The old http-module when you send an http-request, specifying a non textual mime-type, the current http-client invokes the serializer specifiying the (unaccessible from XQuery code) binary method. I meant The old http-module when you send an http-request, specifying a non textual mime-type, invokes the serializer specifiying the (unaccessible from XQuery code) binary method. -- https://code.launchpad.net/~zorba-coders/zorba/json-http-module/+merge/169579 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/json-http-module into lp:zorba
Thank you for your feedback. 3. The module error codes need to be changed to match the coding guidelines: http://my.zorba.io/dokuwiki/doku.php?id=coding-guidelines#error_codes I updated the error codes according to the guidelines -- https://code.launchpad.net/~zorba-coders/zorba/json-http-module/+merge/169579 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/json-http-module into lp:zorba
1. OMG code duplication: the entire contents of http-client.xq.src is copied (and modified?) from the original http-client module. That's nearly 3000 lines of some of the ugliest and most error-filled code we've got. No way do we want to maintain two copies of it. Also, they both call curl_global_init() and curl_global_cleanup(), which means that they will stomp on each other if anyone attempts to use both. This code must be consolidated somehow, perhaps into a common library that both modules use. Or, we need to simply eliminate the original http-client library. Perhaps we could replace the old http-client module with a pure XQuery wrapper module that replicates the old API, much like V2 of the EXPath http-client module does? 2. Need to consolidate the CMake code which searches for curl, etc. It was copied from modules/com/zorba-xquery/www/modules/CMakeLists.txt, and it still exists in that location. That means the search for CURL is done twice, and the cached variable ZORBA_HAVE_CURL is defined twice, and the Windows .pem files are copied twice... I would suggest that it should remain where it is in modules/CMakeList.txt, and be deleted from the other location, and testing done to ensure it still works right. (This issue would also be resolved by eliminating the original http-client module or replacing it with a wrapper module.) Yes, part of the code of the json-http-client duplicates that of the original http-client-module. It is not 100% the same because, as you said, because the original contains several bugs. The bugs I found (which include, headers mangling, broken/absent charset encoding/decoding, broken/absent streamable string and binary support, error reporting, and so on) are fixed in the JSON HTTP module code. I believe that removing the old http-client module would solve many problems, but given the widespread use of this module I am not sure if this is feasible. I remember that when I started working on this module there was a discussion on this option and that keeping the old module (and duplicating the code) was the final decision. However, my knowledge in this respect is limited, so I am not sure. The next best thing would be to replace the old module with a wrapper. The only downside of this is that some of the old module bugs are really common, e.g.: all requests which do not contain a manually specified charset=UTF-8 specification in the media-type are sent with a wrong encoding. Therefore, I will begin to work on the wrapper. -- https://code.launchpad.net/~zorba-coders/zorba/json-http-module/+merge/169579 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/json-http-module into lp:zorba
I merged the trunk into the branch and added the ability to use hexbinary as a body type. Note that this required a further API extension beside in addtion to the hexbinary stream which has been merged into the trunk a few hours ago. Removed the jsoniq note from docs -- https://code.launchpad.net/~zorba-coders/zorba/json-http-module/+merge/169579 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/json-http-module into lp:zorba
In the Doc examples use WWW.zorba.io... but the module is registered without WWW: xqDoc: import module namespace http=http://www.zorba.io/modules/http-client;; http:get(http://www.example.com;) Fixed timeout option has a bug. Uncomment timeout in the following script and get this error: $ ./zorba -i -f -q q.jq error [zerr:ZSTR0040]: type error: Item::getIntValue() not defined for type xs:integer Fixed and added test -- https://code.launchpad.net/~zorba-coders/zorba/json-http-module/+merge/169579 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/json-http-module into lp:zorba
Cezar, it is not necessary for users to have a jsoniq version header in their queries to use this module. They can use (field) object accessors instead of .field . My point was to mention these options somewhere in the doc and link to a page which better describes this. IMHO it's confusing if you also count in the file extension .jq. The file extension is .xq, should I make it .jq? Thanks -- https://code.launchpad.net/~zorba-coders/zorba/json-http-module/+merge/169579 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/json-http-module into lp:zorba
Cezar, it is not necessary for users to have a jsoniq version header in their queries to use this module. They can use (field) object accessors instead of .field . My point was to mention these options somewhere in the doc and link to a page which better describes this. IMHO it's confusing if you also count in the file extension .jq. I added a small note which says that the module is written in jsoniq and that can be imported both by xquery and jsoniq modules. However, I don't know which webpage should I link to explain the version declaration: jsoniq.org does not mention this header, which I only found discussed in http://www.zorba.io/blog/. A link to this page would soon become outdated and I don't know how to get the specific post url. Any suggestions? Thanks -- https://code.launchpad.net/~zorba-coders/zorba/json-http-module/+merge/169579 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~paul-lucas/zorba/bug-1189636 into lp:zorba
Review: Approve -- https://code.launchpad.net/~paul-lucas/zorba/bug-1189636/+merge/170471 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-1189636 into lp:zorba
The proposal to merge lp:~paul-lucas/zorba/bug-1189636 into lp:zorba has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~paul-lucas/zorba/bug-1189636/+merge/170471 -- https://code.launchpad.net/~paul-lucas/zorba/bug-1189636/+merge/170471 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/nullcasts into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/nullcasts into lp:zorba has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/nullcasts/+merge/166094 -- https://code.launchpad.net/~zorba-coders/zorba/nullcasts/+merge/166094 Your team Zorba Coders is subscribed to branch lp:zorba. -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe : https://launchpad.net/~zorba-coders More help : https://help.launchpad.net/ListHelp
Re: [Zorba-coders] [Merge] lp:~paul-lucas/zorba/pjl-misc into lp:zorba
Review: Approve -- https://code.launchpad.net/~paul-lucas/zorba/pjl-misc/+merge/164563 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 912586] Re: Zorba Internal Fatal error when applying a PUL changes the type of a typed node
** Changed in: zorba Assignee: Federico Cavalieri (fcavalieri) = Cezar Andrei (cezar-andrei) -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/912586 Title: Zorba Internal Fatal error when applying a PUL changes the type of a typed node Status in Zorba - The XQuery Processor: New Bug description: If a PUL changes the type of a typed node there is a Zorba Internal Fatal error when applying. Query import schema namespace d=http://www.zorba-xquery.org/schema; at upd14.xsd; declare revalidation lax; declare variable $doc:=validate{root xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://www.zorba-xquery.org/schema; a attr=12/ b bb/ /b c/ /root}; rename node $doc//d:b as fn:QName(http://www.zorba- xquery.org/schema, newb); Schema ?xml version=1.0 encoding=UTF-8? xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema; targetNamespace=http://www.zorba-xquery.org/schema; xmlns=http://www.zorba-xquery.org/schema; elementFormDefault=qualified xs:element name=root type=rootType/ xs:complexType name=rootType xs:sequence xs:element name=a type=aType/ xs:choice xs:element name=b type=bType/ xs:element name=newb type=newbType/ /xs:choice xs:element name=c type=cType/ /xs:sequence /xs:complexType xs:complexType name=aType xs:attribute name=attr type=xs:int/ /xs:complexType xs:complexType name=bType xs:sequence xs:element name=bb type=xs:string/ /xs:sequence /xs:complexType xs:simpleType name=newbType xs:restriction base=xs:string xs:maxLength value=50/ /xs:restriction /xs:simpleType xs:simpleType name=cType xs:restriction base=xs:string xs:maxLength value=50/ /xs:restriction /xs:simpleType /xs:schema To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/912586/+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] [Bug 912722] Re: A validate lax {}-validated element may cause assertion failures
** Changed in: zorba Assignee: Federico Cavalieri (fcavalieri) = Cezar Andrei (cezar-andrei) -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/912722 Title: A validate lax {}-validated element may cause assertion failures Status in Zorba - The XQuery Processor: New Bug description: This query causes assertion failures: import schema namespace d=http://www.zorba-xquery.org/schema; at upd14.xsd; import module namespace schema = http://www.zorba-xquery.com/modules/schema;; declare revalidation lax; declare variable $x:=validate lax {root xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://www.zorba-xquery.org/schema; a/aa /root}; $x/text() Schema ?xml version=1.0 encoding=UTF-8? xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema; targetNamespace=http://www.zorba-xquery.org/schema; xmlns=http://www.zorba-xquery.org/schema; elementFormDefault=qualified xs:element name=root type=xs:anySimpleType/ /xs:schema /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x9e8f99) [0x7f27fe08ff99] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x9e9066) [0x7f27fe090066] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x121d895) [0x7f27fe8c4895] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x1231eca) [0x7f27fe8d8eca] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x127ad92) [0x7f27fe921d92] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x114beec) [0x7f27fe7f2eec] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x114b393) [0x7f27fe7f2393] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x114ab7b) [0x7f27fe7f1b7b] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x114a1c7) [0x7f27fe7f11c7] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0xe13c51) [0x7f27fe4bac51] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x813ba8) [0x7f27fdebaba8] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0xed6539) [0x7f27fe57d539] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0xfa7914) [0x7f27fe64e914] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0xfb98a2) [0x7f27fe6608a2] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0xed6539) [0x7f27fe57d539] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x10a689d) [0x7f27fe74d89d] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x10b627c) [0x7f27fe75d27c] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0xed6539) [0x7f27fe57d539] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0xed5f1a) [0x7f27fe57cf1a] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x669751) [0x7f27fdd10751] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x669455) [0x7f27fdd10455] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x60a83d) [0x7f27fdcb183d] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x609aaa) [0x7f27fdcb0aaa] /home/federico/zorba/build/bugs2/bin/zorba() [0x41224c] /home/federico/zorba/build/bugs2/bin/zorba() [0x4135bd] /home/federico/zorba/repository/bugs2/test/rbkt/Queries/zorba/updates/upd14.xq:6,22: Zorba error [zerr:ZXQP0002]: false: assertion failed; raised at /home/federico/zorba/repository/bugs2/src/store/naive/node_items.cpp:3755 - COMMAND LINE: /home/federico/zorba/build/bugs2/bin/zorba -f -q /home/federico/zorba/repository/bugs2/./test/rbkt/Queries/zorba/updates/upd14.xq - To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/912722/+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] [Bug 912593] Re: Validate in-place causes Zorba Internal Fatal error if a node which might have a simple type contains other nodes
** Changed in: zorba Assignee: Federico Cavalieri (fcavalieri) = (unassigned) ** Changed in: zorba Assignee: (unassigned) = Cezar Andrei (cezar-andrei) -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/912593 Title: Validate in-place causes Zorba Internal Fatal error if a node which might have a simple type contains other nodes Status in Zorba - The XQuery Processor: New Bug description: The following query crashes zorba with an Internal fatal error. Query import schema namespace d=http://www.zorba-xquery.org/schema; at upd14.xsd; import module namespace schema = http://www.zorba-xquery.com/modules/schema;; declare revalidation lax; declare variable $doc:=root xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://www.zorba-xquery.org/schema; a/ /root; schema:validate-in-place($doc); Schema ?xml version=1.0 encoding=UTF-8? xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema; targetNamespace=http://www.zorba-xquery.org/schema; xmlns=http://www.zorba-xquery.org/schema; elementFormDefault=qualified xs:element name=root type=xs:int/ /xs:schema To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/912593/+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/bugs-912586-912593-912722 into lp:zorba
I transferred the bugs to Cezar, thanks. They are blocking the merge of the PUL production/application. When those are fixed I think there will be another very small issue to cope with validation, which occur when I try to validate an element against a specific type definition. However, maybe a real fix to 912722 will solve this. All in all i do not consider them really urgent, because I am about to leave for a conference, and I will be basically unavailable to do real work for a week or so. Thus even if they are fixed in this timeframe the integration of the PUL branch will not occur sooner. Is a real fix to 912722 expensive to make? Cheers -- https://code.launchpad.net/~zorba-coders/zorba/bugs-912586-912593-912722/+merge/87749 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 912722] [NEW] A validate lax {}-validated element may cause assertion failures
Public bug reported: This query causes assertion failures: import schema namespace d=http://www.zorba-xquery.org/schema; at upd14.xsd; import module namespace schema = http://www.zorba-xquery.com/modules/schema;; declare revalidation lax; declare variable $x:=validate lax {root xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://www.zorba-xquery.org/schema; a/aa /root}; $x/text() Schema ?xml version=1.0 encoding=UTF-8? xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema; targetNamespace=http://www.zorba-xquery.org/schema; xmlns=http://www.zorba-xquery.org/schema; elementFormDefault=qualified xs:element name=root type=xs:anySimpleType/ /xs:schema /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x9e8f99) [0x7f27fe08ff99] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x9e9066) [0x7f27fe090066] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x121d895) [0x7f27fe8c4895] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x1231eca) [0x7f27fe8d8eca] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x127ad92) [0x7f27fe921d92] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x114beec) [0x7f27fe7f2eec] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x114b393) [0x7f27fe7f2393] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x114ab7b) [0x7f27fe7f1b7b] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x114a1c7) [0x7f27fe7f11c7] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0xe13c51) [0x7f27fe4bac51] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x813ba8) [0x7f27fdebaba8] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0xed6539) [0x7f27fe57d539] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0xfa7914) [0x7f27fe64e914] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0xfb98a2) [0x7f27fe6608a2] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0xed6539) [0x7f27fe57d539] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x10a689d) [0x7f27fe74d89d] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x10b627c) [0x7f27fe75d27c] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0xed6539) [0x7f27fe57d539] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0xed5f1a) [0x7f27fe57cf1a] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x669751) [0x7f27fdd10751] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x669455) [0x7f27fdd10455] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x60a83d) [0x7f27fdcb183d] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x609aaa) [0x7f27fdcb0aaa] /home/federico/zorba/build/bugs2/bin/zorba() [0x41224c] /home/federico/zorba/build/bugs2/bin/zorba() [0x4135bd] /home/federico/zorba/repository/bugs2/test/rbkt/Queries/zorba/updates/upd14.xq:6,22: Zorba error [zerr:ZXQP0002]: false: assertion failed; raised at /home/federico/zorba/repository/bugs2/src/store/naive/node_items.cpp:3755 - COMMAND LINE: /home/federico/zorba/build/bugs2/bin/zorba -f -q /home/federico/zorba/repository/bugs2/./test/rbkt/Queries/zorba/updates/upd14.xq - ** Affects: zorba Importance: High Assignee: Federico Cavalieri (fcavalieri) Status: New -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/912722 Title: A validate lax {}-validated element may cause assertion failures Status in Zorba - The XQuery Processor: New Bug description: This query causes assertion failures: import schema namespace d=http://www.zorba-xquery.org/schema; at upd14.xsd; import module namespace schema = http://www.zorba-xquery.com/modules/schema;; declare revalidation lax; declare variable $x:=validate lax {root xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://www.zorba-xquery.org/schema; a/aa /root}; $x/text() Schema ?xml version=1.0 encoding=UTF-8? xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema; targetNamespace=http://www.zorba-xquery.org/schema; xmlns=http://www.zorba-xquery.org/schema; elementFormDefault=qualified xs:element name=root type=xs:anySimpleType/ /xs:schema /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x9e8f99) [0x7f27fe08ff99] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x9e9066) [0x7f27fe090066] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x121d895) [0x7f27fe8c4895] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x1231eca
[Zorba-coders] [Merge] lp:~fcavalieri/zorba/bugs2 into lp:zorba
Federico Cavalieri has proposed merging lp:~fcavalieri/zorba/bugs2 into lp:zorba. Requested reviews: Markos Zaharioudakis (markos-za) For more details, see: https://code.launchpad.net/~fcavalieri/zorba/bugs2/+merge/87749 Fixed bug #912586, #912593 and #912722 (assertion failures with lax validation) -- https://code.launchpad.net/~fcavalieri/zorba/bugs2/+merge/87749 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'ChangeLog' --- ChangeLog 2012-01-05 13:20:30 + +++ ChangeLog 2012-01-06 13:32:24 + @@ -19,6 +19,7 @@ * Added split function to the string module that allows for streamable tokenization but doesn't have regular expression support. * zerr is not predeclared anymore to be http://www.zorba-xquery.com/errors + * fixed bug #912586, #912593 and #912722 (assertion failures with lax validation) version 2.1 === modified file 'src/store/naive/pul_primitives.cpp' --- src/store/naive/pul_primitives.cpp 2011-11-02 17:19:09 + +++ src/store/naive/pul_primitives.cpp 2012-01-06 13:32:24 + @@ -820,7 +820,7 @@ } else { - theTarget = theTarget-copy(NULL, copymode); +theTarget = theTarget-copy(NULL, copymode); } store-addNode(targetUri, theTarget); === modified file 'src/types/schema/SchemaValidatorFilter.cpp' --- src/types/schema/SchemaValidatorFilter.cpp 2011-06-14 17:26:33 + +++ src/types/schema/SchemaValidatorFilter.cpp 2012-01-06 13:32:24 + @@ -1543,13 +1543,19 @@ if(!theStrictValidation errDomain == XMLUni::fgValidityDomain errType != XMLErrorReporter::ErrType_Fatal - !( errCode == XMLValid::ElementNotValidForContent || + !( errCode == XMLValid::AttNotDefined || +errCode == XMLValid::AttNotDefinedForElement || +errCode == XMLValid::SimpleTypeHasChild || +errCode == XMLValid::ElementNotValidForContent || errCode == XMLValid::NotEnoughElemsForCM || errCode == XMLValid::EmptyNotValidForContent || errCode == XMLValid::AttNotDefinedForElement || errCode == XMLValid::RequiredAttrNotProvided || errCode == XMLValid::AttributeNotQualified || -errCode == XMLValid::ElementNotQualified) ) +errCode == XMLValid::ElementNotQualified) +!(theParentStack +errCode == XMLValid::ElementNotDefined) + ) return; theErrorOccurred = true; === added file 'test/rbkt/Queries/zorba/schemas/extracontent.xsd' --- test/rbkt/Queries/zorba/schemas/extracontent.xsd 1970-01-01 00:00:00 + +++ test/rbkt/Queries/zorba/schemas/extracontent.xsd 2012-01-06 13:32:24 + @@ -0,0 +1,9 @@ +?xml version=1.0 encoding=UTF-8? +xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema; +targetNamespace=http://www.zorba-xquery.org/schema; xmlns=http://www.zorba-xquery.org/schema; +elementFormDefault=qualified + +xs:element name=root type=xs:anySimpleType/ + + +/xs:schema === added file 'test/rbkt/Queries/zorba/schemas/val-attInSimpleContent-err.spec' --- test/rbkt/Queries/zorba/schemas/val-attInSimpleContent-err.spec 1970-01-01 00:00:00 + +++ test/rbkt/Queries/zorba/schemas/val-attInSimpleContent-err.spec 2012-01-06 13:32:24 + @@ -0,0 +1,1 @@ +Error: http://www.w3.org/2005/xqt-errors:XQDY0027 === added file 'test/rbkt/Queries/zorba/schemas/val-attInSimpleContent-err.xq' --- test/rbkt/Queries/zorba/schemas/val-attInSimpleContent-err.xq 1970-01-01 00:00:00 + +++ test/rbkt/Queries/zorba/schemas/val-attInSimpleContent-err.xq 2012-01-06 13:32:24 + @@ -0,0 +1,9 @@ +import schema namespace d=http://www.zorba-xquery.org/schema; at extracontent.xsd; +import module namespace schema = http://www.zorba-xquery.com/modules/schema;; + +declare revalidation lax; + +declare variable $x:=validate lax {root xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; +xmlns=http://www.zorba-xquery.org/schema; aa=aa +/root}; +$x/@* === added file 'test/rbkt/Queries/zorba/schemas/val-elmInSimpleContent-err2.spec' --- test/rbkt/Queries/zorba/schemas/val-elmInSimpleContent-err2.spec 1970-01-01 00:00:00 + +++ test/rbkt/Queries/zorba/schemas/val-elmInSimpleContent-err2.spec 2012-01-06 13:32:24 + @@ -0,0 +1,1 @@ +Error: http://www.w3.org/2005/xqt-errors:XQDY0027 === added file 'test/rbkt/Queries/zorba/schemas/val-elmInSimpleContent-err2.xq' --- test/rbkt/Queries/zorba/schemas/val-elmInSimpleContent-err2.xq 1970-01-01 00:00:00 + +++ test/rbkt/Queries/zorba/schemas/val-elmInSimpleContent-err2.xq 2012-01-06 13:32:24 + @@ -0,0 +1,10 @@ +import schema namespace d=http://www.zorba-xquery.org/schema; at extracontent.xsd; +import module namespace schema = http://www.zorba-xquery.com/modules/schema;; + +declare revalidation lax; + +declare variable $x:=validate lax {root xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; +xmlns=http://www.zorba-xquery.org/schema; +a/aa +/root}; +$x/text() === added file 'test/rbkt/Queries/zorba/schemas/val-elmInSimpleContent-err3.spec' --- test/rbkt
[Zorba-coders] [Merge] lp:~fcavalieri/zorba/bugs2 into lp:zorba
The proposal to merge lp:~fcavalieri/zorba/bugs2 into lp:zorba has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~fcavalieri/zorba/bugs2/+merge/87749 -- https://code.launchpad.net/~fcavalieri/zorba/bugs2/+merge/87749 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:~fcavalieri/zorba/bugs into lp:zorba
The proposal to merge lp:~fcavalieri/zorba/bugs into lp:zorba has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~fcavalieri/zorba/bugs/+merge/87750 -- https://code.launchpad.net/~fcavalieri/zorba/bugs/+merge/87750 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 912586] Re: Zorba Internal Fatal error when applying a PUL changes the type of a typed node
/home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x9e8f99) [0x7ff30bbf5f99] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x9e9066) [0x7ff30bbf6066] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x1217b7d) [0x7ff30c424b7d] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x1255aa3) [0x7ff30c462aa3] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x123d9cc) [0x7ff30c44a9cc] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x12435b2) [0x7ff30c4505b2] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x1245603) [0x7ff30c452603] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x124333d) [0x7ff30c45033d] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0xeefb9e) [0x7ff30c0fcb9e] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0xeef631) [0x7ff30c0fc631] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0xef3cf2) [0x7ff30c100cf2] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0xed6539) [0x7ff30c0e3539] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x10a689d) [0x7ff30c2b389d] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x10b627c) [0x7ff30c2c327c] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0xed6539) [0x7ff30c0e3539] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0xed5f1a) [0x7ff30c0e2f1a] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x669751) [0x7ff30b876751] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x669455) [0x7ff30b876455] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x60a83d) [0x7ff30b81783d] /home/federico/zorba/build/bugs2/src/libzorba_simplestore.so.2.1.0(+0x609aaa) [0x7ff30b816aaa] /home/federico/zorba/build/bugs2/bin/zorba() [0x41224c] /home/federico/zorba/build/bugs2/bin/zorba() [0x4135bd] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7ff30a54d30d] /home/federico/zorba/build/bugs2/bin/zorba() [0x410099] Zorba Internal Fatal Error in /home/federico/zorba/repository/bugs2/src/store/naive/simple_pul.cpp:1717: 0: condition failed: Unexpected error during application of revalidation PUL ./why-fail.sh: line 20: 24998 Aborted $BASEDIR/build/$STR/bin/zorba -f -q $line $BASEDIR/testing/actual.xml - COMMAND LINE: /home/federico/zorba/build/bugs2/bin/zorba -f -q /home/federico/zorba/repository/bugs2/./test/rbkt/Queries/zorba/updates/upd14.xq - -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/912586 Title: Zorba Internal Fatal error when applying a PUL changes the type of a typed node Status in Zorba - The XQuery Processor: New Bug description: If a PUL changes the type of a typed node there is a Zorba Internal Fatal error when applying. Query import schema namespace d=http://www.zorba-xquery.org/schema; at upd14.xsd; declare revalidation lax; declare variable $doc:=validate{root xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://www.zorba-xquery.org/schema; a attr=12/ b bb/ /b c/ /root}; rename node $doc//d:b as fn:QName(http://www.zorba- xquery.org/schema, newb); Schema ?xml version=1.0 encoding=UTF-8? xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema; targetNamespace=http://www.zorba-xquery.org/schema; xmlns=http://www.zorba-xquery.org/schema; elementFormDefault=qualified xs:element name=root type=rootType/ xs:complexType name=rootType xs:sequence xs:element name=a type=aType/ xs:choice xs:element name=b type=bType/ xs:element name=newb type=newbType/ /xs:choice xs:element name=c type=cType/ /xs:sequence /xs:complexType xs:complexType name=aType xs:attribute name=attr type=xs:int/ /xs:complexType xs:complexType name=bType xs:sequence xs:element name=bb type=xs:string/ /xs:sequence /xs:complexType xs:simpleType name=newbType xs:restriction base=xs:string xs:maxLength value=50/ /xs:restriction /xs:simpleType xs:simpleType name=cType xs:restriction base=xs:string xs:maxLength value=50/ /xs:restriction /xs:simpleType /xs:schema To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/912586/+subscriptions -- Mailing list: https://launchpad.net/~zorba-coders Post to : zorba-coders@lists.launchpad.net Unsubscribe :
[Zorba-coders] [Bug 912586] [NEW] Zorba Internal Fatal error when applying a PUL changes the type of a typed node
Public bug reported: If a PUL changes the type of a typed node there is a Zorba Internal Fatal error when applying. Query import schema namespace d=http://www.zorba-xquery.org/schema; at upd14.xsd; declare revalidation lax; declare variable $doc:=validate{root xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://www.zorba-xquery.org/schema; a attr=12/ b bb/ /b c/ /root}; rename node $doc//d:b as fn:QName(http://www.zorba-xquery.org/schema;, newb); Schema ?xml version=1.0 encoding=UTF-8? xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema; targetNamespace=http://www.zorba-xquery.org/schema; xmlns=http://www.zorba-xquery.org/schema; elementFormDefault=qualified xs:element name=root type=rootType/ xs:complexType name=rootType xs:sequence xs:element name=a type=aType/ xs:choice xs:element name=b type=bType/ xs:element name=newb type=newbType/ /xs:choice xs:element name=c type=cType/ /xs:sequence /xs:complexType xs:complexType name=aType xs:attribute name=attr type=xs:int/ /xs:complexType xs:complexType name=bType xs:sequence xs:element name=bb type=xs:string/ /xs:sequence /xs:complexType xs:simpleType name=newbType xs:restriction base=xs:string xs:maxLength value=50/ /xs:restriction /xs:simpleType xs:simpleType name=cType xs:restriction base=xs:string xs:maxLength value=50/ /xs:restriction /xs:simpleType /xs:schema ** Affects: zorba Importance: High Assignee: Federico Cavalieri (fcavalieri) Status: New -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/912586 Title: Zorba Internal Fatal error when applying a PUL changes the type of a typed node Status in Zorba - The XQuery Processor: New Bug description: If a PUL changes the type of a typed node there is a Zorba Internal Fatal error when applying. Query import schema namespace d=http://www.zorba-xquery.org/schema; at upd14.xsd; declare revalidation lax; declare variable $doc:=validate{root xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://www.zorba-xquery.org/schema; a attr=12/ b bb/ /b c/ /root}; rename node $doc//d:b as fn:QName(http://www.zorba- xquery.org/schema, newb); Schema ?xml version=1.0 encoding=UTF-8? xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema; targetNamespace=http://www.zorba-xquery.org/schema; xmlns=http://www.zorba-xquery.org/schema; elementFormDefault=qualified xs:element name=root type=rootType/ xs:complexType name=rootType xs:sequence xs:element name=a type=aType/ xs:choice xs:element name=b type=bType/ xs:element name=newb type=newbType/ /xs:choice xs:element name=c type=cType/ /xs:sequence /xs:complexType xs:complexType name=aType xs:attribute name=attr type=xs:int/ /xs:complexType xs:complexType name=bType xs:sequence xs:element name=bb type=xs:string/ /xs:sequence /xs:complexType xs:simpleType name=newbType xs:restriction base=xs:string xs:maxLength value=50/ /xs:restriction /xs:simpleType xs:simpleType name=cType xs:restriction base=xs:string xs:maxLength value=50/ /xs:restriction /xs:simpleType /xs:schema To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/912586/+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] [Bug 912593] [NEW] Validate in-place causes Zorba Internal Fatal error if a node which might have a simple type contains other nodes
Public bug reported: The following query crashes zorba with an Internal fatal error. Query import schema namespace d=http://www.zorba-xquery.org/schema; at upd14.xsd; import module namespace schema = http://www.zorba-xquery.com/modules/schema;; declare revalidation lax; declare variable $doc:=root xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://www.zorba-xquery.org/schema; a/ /root; schema:validate-in-place($doc); Schema ?xml version=1.0 encoding=UTF-8? xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema; targetNamespace=http://www.zorba-xquery.org/schema; xmlns=http://www.zorba-xquery.org/schema; elementFormDefault=qualified xs:element name=root type=xs:int/ /xs:schema ** Affects: zorba Importance: High Assignee: Federico Cavalieri (fcavalieri) Status: New -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/912593 Title: Validate in-place causes Zorba Internal Fatal error if a node which might have a simple type contains other nodes Status in Zorba - The XQuery Processor: New Bug description: The following query crashes zorba with an Internal fatal error. Query import schema namespace d=http://www.zorba-xquery.org/schema; at upd14.xsd; import module namespace schema = http://www.zorba-xquery.com/modules/schema;; declare revalidation lax; declare variable $doc:=root xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://www.zorba-xquery.org/schema; a/ /root; schema:validate-in-place($doc); Schema ?xml version=1.0 encoding=UTF-8? xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema; targetNamespace=http://www.zorba-xquery.org/schema; xmlns=http://www.zorba-xquery.org/schema; elementFormDefault=qualified xs:element name=root type=xs:int/ /xs:schema To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/912593/+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/structuralrelationships2 into lp:zorba
Second, when you say that you rely on it, does it mean that you may need to compare 2 node positions that were obtained in different snapshots? And if so, do you expect that the result of such a comparison says anything about the positional relationship of the two corresponding nodes at any point in time? (in other words, is what I wrote for the is-ancestor function really correct?) What you write for the ancestor function (which i copied also in the other functions) is correct although, given the current implementation, extra information would be present. For the sake of curiosity i tried to write the most precise definition possible, but I don't think that putting this into the methods comment would be an improvement: The result of the function applies to the corresponding nodes as well, in each snapshot S in which they belong to the same tree in which they belonged when the node position was computed. Follow/preceed in document order would be: If the two positions correspond to sibling text nodes and both positions were obtained in the same snapshot, then the function also applies in each snapshot S in which they belong to the same tree in which they belonged when the node position was computed. If the two positions correspond to sibling text nodes and the two positions were obtained in different snapshots, then it is impossible to determine if the node corresponding to the first position is a predecessor of the node corresponding to the second position. In all other cases, the result of the function applies to the corresponding nodes as well, in each snapshot S in which they belong to the same tree and collection in which they belonged when the node position was computed. Cheers, Federico -- https://code.launchpad.net/~zorba-coders/zorba/structuralrelationships2/+merge/78395 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/structuralrelationships2 into lp:zorba
Connection dropped... Do you know why document nodes have a component less than any other kind of node when they are the root of their tree? I finally found out what you meant (the code is in the OrdPathNode ctor, not the OrdPath ctor). I think the reason why element node as root has an extra component in its ordpath is to support fn:put on element nodes. The w3c tests require that whatever is fn:put-ed, is retrievable by fn:doc(), which means that I have to put a doc node as parent to the element node. But I think this can be fixed, because the element node is going to be copied anyway. Sorry for the wrong name. I wrote while I was travelling and I made a mistake in remembering the class name. Hope you didn't lose time figuring that out. And thanks for making the change. Another question, tree ids are expected to be unique among all tree currently in the store, or not? Yes, this is the assumption, although it is not really enforced in the simplestore. Why do you ask? At the time I wrote that I was experiencing some bugs in my main branch after trying to merge this one into. Specifically i was failing to check if two nodes were in the same tree. Apparently node in different trees had the same tree id. Since then I investigated the issue and found out that treeids are unique only within their collection or within the collection-less nodes. The store seems to be designed with this in mind and either checks if the tree itself is the same or check the collectionid first. This behaviour is because XmlTree::setCollection() in node_items.cpp does theId = collection-createTreeId(); and not: theId = GET_STORE().createTreeId(); and each collection in turn uses an internally incremented integer starting from 0. This make sense for me, since it limit the risk of going out of range with the integers, but also means that almost every single function I wrote should also check the collection id to determine if two nodes are in the same tree. I am doing this modification right now. Federico Thanks, Federico Cheers Federico -- https://code.launchpad.net/~zorba-coders/zorba/structuralrelationships2/+merge/78395 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/structuralrelationships2 into lp:zorba
Hi Markos, i noticed that the parse uri function now uses strtoul without checking errno with the following effects: A missing component is considered 0: np:in-same-tree-of(xs:anyURI(zorba:..1.50),xs:anyURI(zorba:0.0.1.50)) -true Out of ulong value-space == ULONG_MAX np:in-same-tree- of(xs:anyURI(zorba:.3 .1.50),xs :anyURI(zorba:0.2 .1.50)) -true Is this ok? Thanks Federico No, it not ok of course. It's a bug (and a similar bug existed before the switch to strtoul as well). I think I have fixed it now (and added the above 2 tests in position_err.xq). Take a look. Ok, thanks. I think there is a bug in level because the ordpath of a document node as root contains a different number of components than those of another kind of node as root. see ctor of ordpath. Why -- https://code.launchpad.net/~zorba-coders/zorba/structuralrelationships2/+merge/78395 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:~fcavalieri/zorba/structuralrelationships2 into lp:zorba
Renamed the module and function to node-position. How should I replace structural information in the functions comments? node position uri? -- https://code.launchpad.net/~zorba-coders/zorba/structuralrelationships2/+merge/78395 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/updrevalidate into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/updrevalidate/+merge/79331 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/updrevalidate into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/updrevalidate into lp:zorba has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/updrevalidate/+merge/79331 -- https://code.launchpad.net/~zorba-coders/zorba/updrevalidate/+merge/79331 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/structuralrelationships2 into lp:zorba
Should StructuralAnyUriItem::isDescendant() check that the other node is not an attribute? Yes, you are right! Descendant doesn't include attributes. May I add a in-subtree-of function with the same semantics as the current descendant? Thanks Federico -- https://code.launchpad.net/~zorba-coders/zorba/structuralrelationships2/+merge/78395 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/structuralrelationships2 into lp:zorba
Federico, I don't think it is necessary to put the position uris into the uri pool because they are not likely to be shared by multiple data items so you won't really be saving much space (you may be actually end-up wasting space because the uri pool storage has some overhead by itself). Do you agree? I agree. Fixing it. Thanks Federico -- https://code.launchpad.net/~zorba-coders/zorba/structuralrelationships2/+merge/78395 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:~fcavalieri/zorba/structuralrelationships2 into lp:zorba
The proposal to merge lp:~fcavalieri/zorba/structuralrelationships2 into lp:zorba has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~fcavalieri/zorba/structuralrelationships2/+merge/78395 -- https://code.launchpad.net/~fcavalieri/zorba/structuralrelationships2/+merge/78395 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:~fcavalieri/zorba/structuralrelationships2 into lp:zorba
The proposal to merge lp:~fcavalieri/zorba/structuralrelationships2 into lp:zorba has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~fcavalieri/zorba/structuralrelationships2/+merge/78395 -- https://code.launchpad.net/~fcavalieri/zorba/structuralrelationships2/+merge/78395 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:~fcavalieri/zorba/structuralrelationships2 into lp:zorba
The proposal to merge lp:~fcavalieri/zorba/structuralrelationships2 into lp:zorba has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~fcavalieri/zorba/structuralrelationships2/+merge/78395 -- https://code.launchpad.net/~fcavalieri/zorba/structuralrelationships2/+merge/78395 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:~fcavalieri/zorba/updrevalidate into lp:zorba
The proposal to merge lp:~fcavalieri/zorba/updrevalidate into lp:zorba has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~fcavalieri/zorba/updrevalidate/+merge/79187 -- https://code.launchpad.net/~fcavalieri/zorba/updrevalidate/+merge/79187 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:~fcavalieri/zorba/updrevalidate into lp:zorba
The proposal to merge lp:~fcavalieri/zorba/updrevalidate into lp:zorba has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~fcavalieri/zorba/updrevalidate/+merge/79187 -- https://code.launchpad.net/~fcavalieri/zorba/updrevalidate/+merge/79187 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/updrevalidate into lp:zorba
Review: Approve -- https://code.launchpad.net/~zorba-coders/zorba/updrevalidate/+merge/79187 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/updrevalidate into lp:zorba
The proposal to merge lp:~zorba-coders/zorba/updrevalidate into lp:zorba has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/updrevalidate/+merge/79187 -- https://code.launchpad.net/~zorba-coders/zorba/updrevalidate/+merge/79187 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 872799] Re: validate-in-place can set incorrect types
** Changed in: zorba Status: New = Fix Released -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/872799 Title: validate-in-place can set incorrect types Status in Zorba - The XQuery Processor: Fix Released Bug description: validate-in-place can set incorrect types. The following query should produce a smallEl with type smallEl, but it produces a smallEl typed as bigEl. import module namespace schema = http://www.zorba-xquery.com/modules/schema;; import schema namespace d=http://www.example.com/doc; at test23.xsd; import module namespace file = http://expath.org/ns/file;; declare revalidation lax; variable $doc:=items xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://www.zorba-xquery.org/schema; bigEl aold/a /bigEl /items; ( schema:validate-in-place($doc), rename node $doc/*:bigEl as QName(http://www.zorba-xquery.org/schema,smallEl;) ); for $x in ($doc//*) return (node name={node-name($x)} type={schema:schema-type($x)}/) Schema xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema; targetNamespace=http://www.zorba-xquery.org/schema; xmlns=http://www.zorba-xquery.org/schema; elementFormDefault=qualified xs:element name=items xs:complexType xs:choice maxOccurs=unbounded xs:element name=bigEl type=bigEl/ xs:element name=smallEl type=smallEl/ /xs:choice /xs:complexType /xs:element xs:complexType name=bigEl xs:sequence xs:element name=a type=xs:string/ /xs:sequence /xs:complexType xs:complexType name=smallEl xs:sequence xs:element name=a type=xs:string/ /xs:sequence /xs:complexType /xs:schema To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/872799/+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/updrevalidate into lp:zorba
Sure, but to me it looks like no change has been made at all (Preview Diff contains only the word Empty) and no In a few minutes the diff will be updated. Maybe I just have to wait... Yes I just had to wait -- https://code.launchpad.net/~zorba-coders/zorba/updrevalidate/+merge/79331 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/updrevalidate into lp:zorba
Why variable numUpdates in PULImpl::mergeUpdateList is declared, assigned but never read? Good question :) The easy answer is to just remove it. But I think it can actually be used to replace the myList.size() in the 2 for loops at lines 1289 and 1308. Even though new entries can be added in myList during each iteration of the outer for-loop, I think that during those 2 inner for-loops it is ok to search myList only up to numUpdates. Do you agree? Yes I agree, the ops in the other PUL cannot conflict with each other. A conflict must be between one of the operation of the first pul and one of the second pul. -- https://code.launchpad.net/~zorba-coders/zorba/updrevalidate/+merge/79331 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:~fcavalieri/zorba/bugs into lp:zorba
Federico Cavalieri has proposed merging lp:~fcavalieri/zorba/bugs into lp:zorba. Requested reviews: Markos Zaharioudakis (markos-za) For more details, see: https://code.launchpad.net/~fcavalieri/zorba/bugs/+merge/79070 Fixed bug #872697 Updated Changelog for bugs #872697, #871623 and #871629 -- https://code.launchpad.net/~fcavalieri/zorba/bugs/+merge/79070 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'ChangeLog' --- ChangeLog 2011-10-10 19:29:05 + +++ ChangeLog 2011-10-12 07:21:30 + @@ -41,11 +41,13 @@ * Fixed bug #863730 (static delete-node* functions don't raise ZDDY0012) * Implemented the probe-index-range-value for general indexes * Fixed bug #867662 (nullptr warning) + * Fixed bug #871623 and #871629 (assertion failures with insertions in dynamic collections) * Fixed bug #867262 (allow reuse of iterator over ExtFuncArgItemSequence) * Fixed bug #869024 (segmentation fault with node-reference) * Fixed bug #869025 (segmentation fault with node-reference) * New node-reference module. References can be obtained for any node, and different nodes cannot have the same identifier. + * Fixed bug #872697 (segmentation fault with validation of NMTOKENS) version 2.0.1 === modified file 'src/store/naive/simple_item_factory.cpp' --- src/store/naive/simple_item_factory.cpp 2011-07-22 07:23:17 + +++ src/store/naive/simple_item_factory.cpp 2011-10-12 07:21:30 + @@ -162,7 +162,7 @@ for ( unsigned int i = 0; i atomicTextValues.size() ; i++) { store::Item_t resultItem; -if ( createNMTOKENS(resultItem, atomicTextValues[i]) ) +if ( createNMTOKEN(resultItem, atomicTextValues[i]) ) { typedValues.push_back(resultItem.getp()); } === added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-xml-fragment-18.xml.res' --- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-xml-fragment-18.xml.res 1970-01-01 00:00:00 + +++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-xml-fragment-18.xml.res 2011-10-12 07:21:30 + @@ -0,0 +1,2 @@ +?xml version=1.0 encoding=UTF-8? +note nmt=aaa/ \ No newline at end of file === added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-18.xq' --- test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-18.xq 1970-01-01 00:00:00 + +++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-18.xq 2011-10-12 07:21:30 + @@ -0,0 +1,10 @@ +import module namespace x = http://www.zorba-xquery.com/modules/xml;; + +x:parse-xml-fragment(?xml version='1.0'? +!DOCTYPE note [ +!ELEMENT note (#PCDATA) +!ATTLIST note nmt NMTOKENS #REQUIRED +] +note nmt='aaa'/ +, +d) -- 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:~fcavalieri/zorba/bugs into lp:zorba
The proposal to merge lp:~fcavalieri/zorba/bugs into lp:zorba has been updated. Commit Message changed to: Fixed bug #872697 Updated Changelog for bugs #872697, #871623 and #871629 For more details, see: https://code.launchpad.net/~fcavalieri/zorba/bugs/+merge/79070 -- https://code.launchpad.net/~fcavalieri/zorba/bugs/+merge/79070 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:~fcavalieri/zorba/bugs into lp:zorba
The proposal to merge lp:~fcavalieri/zorba/bugs into lp:zorba has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~fcavalieri/zorba/bugs/+merge/79070 -- https://code.launchpad.net/~fcavalieri/zorba/bugs/+merge/79070 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 871623] Re: Assertion failed with insert after in a collection
** Changed in: zorba Status: New = Fix Released -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/871623 Title: Assertion failed with insert after in a collection Status in Zorba - The XQuery Processor: Fix Released Bug description: The following query crashes zorba with an assertion failure: import module namespace ddl = http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl;; import module namespace dml = http://www.zorba-xquery.com/modules/store/dynamic/collections/dml;; ddl:create(xs:QName(ddl:test2),(center1/,oldlast/)); dml:insert-nodes-after(xs:QName(ddl:test2), dml:collection(xs:QName(ddl:test2))[1], (c1/,c2/)); dml:collection(xs:QName(ddl:test2))/self::node() Also import module namespace ddl = http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl;; import module namespace dml = http://www.zorba-xquery.com/modules/store/dynamic/collections/dml;; ddl:create(xs:QName(ddl:test2),(center1/,oldlast/)); dml:insert-nodes-before(xs:QName(ddl:test2), dml:collection(xs:QName(ddl:test2))[2], (c1/,c2/)); dml:collection(xs:QName(ddl:test2))/self::node() To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/871623/+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] [Bug 869025] Re: Segmentation fault with getReference
** Changed in: zorba Status: New = Fix Released -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/869025 Title: Segmentation fault with getReference Status in Zorba - The XQuery Processor: Fix Released Bug description: The following query causes a segmentation fault: import module namespace ddl = http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl;; import module namespace dml = http://www.zorba-xquery.com/modules/store/dynamic/collections/dml;; import module namespace ref = http://www.zorba-xquery.com/modules/node-reference;; ddl:create(xs:QName(ddl:coll)); dml:insert-nodes-last(xs:QName(ddl:coll),text {aa}); ref:node-reference(dml:collection(xs:QName(ddl:coll))) To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/869025/+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] [Bug 869024] Re: Zorba crashes with getReference
** Changed in: zorba Status: New = Fix Released -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/869024 Title: Zorba crashes with getReference Status in Zorba - The XQuery Processor: Fix Released Bug description: The following query sometimes causes Zorba to crash: import module namespace ddl = http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl;; import module namespace dml = http://www.zorba-xquery.com/modules/store/dynamic/collections/dml;; import module namespace ref = http://www.zorba-xquery.com/modules/node-reference;; ddl:create(xs:QName(ddl:coll)); dml:insert-nodes-last(xs:QName(ddl:coll),element {bb}{text {aa}}); ref:node-reference(dml:collection(xs:QName(ddl:coll))) This is caused by the following cast: const OrdPathNode* n = static_castconst OrdPathNode*(node); which is not correct when node is a TextNode To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/869024/+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:~fcavalieri/zorba/bugs into lp:zorba
Review: Approve -- https://code.launchpad.net/~fcavalieri/zorba/bugs/+merge/79070 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:~fcavalieri/zorba/bugs into lp:zorba
The proposal to merge lp:~fcavalieri/zorba/bugs into lp:zorba has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~fcavalieri/zorba/bugs/+merge/79070 -- https://code.launchpad.net/~fcavalieri/zorba/bugs/+merge/79070 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:~fcavalieri/zorba/bugs2 into lp:zorba
Review: Approve -- https://code.launchpad.net/~fcavalieri/zorba/bugs2/+merge/78401 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:~fcavalieri/zorba/bugs2 into lp:zorba
The proposal to merge lp:~fcavalieri/zorba/bugs2 into lp:zorba has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~fcavalieri/zorba/bugs2/+merge/78401 -- https://code.launchpad.net/~fcavalieri/zorba/bugs2/+merge/78401 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:~fcavalieri/zorba/setsatundo into lp:zorba
The proposal to merge lp:~fcavalieri/zorba/setsatundo into lp:zorba has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~fcavalieri/zorba/setsatundo/+merge/79093 -- https://code.launchpad.net/~fcavalieri/zorba/setsatundo/+merge/79093 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