[Zorba-coders] [Bug 929351] Re: schema resolution only finds 1 resource
If you want to have a single URI resolve to multiple resources, you need to register a Component URI Mapper; see http://www.zorba- xquery.com/html/documentation/2.1.0/zorba/uriresolvers However, this mechanism is currently only used for module import. It would be easy to call it for schema resolution as well, but Im not sure how or if Xerces supports loading schemas from multiple files. Can you give an example of a multi-part schema? -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/929351 Title: schema resolution only finds 1 resource Status in Zorba - The XQuery Processor: New Bug description: The schema for a single target namespace can be distributed across several files (or other resources). However, it seems (from looking at the URI resolution code) that only 1 resource can be returned. To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/929351/+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] [Bug 929351] Re: schema resolution only finds 1 resource
You can have multiple schema files all with the same target namespace. Xerces does support it loading them all, it's a fairly common practice. Cezar On Thu, Feb 9, 2012 at 1:55 AM, Chris Hillery 929...@bugs.launchpad.netwrote: If you want to have a single URI resolve to multiple resources, you need to register a Component URI Mapper; see http://www.zorba- xquery.com/html/documentation/2.1.0/zorba/uriresolvers However, this mechanism is currently only used for module import. It would be easy to call it for schema resolution as well, but Im not sure how or if Xerces supports loading schemas from multiple files. Can you give an example of a multi-part schema? -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/929351 Title: schema resolution only finds 1 resource Status in Zorba - The XQuery Processor: New Bug description: The schema for a single target namespace can be distributed across several files (or other resources). However, it seems (from looking at the URI resolution code) that only 1 resource can be returned. To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/929351/+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 -- 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/jsoniq into lp:~zorba-coders/zorba/zorba-experimental
The proposal to merge lp:~zorba-coders/zorba/jsoniq into lp:~zorba-coders/zorba/zorba-experimental has been updated. Commit Message changed to: ... For more details, see: https://code.launchpad.net/~zorba-coders/zorba/jsoniq/+merge/92335 -- https://code.launchpad.net/~zorba-coders/zorba/jsoniq/+merge/92335 Your team Zorba Coders is requested to review the proposed merge of lp:~zorba-coders/zorba/jsoniq into lp:~zorba-coders/zorba/zorba-experimental. -- 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/jsoniq into lp:~zorba-coders/zorba/zorba-experimental
The proposal to merge lp:~zorba-coders/zorba/jsoniq into lp:~zorba-coders/zorba/zorba-experimental has been updated. Commit Message changed to: ... For more details, see: https://code.launchpad.net/~zorba-coders/zorba/jsoniq/+merge/92348 -- https://code.launchpad.net/~zorba-coders/zorba/jsoniq/+merge/92348 Your team Zorba Coders is requested to review the proposed merge of lp:~zorba-coders/zorba/jsoniq into lp:~zorba-coders/zorba/zorba-experimental. -- 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/jsoniq into lp:~zorba-coders/zorba/zorba-experimental
The proposal to merge lp:~zorba-coders/zorba/jsoniq into lp:~zorba-coders/zorba/zorba-experimental has been updated. Status: Needs review = Approved For more details, see: https://code.launchpad.net/~zorba-coders/zorba/jsoniq/+merge/92348 -- https://code.launchpad.net/~zorba-coders/zorba/jsoniq/+merge/92348 Your team Zorba Coders is requested to review the proposed merge of lp:~zorba-coders/zorba/jsoniq into lp:~zorba-coders/zorba/zorba-experimental. -- 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/jsoniq into lp:~zorba-coders/zorba/zorba-experimental
The attempt to merge lp:~zorba-coders/zorba/jsoniq into lp:~zorba-coders/zorba/zorba-experimental failed. Below is the output from the failed tests. experimental build started for lp:~zorba-coders/zorba/jsoniq. Check out http://jsoniq.zorba-xquery.com/ in half an hour or so. Logfile at http://zorbatest.lambda.nu:8080/remotequeue/experimental/jsoniq.log . -- https://code.launchpad.net/~zorba-coders/zorba/jsoniq/+merge/92348 Your team Zorba Coders is requested to review the proposed merge of lp:~zorba-coders/zorba/jsoniq into lp:~zorba-coders/zorba/zorba-experimental. -- 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/jsoniq into lp:~zorba-coders/zorba/zorba-experimental
The proposal to merge lp:~zorba-coders/zorba/jsoniq into lp:~zorba-coders/zorba/zorba-experimental has been updated. Status: Approved = Needs review For more details, see: https://code.launchpad.net/~zorba-coders/zorba/jsoniq/+merge/92348 -- https://code.launchpad.net/~zorba-coders/zorba/jsoniq/+merge/92348 Your team Zorba Coders is requested to review the proposed merge of lp:~zorba-coders/zorba/jsoniq into lp:~zorba-coders/zorba/zorba-experimental. -- 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-923015 into lp:zorba
Paul J. Lucas has proposed merging lp:~paul-lucas/zorba/bug-923015 into lp:zorba. Requested reviews: Matthias Brantner (matthias-brantner) William Candillon (wcandillon) Related bugs: Bug #923015 in Zorba: clone() not implemented for full-text expressions https://bugs.launchpad.net/zorba/+bug/923015 For more details, see: https://code.launchpad.net/~paul-lucas/zorba/bug-923015/+merge/92398 Added clone(). -- https://code.launchpad.net/~paul-lucas/zorba/bug-923015/+merge/92398 Your team Zorba Coders is subscribed to branch lp:zorba. === modified file 'ChangeLog' --- ChangeLog 2012-02-07 14:26:42 + +++ ChangeLog 2012-02-10 01:03:24 + @@ -2,6 +2,7 @@ version 2.2 + * Fixed bug 923015 (clone() not implemented for full-text expressions) * No-copy optimization: avoids copying nodes during node-constructor expressions. * Added external function annotations %ann:propagates-input-nodes and %ann:must-copy-input-nodes to be used by the no-copy optimization. === modified file 'src/compiler/expression/ft_expr.cpp' --- src/compiler/expression/ft_expr.cpp 2011-06-14 17:26:33 + +++ src/compiler/expression/ft_expr.cpp 2012-02-10 01:03:24 + @@ -58,6 +58,15 @@ v.end_visit( *this ); } +expr_t ftcontains_expr::clone( substitution_t s ) const { + return new ftcontains_expr( +theSctx, get_loc(), +range_-clone( s ), +ftselection_-clone( s ).release(), +ftignore_.isNull() ? 0 : ftignore_-clone( s ) + ); +} + void ftcontains_expr::compute_scripting_kind() { checkSimpleExpr(range_); === modified file 'src/compiler/expression/ft_expr.h' --- src/compiler/expression/ft_expr.h 2012-01-11 17:30:25 + +++ src/compiler/expression/ft_expr.h 2012-02-10 01:03:24 + @@ -37,13 +37,14 @@ void serialize( serialization::Archiver ); ftcontains_expr( -static_context* sctx, +static_context*, QueryLoc const, expr_t range, ftnode *ftselection, expr_t ftignore ); + expr_t clone( substitution_t ) const; void compute_scripting_kind(); expr_t get_range() const { return range_; } @@ -63,7 +64,6 @@ } // namespace zorba #endif /* ZORBA_FT_EXPR_H */ - /* * Local variables: * mode: c++ === modified file 'src/compiler/expression/ftnode.cpp' --- src/compiler/expression/ftnode.cpp 2012-02-02 09:56:52 + +++ src/compiler/expression/ftnode.cpp 2012-02-10 01:03:24 + @@ -30,6 +30,7 @@ #include ftnode_visitor.h using namespace std; +using namespace zorba::locale; namespace zorba { @@ -199,6 +200,37 @@ /// +templatetypename PointerType +inline PointerType clone_ptr( PointerType p, expr::substitution_t s ) { + return static_castPointerType( p-clone( s ).release() ); +} + +templateclass RCHandleValueType +inline RCHandleValueType* clone_ptr( rchandleRCHandleValueType const p, + expr::substitution_t s ) { + return static_castRCHandleValueType*( p-clone( s ).release() ); +} + +templatetypename PointerType +inline PointerType clone_ptr_if( PointerType p, expr::substitution_t s ) { + return p ? clone_ptr( p, s ) : nullptr; +} + +templateclass RCHandleValueType +inline RCHandleValueType* clone_ptr_if( rchandleRCHandleValueType const p, +expr::substitution_t s ) { + return p.isNull() ? nullptr : clone_ptr( p, s ); +} + +templateclass ContainerType +void clone_list( ContainerType const from, ContainerType *to, + expr::substitution_t s ) { + FOR_EACH( typename ContainerType, i, from ) +to-push_back( clone_ptr( *i, s ) ); +} + +/// + void ftnode::serialize( serialization::Archiver ar ) { ar loc_; } @@ -214,6 +246,12 @@ END_VISIT( v ); } +ftnode_t ftand::clone( expr::substitution_t s ) const { + ftnode_list_t copy; + clone_list( get_node_list(), copy, s ); + return new ftand( get_loc(), copy ); +} + ostream ftand::put( ostream o ) const { BEGIN_INDENT_PUT( o, ftand ); PUT_SEQ( o, ftnode_list_t, get_node_list() ); @@ -238,6 +276,10 @@ END_VISIT( v ); } +ftnode_t ftcase_option::clone( expr::substitution_t ) const { + return new ftcase_option( get_loc(), mode_ ); +} + ostream ftcase_option::put( ostream o ) const { BEGIN_PUT( o, ftcase_option ); PUT_ATTR( o, mode ) endl; @@ -262,6 +304,10 @@ END_VISIT( v ); } +ftnode_t ftcontent_filter::clone( expr::substitution_t s ) const { + return new ftcontent_filter( get_loc(), mode_ ); +} + void ftcontent_filter::serialize( serialization::Archiver ar ) { serialize_baseclass( ar, (ftpos_filter*)this ); SERIALIZE_ENUM(ft_content_mode::type, mode_); @@ -287,6 +333,10 @@ END_VISIT( v ); } +ftnode_t ftdiacritics_option::clone( expr::substitution_t ) const { + return new ftdiacritics_option( get_loc(), mode_ ); +} + ostream ftdiacritics_option::put( ostream o ) const { BEGIN_PUT(
[Zorba-coders] [Bug 928340] Re: Full-Text Assertion failed
** Changed in: zorba Status: In Progress = Fix Committed -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/928340 Title: Full-Text Assertion failed Status in Zorba - The XQuery Processor: Fix Committed Bug description: The following query: let $x := msgaffluent man/msg return $x contains text wealthy using thesaurus at http://wordnet.princeton.edu; Returns ?xml version=1.0 encoding=UTF-8? 0 libzorba_simplestore.2.1.0.dylib0x000107813f8c _ZN5zorba16assertion_failedEPKcS1_i + 60 1 libzorba_simplestore.2.1.0.dylib0x000107ca37e4 _ZN5zorba18ftcontains_visitor16lookup_thesaurusERKNS_14ftthesaurus_idERKNS_7rstringINS_15rstring_classes3repINS_10atomic_intESt11char_traitsIcESaIcERKNS_7FTTokenERSt4listINS_8rchandleINS_15FTTokenIteratorEEESaISL_EE + 440 2 libzorba_simplestore.2.1.0.dylib0x000107ca3d36 _ZN5zorba18ftcontains_visitor22apply_thesaurus_optionEPKNS_18ftthesaurus_optionERKNS_7rstringINS_15rstring_classes3repINS_10atomic_intESt11char_traitsIcESaIcERKNS_7FTTokenERSt4listINS_8rchandleINS_15FTTokenIteratorEEESaISL_EEb + 180 3 libzorba_simplestore.2.1.0.dylib0x000107ca529a _ZN5zorba18ftcontains_visitor28apply_query_tokens_as_phraseERNS_15FTTokenIteratorEjPKNS_5store4ItemERKNS_15ftmatch_optionsERKNS_16ft_token_matcherERSt4listINS_8ft_matchESaISE_EE + 494 4 libzorba_simplestore.2.1.0.dylib0x000107ca65f4 _ZN5zorba18ftcontains_visitor20apply_ftwords_phraseERSt4listINS_8rchandleINS_15FTTokenIteratorEEESaIS4_EEjPKNS_5store4ItemERKNS_15ftmatch_optionsERKNS_16ft_token_matcherERS1_INS_8ft_matchESaISI_EE + 90 5 libzorba_simplestore.2.1.0.dylib0x000107ca5c0f _ZN5zorba18ftcontains_visitor17apply_ftwords_anyERSt4listINS_8rchandleINS_15FTTokenIteratorEEESaIS4_EEjPKNS_5store4ItemERKNS_15ftmatch_optionsERKNS_16ft_token_matcherERS1_INS_8ft_matchESaISI_EE + 189 6 libzorba_simplestore.2.1.0.dylib0x000107ca6b6e _ZN5zorba18ftcontains_visitor13apply_ftwordsERSt4listINS_8rchandleINS_15FTTokenIteratorEEESaIS4_EEjPKNS_5store4ItemENS_14ft_anyall_mode4typeERKNS_15ftmatch_optionsERS1_INS_8ft_matchESaISH_EE + 336 7 libzorba_simplestore.2.1.0.dylib0x000107ca9ccc _ZN5zorba18ftcontains_visitor9end_visitERNS_7ftwordsE + 532 8 libzorba_simplestore.2.1.0.dylib0x0001076dad30 _ZN5zorba7ftwords6acceptERNS_14ftnode_visitorE + 96 9 libzorba_simplestore.2.1.0.dylib0x0001076d9d4f _ZN5zorba13ftwords_times6acceptERNS_14ftnode_visitorE + 59 10 libzorba_simplestore.2.1.0.dylib0x0001076d9aea _ZN5zorba22ftprimary_with_options6acceptERNS_14ftnode_visitorE + 56 11 libzorba_simplestore.2.1.0.dylib0x0001076daf9c _ZN5zorba11ftselection6acceptERNS_14ftnode_visitorE + 60 12 libzorba_simplestore.2.1.0.dylib0x000107caf347 _ZNK5zorba18FTContainsIterator8nextImplERNS_5store10ItemHandleINS1_4ItemEEERNS_9PlanStateE + 421 13 libzorba_simplestore.2.1.0.dylib0x000107cadff9 _ZNK5zorba7BatcherINS_18FTContainsIteratorEE11produceNextERNS_5store10ItemHandleINS3_4ItemEEERNS_9PlanStateE + 9 14 libzorba_simplestore.2.1.0.dylib0x000107b50450 _ZN5zorba11PlanWrapper4nextERNS_5store10ItemHandleINS1_4ItemEEE + 104 15 libzorba_simplestore.2.1.0.dylib0x0001075788a8 _ZN5zorba10serializer9serializeENS_8rchandleINS_5store8IteratorEEERSoPNS_19SAX2_ContentHandlerE + 728 16 libzorba_simplestore.2.1.0.dylib0x000107578a28 _ZN5zorba10serializer9serializeENS_8rchandleINS_5store8IteratorEEERSo + 62 17 libzorba_simplestore.2.1.0.dylib0x0001075303aa _ZN5zorba10XQueryImpl9serializeERSoRNS_8rchandleINS_11PlanWrapperEEEPK23Zorba_SerializerOptions + 142 18 libzorba_simplestore.2.1.0.dylib0x0001075305f4 _ZN5zorba10XQueryImpl7executeERSoPK23Zorba_SerializerOptions + 428 19 zorba 0x00010750fb66 _Z17compileAndExecutePN5zorba5ZorbaERK18ZorbaCMDPropertiesRNS_8SmartPtrINS_13StaticContextEEERKSsRSiRSoR10TimingInfo + 1318 20 zorba 0x000107511640 main + 3792 21 zorba 0x00010750e794 start + 52 22 ??? 0x0004 0x0 + 4 Zorba error [zerr:ZXQP0002]: thesaurus: assertion failed To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/928340/+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 923015] Re: clone() not implemented for full-text expressions
** Branch linked: lp:~paul-lucas/zorba/bug-923015 -- You received this bug notification because you are a member of Zorba Coders, which is the registrant for Zorba. https://bugs.launchpad.net/bugs/923015 Title: clone() not implemented for full-text expressions Status in Zorba - The XQuery Processor: In Progress Bug description: The following query: declare function local:foo(){ let $x := msgbreakfast of champions/msg return $x contains text meal using thesaurus at /Users/wcandillon/demo/wordnet-en.zth relationship narrower term }; local:foo() Returns: Zorba error [zerr:ZXQP0003]: internal error: clone() not implemented for expression; raised at /Users/wcandillon/28msec/zorba/sandbox/src/compiler/rewriter/rules/fold_rules.cpp:1106 However the following query: let $x := msgbreakfast of champions/msg return $x contains text meal using thesaurus at /Users/wcandillon/demo/wordnet-en.zth relationship narrower term Works fine. To manage notifications about this bug go to: https://bugs.launchpad.net/zorba/+bug/923015/+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