Merge lp:~zorba-coders/zorba/feature-ft_module into lp:~zorba-coders/zorba/zorba-experimental

Proposed by Matthias Brantner
Status: Superseded
Proposed branch: lp:~zorba-coders/zorba/feature-ft_module
Merge into: lp:~zorba-coders/zorba/zorba-experimental
Diff against target: 266360 lines (+130821/-69586)
1895 files modified
CMakeConfiguration.txt (+0/-4)
CMakeLists.txt (+52/-20)
CPackSourceConfig.cmake.in (+1/-1)
ChangeLog (+149/-13)
NOTICE.txt (+1/-1)
README.txt (+2/-2)
bin/CMakeLists.txt (+58/-19)
bin/debug_client/debug_command.cpp (+0/-99)
bin/debug_client/event_handler_init.cpp.in (+0/-41)
bin/debug_client/lock_free_queue.cpp (+0/-16)
bin/debug_client/message-handler.xq (+0/-165)
bin/debugger/command.h (+164/-211)
bin/debugger/command_arg.h (+237/-0)
bin/debugger/command_line_handler.cpp (+364/-204)
bin/debugger/command_line_handler.h (+116/-58)
bin/debugger/command_prompt.cpp (+287/-0)
bin/debugger/command_prompt.h (+72/-0)
bin/debugger/config.h.cmake (+24/-0)
bin/debugger/event_handler.cpp (+81/-76)
bin/debugger/event_handler.h (+25/-12)
bin/debugger/lock_free_queue.h (+10/-2)
bin/debugger/main.cpp (+340/-18)
bin/debugger/process_listener.cpp (+105/-0)
bin/debugger/process_listener.h (+75/-0)
bin/debugger/tuple.h (+6/-0)
bin/debugger/xqdb_client.cpp (+63/-0)
bin/debugger/xqdb_client.h (+51/-0)
bin/path_util.cpp (+60/-45)
bin/path_util.h (+9/-24)
bin/zorbacmd.cpp (+131/-56)
bin/zorbacmdproperties.cpp (+14/-5)
bin/zorbacmdproperties.h (+7/-1)
bin/zorbacmdproperties.txt (+5/-1)
bin/zorbacmdproperties_base.h (+33/-3)
cmake_modules/FindLibedit.cmake (+46/-0)
cmake_modules/FindPHP5.cmake (+5/-0)
cmake_modules/Windows/ProxyFindModule.cmake (+37/-0)
cmake_modules/ZorbaModule.cmake (+195/-96)
config/CMakeLists.txt (+5/-5)
config/ZorbaConfig.cmake.in (+7/-4)
doc/c/doxy.config.in (+1112/-555)
doc/c/manual/indexpage.dox (+1/-1)
doc/cxx/doxy.config.in (+1118/-554)
doc/cxx/examples/errors.cpp (+4/-4)
doc/cxx/examples/simple.cpp (+17/-10)
doc/java/doxy.config.in (+1113/-555)
doc/java/examples/CMakeLists.txt (+1/-0)
doc/php/CMakeLists.txt (+1/-1)
doc/php/doxy.config.in (+1113/-555)
doc/php/examples/CMakeLists.txt (+12/-4)
doc/php/examples/php.ini.in (+1/-0)
doc/php/examples/simple.php.in (+2/-2)
doc/php/examples/test.php.in (+120/-0)
doc/php/examples/zorba_api.php (+1/-1)
doc/php/manual/indexpage.dox (+5/-9)
doc/python/doxy.config.in (+1113/-555)
doc/ruby/doxy.config.in (+1113/-555)
doc/zorba/CMakeLists.txt (+2/-0)
doc/zorba/build.dox (+10/-6)
doc/zorba/build_noncore.dox (+6/-6)
doc/zorba/build_options.dox (+35/-0)
doc/zorba/commandline.dox (+13/-14)
doc/zorba/conformance.dox (+4/-4)
doc/zorba/conformanceXQFTTS.dox (+74/-74)
doc/zorba/data_lifecycle.dox (+2/-2)
doc/zorba/doxy.config.in (+1113/-551)
doc/zorba/external_functions.dox (+4/-4)
doc/zorba/ft_intro.dox (+5/-5)
doc/zorba/ft_thesaurus.dox (+41/-37)
doc/zorba/ft_tokenizer.dox (+117/-49)
doc/zorba/impl_dep_features.dox (+2/-2)
doc/zorba/indexpage.dox.in (+62/-140)
doc/zorba/installation.dox (+3/-4)
doc/zorba/link_crawler2.dox (+238/-0)
doc/zorba/memory_leaks.dox (+141/-0)
doc/zorba/modules_authoring.dox (+2/-3)
doc/zorba/modules_authoring_2.dox (+9/-3)
doc/zorba/modules_building_in.dox (+2/-2)
doc/zorba/options.dox (+233/-54)
doc/zorba/php_ubuntu.dox (+2/-4)
doc/zorba/php_windows.dox (+0/-2)
doc/zorba/schema_lifecycle.dox (+1/-1)
doc/zorba/uriresolvers.dox (+120/-38)
doc/zorba/web_crawler.dox (+141/-46)
doc/zorba/xqddf.dox (+224/-214)
doc/zorba/xqdoc/templates/main.html (+36/-24)
include/xqc.h (+9/-9)
include/zorba/config.h.cmake (+15/-10)
include/zorba/debugger_client.h (+14/-2)
include/zorba/diagnostic.h (+4/-1)
include/zorba/dynamic_context.h (+14/-1)
include/zorba/identtypes.h (+16/-2)
include/zorba/internal/diagnostic.h (+3/-0)
include/zorba/internal/proxy.h (+48/-0)
include/zorba/internal/type_traits.h (+3/-1)
include/zorba/internal/unique_ptr.h (+2/-2)
include/zorba/internal/ztd.h (+2/-1)
include/zorba/item.h (+52/-3)
include/zorba/item_factory.h (+80/-2)
include/zorba/item_sequence.h (+10/-3)
include/zorba/iterator.h (+2/-0)
include/zorba/locale.h (+189/-15)
include/zorba/options.h (+19/-4)
include/zorba/pregenerated/diagnostic_list.h (+66/-4)
include/zorba/static_collection_manager.h (+66/-3)
include/zorba/static_context.h (+639/-529)
include/zorba/static_context_consts.h (+2/-1)
include/zorba/stemmer.h (+17/-0)
include/zorba/thesaurus.h (+24/-28)
include/zorba/tokenizer.h (+129/-52)
include/zorba/transcode_stream.h (+213/-0)
include/zorba/typeident.h (+34/-1)
include/zorba/uri_resolvers.h (+18/-3)
include/zorba/xquery.h (+24/-7)
include/zorba/zorba.h (+1/-0)
include/zorba/zorbac.h (+16/-16)
modules/CMakeLists.txt (+1/-1)
modules/DownloadModules.cmake (+59/-28)
modules/ExternalModules.conf (+23/-17)
modules/com/zorba-xquery/www/modules/CMakeLists.txt (+28/-1)
modules/com/zorba-xquery/www/modules/converters/base64.xq (+6/-3)
modules/com/zorba-xquery/www/modules/converters/json-options.xsd (+60/-0)
modules/com/zorba-xquery/www/modules/converters/json.xq (+260/-0)
modules/com/zorba-xquery/www/modules/debugger/dbgp-message-handler.xq (+291/-0)
modules/com/zorba-xquery/www/modules/full-text.xq (+684/-0)
modules/com/zorba-xquery/www/modules/full-text.xsd (+134/-0)
modules/com/zorba-xquery/www/modules/http-client.xq (+2/-2)
modules/com/zorba-xquery/www/modules/http-client.xq.src/curl_stream_buffer.cpp (+337/-338)
modules/com/zorba-xquery/www/modules/http-client.xq.src/curl_stream_buffer.h (+164/-143)
modules/com/zorba-xquery/www/modules/http-client.xq.src/http_client.cpp (+5/-2)
modules/com/zorba-xquery/www/modules/http-client.xq.src/http_response_handler.cpp (+4/-4)
modules/com/zorba-xquery/www/modules/http-client.xq.src/http_response_parser.cpp (+71/-21)
modules/com/zorba-xquery/www/modules/http-client.xq.src/http_response_parser.h (+10/-6)
modules/com/zorba-xquery/www/modules/node-position.xq (+524/-0)
modules/com/zorba-xquery/www/modules/node-reference.xq (+25/-15)
modules/com/zorba-xquery/www/modules/pregenerated/errors.xq (+126/-9)
modules/com/zorba-xquery/www/modules/pregenerated/warnings.xq (+20/-1)
modules/com/zorba-xquery/www/modules/store/dynamic/collections/dml.xq (+16/-3)
modules/com/zorba-xquery/www/modules/store/static/collections/dml.xq (+15/-0)
modules/com/zorba-xquery/www/modules/store/static/indexes/dml.xq (+187/-60)
modules/com/zorba-xquery/www/modules/string.xq (+21/-1)
modules/com/zorba-xquery/www/modules/uri.xq (+108/-0)
modules/com/zorba-xquery/www/modules/xml-options.xsd (+86/-0)
modules/com/zorba-xquery/www/modules/xml.xq (+240/-4)
modules/com/zorba-xquery/www/modules/xqdoc2xhtml/index.xq (+48/-27)
modules/org/expath/ns/file.xq (+28/-13)
modules/org/expath/ns/file.xq.src/file.cpp (+33/-23)
modules/org/expath/ns/file.xq.src/file_function.cpp (+20/-9)
modules/org/expath/ns/file.xq.src/file_function.h (+5/-9)
modules/org/expath/ns/file.xq.src/file_module.cpp (+2/-5)
modules/org/expath/ns/file.xq.src/file_module.h (+13/-6)
schemas/CMakeLists.txt (+24/-0)
schemas/xhtml/xhtml-lat1.ent (+196/-0)
schemas/xhtml/xhtml-special.ent (+80/-0)
schemas/xhtml/xhtml-symbol.ent (+237/-0)
schemas/xhtml/xhtml1-frameset.dtd (+1235/-0)
schemas/xhtml/xhtml1-strict.dtd (+978/-0)
schemas/xhtml/xhtml1-transitional.dtd (+1201/-0)
schemas/xslt-xquery-serialization.xsd (+1/-1)
scripts/gen_all_props (+0/-31)
scripts/gen_po_props (+0/-248)
scripts/link_crawler.xq (+0/-232)
scripts/sanity_checks/README.txt (+2/-2)
scripts/sanity_checks/conformance_xqftts.xqi (+4/-5)
scripts/sanity_checks/conformance_xqts.xqi (+3/-3)
src/annotations/annotations.cpp (+324/-292)
src/annotations/annotations.h (+100/-59)
src/api/CMakeLists.txt (+2/-0)
src/api/annotationimpl.cpp (+1/-1)
src/api/collectionimpl.cpp (+4/-9)
src/api/dynamiccontextimpl.cpp (+33/-0)
src/api/dynamiccontextimpl.h (+7/-0)
src/api/functionimpl.cpp (+1/-1)
src/api/identtypesimpl.cpp (+61/-0)
src/api/item.cpp (+56/-1)
src/api/itemfactoryimpl.cpp (+87/-11)
src/api/itemfactoryimpl.h (+32/-3)
src/api/options.cpp (+27/-12)
src/api/serialization/serializer.cpp (+209/-91)
src/api/serialization/serializer.h (+4/-4)
src/api/staticcollectionmanagerimpl.cpp (+287/-0)
src/api/staticcollectionmanagerimpl.h (+37/-0)
src/api/staticcontextimpl.cpp (+295/-75)
src/api/staticcontextimpl.h (+41/-23)
src/api/stemmer_wrapper.cpp (+6/-0)
src/api/stemmer_wrapper.h (+1/-0)
src/api/thesaurus.cpp (+0/-4)
src/api/transcode_streambuf.cpp (+103/-0)
src/api/typeidentimpl.cpp (+146/-12)
src/api/uri_resolver_wrappers.cpp (+66/-30)
src/api/uri_resolver_wrappers.h (+6/-6)
src/api/uriresolverimpl.cpp (+5/-0)
src/api/uriresolverimpl.h (+2/-0)
src/api/xmldatamanagerimpl.cpp (+77/-44)
src/api/xqueryimpl.cpp (+120/-5)
src/api/xqueryimpl.h (+6/-0)
src/api/zorbaimpl.cpp (+1/-1)
src/common/shared_types.h (+10/-4)
src/compiler/CMakeLists.txt (+0/-1)
src/compiler/api/compiler_api.cpp (+19/-13)
src/compiler/api/compiler_api.h (+3/-2)
src/compiler/api/compilercb.cpp (+21/-0)
src/compiler/api/compilercb.h (+17/-4)
src/compiler/codegen/plan_visitor.cpp (+122/-86)
src/compiler/expression/abstract_expr_visitor.h (+1/-0)
src/compiler/expression/expr.cpp (+49/-56)
src/compiler/expression/expr.h (+97/-55)
src/compiler/expression/expr_annotations.cpp (+0/-58)
src/compiler/expression/expr_base.cpp (+129/-29)
src/compiler/expression/expr_base.h (+79/-29)
src/compiler/expression/expr_classes.h (+1/-0)
src/compiler/expression/expr_iter.cpp (+11/-2)
src/compiler/expression/expr_put.cpp (+91/-38)
src/compiler/expression/expr_type.cpp (+46/-61)
src/compiler/expression/expr_visitor.h (+1/-0)
src/compiler/expression/flwor_expr.cpp (+48/-17)
src/compiler/expression/flwor_expr.h (+41/-18)
src/compiler/expression/fo_expr.cpp (+23/-26)
src/compiler/expression/fo_expr.h (+5/-5)
src/compiler/expression/ft_expr.cpp (+9/-0)
src/compiler/expression/ft_expr.h (+4/-3)
src/compiler/expression/ftnode.cpp (+209/-6)
src/compiler/expression/ftnode.h (+77/-26)
src/compiler/expression/path_expr.h (+5/-5)
src/compiler/expression/script_exprs.cpp (+163/-17)
src/compiler/expression/script_exprs.h (+101/-12)
src/compiler/expression/update_exprs.cpp (+60/-73)
src/compiler/expression/update_exprs.h (+51/-50)
src/compiler/expression/var_expr.cpp (+56/-1)
src/compiler/expression/var_expr.h (+110/-32)
src/compiler/parser/parse_constants.h (+1/-0)
src/compiler/parser/xquery_parser.cpp (+8853/-8696)
src/compiler/parser/xquery_parser.hpp (+242/-282)
src/compiler/parser/xquery_parser.y (+16/-3)
src/compiler/parser/xquery_scanner.cpp (+3049/-3059)
src/compiler/parser/xquery_scanner.l (+1/-0)
src/compiler/parsetree/parsenode_print_dot_visitor.cpp (+12/-0)
src/compiler/parsetree/parsenode_print_dot_visitor.h (+2/-0)
src/compiler/parsetree/parsenode_print_xml_visitor.cpp (+1/-0)
src/compiler/parsetree/parsenode_print_xqdoc_visitor.cpp (+115/-6)
src/compiler/parsetree/parsenode_print_xquery_visitor.cpp (+10/-0)
src/compiler/parsetree/parsenode_visitor.h (+1/-0)
src/compiler/parsetree/parsenodes.cpp (+7/-0)
src/compiler/parsetree/parsenodes.h (+21/-0)
src/compiler/rewriter/framework/rewriter_context.h (+59/-31)
src/compiler/rewriter/rewriters/default_optimizer.cpp (+10/-0)
src/compiler/rewriter/rules/flwor_rules.cpp (+28/-25)
src/compiler/rewriter/rules/fold_rules.cpp (+43/-52)
src/compiler/rewriter/rules/hoist_rules.cpp (+2/-1)
src/compiler/rewriter/rules/index_join_rule.cpp (+0/-3)
src/compiler/rewriter/rules/nodeid_rules.cpp (+815/-26)
src/compiler/rewriter/rules/path_rules.cpp (+4/-4)
src/compiler/rewriter/rules/rule_base.h (+1/-0)
src/compiler/rewriter/rules/ruleset.h (+52/-6)
src/compiler/rewriter/rules/type_rules.cpp (+51/-40)
src/compiler/rewriter/tools/dataflow_annotations.cpp (+561/-5)
src/compiler/rewriter/tools/dataflow_annotations.h (+48/-1)
src/compiler/rewriter/tools/expr_tools.cpp (+548/-39)
src/compiler/rewriter/tools/expr_tools.h (+0/-27)
src/compiler/rewriter/tools/udf_graph.cpp (+6/-4)
src/compiler/semantic_annotations/CMakeLists.txt (+0/-15)
src/compiler/semantic_annotations/annotation_holder.cpp (+0/-57)
src/compiler/semantic_annotations/annotation_holder.h (+0/-59)
src/compiler/semantic_annotations/annotation_keys.h (+0/-45)
src/compiler/semantic_annotations/annotations.h (+0/-63)
src/compiler/translator/translator.cpp (+476/-324)
src/compiler/xqddf/value_index.cpp (+35/-22)
src/compiler/xqddf/value_index.h (+53/-27)
src/compiler/xqueryx/xqueryx_to_xquery.cpp (+4/-1)
src/compiler/xqueryx/xqueryx_xslt.cpp (+578/-86)
src/compiler/xqueryx/xqueryx_xslt.h (+2/-1)
src/context/default_uri_mappers.cpp (+29/-9)
src/context/default_uri_mappers.h (+6/-6)
src/context/default_url_resolvers.cpp (+9/-3)
src/context/default_url_resolvers.h (+19/-5)
src/context/dynamic_context.cpp (+117/-47)
src/context/dynamic_context.h (+47/-29)
src/context/dynamic_loader.cpp (+8/-17)
src/context/dynamic_loader.h (+2/-3)
src/context/namespace_context.cpp (+4/-2)
src/context/namespace_context.h (+5/-1)
src/context/root_static_context.cpp (+78/-37)
src/context/root_static_context.h (+5/-3)
src/context/root_static_context_init.cpp.in (+9/-2)
src/context/static_context.cpp (+504/-420)
src/context/static_context.h (+116/-125)
src/context/static_context_consts.h (+2/-34)
src/context/thesaurus_wrappers.cpp (+0/-21)
src/context/thesaurus_wrappers.h (+0/-10)
src/context/uri_resolver.cpp (+32/-12)
src/context/uri_resolver.h (+34/-8)
src/debugger/debugger_client.cpp (+0/-2)
src/debugger/debugger_clientimpl.cpp (+549/-453)
src/debugger/debugger_clientimpl.h (+17/-10)
src/debugger/debugger_common.h (+3/-10)
src/debugger/debugger_commons.cpp (+128/-25)
src/debugger/debugger_commons.h (+11/-15)
src/debugger/debugger_communicator.cpp (+12/-9)
src/debugger/debugger_communicator.h (+4/-4)
src/debugger/debugger_protocol.cpp (+40/-16)
src/debugger/debugger_protocol.h (+3/-0)
src/debugger/debugger_runtime.cpp (+330/-104)
src/debugger/debugger_runtime.h (+37/-20)
src/debugger/debugger_server.cpp (+292/-90)
src/debugger/debugger_server.h (+24/-1)
src/debugger/socket_streambuf.cpp (+68/-55)
src/debugger/socket_streambuf.h (+20/-9)
src/diagnostics/diagnostic.cpp (+3/-0)
src/diagnostics/diagnostic_en.xml (+238/-59)
src/diagnostics/dict_XX_cpp.xq (+1/-0)
src/diagnostics/pregenerated/diagnostic_list.cpp (+99/-6)
src/diagnostics/pregenerated/dict_en.cpp (+63/-12)
src/diagnostics/qname.cpp (+6/-0)
src/functions/CMakeLists.txt (+2/-0)
src/functions/external_function.cpp (+87/-8)
src/functions/external_function.h (+6/-2)
src/functions/func_accessors_impl.cpp (+82/-62)
src/functions/func_accessors_impl.h (+5/-0)
src/functions/func_apply.cpp (+2/-2)
src/functions/func_arithmetic.cpp (+23/-20)
src/functions/func_booleans_impl.cpp (+68/-48)
src/functions/func_collections_impl.cpp (+78/-21)
src/functions/func_durations_dates_times_impl.cpp (+8/-8)
src/functions/func_enclosed.cpp (+14/-11)
src/functions/func_errors_and_diagnostics_impl.cpp (+12/-3)
src/functions/func_eval.cpp (+8/-8)
src/functions/func_ft_module_impl.cpp (+110/-0)
src/functions/func_hoist.cpp (+40/-34)
src/functions/func_index_ddl.cpp (+11/-11)
src/functions/func_index_ddl.h (+11/-11)
src/functions/func_node_sort_distinct.cpp (+49/-14)
src/functions/func_node_sort_distinct.h (+8/-6)
src/functions/func_numerics_impl.cpp (+157/-157)
src/functions/func_reflection.cpp (+11/-8)
src/functions/func_sequences_impl.cpp (+313/-193)
src/functions/func_sequences_impl.h (+97/-56)
src/functions/func_serialize_impl.cpp (+39/-0)
src/functions/func_strings_impl.cpp (+21/-2)
src/functions/func_var_decl.cpp (+7/-65)
src/functions/function.cpp (+61/-19)
src/functions/function.h (+25/-16)
src/functions/function_consts.h (+5/-6)
src/functions/function_impl.h (+10/-10)
src/functions/library.cpp (+14/-0)
src/functions/pregenerated/func_accessors.cpp (+8/-28)
src/functions/pregenerated/func_accessors.h (+70/-58)
src/functions/pregenerated/func_any_uri.cpp (+1/-1)
src/functions/pregenerated/func_any_uri.h (+4/-2)
src/functions/pregenerated/func_base64.cpp (+2/-2)
src/functions/pregenerated/func_base64.h (+8/-4)
src/functions/pregenerated/func_booleans.cpp (+3/-3)
src/functions/pregenerated/func_booleans.h (+21/-9)
src/functions/pregenerated/func_collections.cpp (+37/-12)
src/functions/pregenerated/func_collections.h (+191/-66)
src/functions/pregenerated/func_context.cpp (+8/-8)
src/functions/pregenerated/func_context.h (+32/-16)
src/functions/pregenerated/func_documents.cpp (+5/-5)
src/functions/pregenerated/func_documents.h (+22/-10)
src/functions/pregenerated/func_durations_dates_times.cpp (+21/-21)
src/functions/pregenerated/func_durations_dates_times.h (+84/-42)
src/functions/pregenerated/func_errors_and_diagnostics.cpp (+1/-1)
src/functions/pregenerated/func_errors_and_diagnostics.h (+21/-11)
src/functions/pregenerated/func_fetch.cpp (+2/-2)
src/functions/pregenerated/func_fetch.h (+8/-4)
src/functions/pregenerated/func_fnput.cpp (+1/-1)
src/functions/pregenerated/func_fnput.h (+6/-2)
src/functions/pregenerated/func_ft_module.cpp (+372/-0)
src/functions/pregenerated/func_ft_module.h (+231/-0)
src/functions/pregenerated/func_function_item_iter.cpp (+3/-3)
src/functions/pregenerated/func_function_item_iter.h (+12/-6)
src/functions/pregenerated/func_ic_ddl.cpp (+3/-3)
src/functions/pregenerated/func_ic_ddl.h (+12/-6)
src/functions/pregenerated/func_json.cpp (+87/-0)
src/functions/pregenerated/func_json.h (+79/-0)
src/functions/pregenerated/func_maps.cpp (+8/-8)
src/functions/pregenerated/func_maps.h (+32/-16)
src/functions/pregenerated/func_maths.cpp (+26/-26)
src/functions/pregenerated/func_maths.h (+104/-52)
src/functions/pregenerated/func_node_position.cpp (+584/-0)
src/functions/pregenerated/func_node_position.h (+409/-0)
src/functions/pregenerated/func_nodes.cpp (+20/-20)
src/functions/pregenerated/func_nodes.h (+128/-54)
src/functions/pregenerated/func_numerics.cpp (+8/-8)
src/functions/pregenerated/func_numerics.h (+35/-21)
src/functions/pregenerated/func_other_diagnostics.cpp (+2/-2)
src/functions/pregenerated/func_other_diagnostics.h (+8/-4)
src/functions/pregenerated/func_parse_fragment.cpp (+8/-22)
src/functions/pregenerated/func_parse_fragment.h (+7/-5)
src/functions/pregenerated/func_parsing_and_serializing.cpp (+2/-2)
src/functions/pregenerated/func_parsing_and_serializing.h (+10/-4)
src/functions/pregenerated/func_qnames.cpp (+8/-8)
src/functions/pregenerated/func_qnames.h (+41/-19)
src/functions/pregenerated/func_random.cpp (+3/-3)
src/functions/pregenerated/func_random.h (+12/-6)
src/functions/pregenerated/func_schema.cpp (+4/-4)
src/functions/pregenerated/func_schema.h (+27/-11)
src/functions/pregenerated/func_sctx.cpp (+25/-25)
src/functions/pregenerated/func_sctx.h (+100/-50)
src/functions/pregenerated/func_sequences.cpp (+22/-31)
src/functions/pregenerated/func_sequences.h (+255/-185)
src/functions/pregenerated/func_strings.cpp (+88/-28)
src/functions/pregenerated/func_strings.h (+154/-63)
src/functions/pregenerated/func_uris.cpp (+65/-0)
src/functions/pregenerated/func_uris.h (+64/-0)
src/functions/pregenerated/func_xqdoc.cpp (+2/-2)
src/functions/pregenerated/func_xqdoc.h (+9/-4)
src/functions/pregenerated/function_enum.h (+55/-3)
src/functions/signature.cpp (+92/-62)
src/functions/signature.h (+9/-1)
src/functions/udf.cpp (+245/-48)
src/functions/udf.h (+100/-35)
src/precompiled/stdafx.h (+5/-2)
src/runtime/CMakeLists.txt (+3/-0)
src/runtime/accessors/accessors_impl.cpp (+22/-22)
src/runtime/base/binarybase.h (+19/-9)
src/runtime/base/narybase.h (+16/-11)
src/runtime/base/plan_iterator.h (+60/-60)
src/runtime/base/unarybase.h (+15/-10)
src/runtime/base64/base64_impl.cpp (+53/-21)
src/runtime/booleans/BooleanImpl.cpp (+202/-220)
src/runtime/booleans/BooleanImpl.h (+1/-1)
src/runtime/collections/collections_base.h (+16/-16)
src/runtime/collections/collections_impl.cpp (+372/-120)
src/runtime/collections/collections_impl.h (+78/-0)
src/runtime/collections/pregenerated/collections.cpp (+28/-0)
src/runtime/collections/pregenerated/collections.h (+46/-0)
src/runtime/core/apply_updates.cpp (+13/-1)
src/runtime/core/arithmetic_impl.cpp (+50/-52)
src/runtime/core/arithmetic_impl.h (+18/-15)
src/runtime/core/constructors.cpp (+93/-99)
src/runtime/core/constructors.h (+15/-44)
src/runtime/core/flwor_iterator.cpp (+44/-47)
src/runtime/core/flwor_iterator.h (+1/-0)
src/runtime/core/fncall_iterator.cpp (+226/-65)
src/runtime/core/fncall_iterator.h (+80/-32)
src/runtime/core/gflwor/common.cpp (+45/-27)
src/runtime/core/gflwor/common.h (+4/-2)
src/runtime/core/gflwor/count_iterator.cpp (+1/-1)
src/runtime/core/gflwor/for_iterator.cpp (+1/-1)
src/runtime/core/gflwor/groupby_iterator.cpp (+9/-14)
src/runtime/core/gflwor/orderby_iterator.cpp (+10/-10)
src/runtime/core/gflwor/window_iterator.cpp (+3/-5)
src/runtime/core/path_iterators.h (+1/-1)
src/runtime/core/sequencetypes.cpp (+204/-156)
src/runtime/core/trycatch.cpp (+1/-1)
src/runtime/core/var_iterators.cpp (+178/-124)
src/runtime/core/var_iterators.h (+47/-29)
src/runtime/errors_and_diagnostics/errors_and_diagnostics_impl.cpp (+6/-7)
src/runtime/errors_and_diagnostics/other_diagnostics_impl.cpp (+13/-7)
src/runtime/eval/eval.cpp (+71/-35)
src/runtime/eval/eval.h (+18/-9)
src/runtime/fetch/fetch_impl.cpp (+11/-9)
src/runtime/full_text/CMakeLists.txt (+2/-1)
src/runtime/full_text/apply.cpp (+26/-15)
src/runtime/full_text/ft_match.cpp (+2/-3)
src/runtime/full_text/ft_module_impl.cpp (+736/-0)
src/runtime/full_text/ft_module_impl.h (+32/-0)
src/runtime/full_text/ft_query_item.h (+2/-1)
src/runtime/full_text/ft_single_token_iterator.h (+0/-2)
src/runtime/full_text/ft_stop_words_set.cpp (+33/-28)
src/runtime/full_text/ft_stop_words_set.h (+29/-14)
src/runtime/full_text/ft_token_matcher.cpp (+5/-5)
src/runtime/full_text/ft_token_matcher.h (+1/-1)
src/runtime/full_text/ft_token_seq_iterator.cpp (+7/-3)
src/runtime/full_text/ft_token_seq_iterator.h (+3/-0)
src/runtime/full_text/ft_token_span.h (+2/-2)
src/runtime/full_text/ft_util.h (+2/-1)
src/runtime/full_text/full_text.h (+1/-1)
src/runtime/full_text/icu_tokenizer.cpp (+83/-35)
src/runtime/full_text/icu_tokenizer.h (+5/-4)
src/runtime/full_text/latin_tokenizer.cpp (+20/-9)
src/runtime/full_text/latin_tokenizer.h (+5/-3)
src/runtime/full_text/pregenerated/ft_module.cpp (+399/-0)
src/runtime/full_text/pregenerated/ft_module.h (+501/-0)
src/runtime/full_text/stemmer.h (+17/-0)
src/runtime/full_text/stemmer/sb_stemmer.cpp (+20/-13)
src/runtime/full_text/stemmer/sb_stemmer.h (+1/-0)
src/runtime/full_text/thesauri/wn_synset.cpp (+4/-2)
src/runtime/full_text/thesauri/wn_thesaurus.cpp (+7/-5)
src/runtime/full_text/thesauri/wn_thesaurus.h (+5/-4)
src/runtime/full_text/thesauri/xqftts_thesaurus.cpp (+3/-3)
src/runtime/full_text/thesauri/xqftts_thesaurus.h (+6/-4)
src/runtime/full_text/thesaurus.cpp (+38/-27)
src/runtime/full_text/thesaurus.h (+6/-29)
src/runtime/full_text/tokenizer.cpp (+84/-8)
src/runtime/function_item/dynamic_fncall_iterator.cpp (+26/-6)
src/runtime/indexing/index_ddl.cpp (+52/-15)
src/runtime/indexing/index_ddl.h (+37/-30)
src/runtime/introspection/sctx_impl.cpp (+1/-1)
src/runtime/json/common.cpp (+62/-0)
src/runtime/json/common.h (+120/-0)
src/runtime/json/json_impl.cpp (+217/-0)
src/runtime/json/jsonml_array.cpp (+285/-0)
src/runtime/json/jsonml_array.h (+41/-0)
src/runtime/json/pregenerated/json.cpp (+94/-0)
src/runtime/json/pregenerated/json.h (+114/-0)
src/runtime/json/snelson.cpp (+515/-0)
src/runtime/json/snelson.h (+41/-0)
src/runtime/misc/materialize.cpp (+1/-1)
src/runtime/nodes/node_position_impl.cpp (+756/-0)
src/runtime/nodes/nodes_impl.cpp (+80/-35)
src/runtime/nodes/pregenerated/node_position.cpp (+710/-0)
src/runtime/nodes/pregenerated/node_position.h (+858/-0)
src/runtime/nodes/pregenerated/nodes.h (+6/-6)
src/runtime/numerics/NumericsImpl.cpp (+101/-114)
src/runtime/numerics/NumericsImpl.h (+2/-2)
src/runtime/numerics/numerics_impl.cpp (+30/-58)
src/runtime/parsing_and_serializing/fragment_istream.h (+54/-10)
src/runtime/parsing_and_serializing/parse_fragment_impl.cpp (+167/-168)
src/runtime/parsing_and_serializing/parsing_and_serializing_impl.cpp (+18/-6)
src/runtime/parsing_and_serializing/pregenerated/parse_fragment.h (+1/-1)
src/runtime/parsing_and_serializing/pregenerated/parsing_and_serializing.h (+2/-0)
src/runtime/qnames/qnames_impl.cpp (+41/-48)
src/runtime/schema/schema_impl.cpp (+17/-14)
src/runtime/scripting/scripting.cpp (+7/-8)
src/runtime/sequences/pregenerated/sequences.h (+23/-23)
src/runtime/sequences/sequences_impl.cpp (+52/-34)
src/runtime/spec/accessors/accessors.xml (+48/-14)
src/runtime/spec/booleans/booleans.xml (+28/-15)
src/runtime/spec/codegen-cpp.xq (+3/-3)
src/runtime/spec/codegen-h.xq (+37/-13)
src/runtime/spec/collections/collections.xml (+96/-27)
src/runtime/spec/errors_and_diagnostics/errors_and_diagnostics.xml (+3/-0)
src/runtime/spec/fnput/fnput.xml (+2/-1)
src/runtime/spec/full_text/ft_module.xml (+225/-0)
src/runtime/spec/json/json.xml (+52/-0)
src/runtime/spec/mappings.xml (+18/-1)
src/runtime/spec/nodes/node_position.xml (+439/-0)
src/runtime/spec/nodes/nodes.xml (+358/-270)
src/runtime/spec/parsing_and_serializing/parse_fragment.xml (+5/-12)
src/runtime/spec/parsing_and_serializing/parsing_and_serializing.xml (+5/-0)
src/runtime/spec/plan_iter_visitor_h.xq (+4/-4)
src/runtime/spec/printer_visitor_cpp.xq (+2/-2)
src/runtime/spec/printer_visitor_h.xq (+1/-1)
src/runtime/spec/qnames/qnames.xml (+17/-0)
src/runtime/spec/schema/schema.xml (+19/-0)
src/runtime/spec/sequences/sequences.xml (+129/-112)
src/runtime/spec/store/documents.xml (+1/-0)
src/runtime/spec/strings/strings.xml (+62/-7)
src/runtime/spec/uris/uris.xml (+40/-0)
src/runtime/spec/xqdoc/xqdoc.xml (+1/-1)
src/runtime/store/maps_impl.cpp (+16/-3)
src/runtime/strings/pregenerated/strings.cpp (+70/-0)
src/runtime/strings/pregenerated/strings.h (+90/-0)
src/runtime/strings/strings_impl.cpp (+433/-102)
src/runtime/update/update.cpp (+2/-1)
src/runtime/uris/pregenerated/uris.cpp (+66/-0)
src/runtime/uris/pregenerated/uris.h (+80/-0)
src/runtime/uris/uris_impl.cpp (+105/-0)
src/runtime/visitors/planiter_visitor_impl_code.h (+53/-52)
src/runtime/visitors/planiter_visitor_impl_include.h (+7/-6)
src/runtime/visitors/pregenerated/planiter_visitor.h (+211/-1)
src/runtime/visitors/pregenerated/printer_visitor.cpp (+592/-0)
src/runtime/visitors/pregenerated/printer_visitor.h (+126/-0)
src/runtime/visitors/printer_visitor_impl.cpp (+246/-182)
src/runtime/visitors/printer_visitor_impl.h (+58/-51)
src/runtime/xqdoc/xqdoc_impl.cpp (+4/-4)
src/store/api/annotation.h (+17/-15)
src/store/api/index.h (+60/-22)
src/store/api/item.h (+115/-29)
src/store/api/item_factory.h (+31/-147)
src/store/api/iterator.h (+2/-0)
src/store/api/load_properties.h (+224/-38)
src/store/api/pul.h (+14/-1)
src/store/api/shared_types.h (+3/-0)
src/store/api/store.h (+47/-27)
src/store/api/temp_seq.h (+51/-47)
src/store/api/update_consts.h (+7/-1)
src/store/api/xs_type_codes.h (+94/-0)
src/store/naive/CMakeLists.txt (+2/-1)
src/store/naive/atomic_items.cpp (+1407/-332)
src/store/naive/atomic_items.h (+665/-244)
src/store/naive/collection.cpp (+113/-0)
src/store/naive/collection.h (+121/-0)
src/store/naive/collection_set.h (+28/-52)
src/store/naive/dataguide.cpp (+1/-1)
src/store/naive/inmemorystore.cpp (+2/-2)
src/store/naive/inmemorystorec.cpp (+1/-1)
src/store/naive/item.cpp (+224/-30)
src/store/naive/item_iterator.cpp (+1/-1)
src/store/naive/item_vector.cpp (+4/-2)
src/store/naive/loader.h (+24/-7)
src/store/naive/loader_dtd.cpp (+324/-146)
src/store/naive/loader_fast.cpp (+51/-48)
src/store/naive/node_factory.cpp (+6/-6)
src/store/naive/node_factory.h (+4/-4)
src/store/naive/node_items.cpp (+813/-406)
src/store/naive/node_items.h (+305/-196)
src/store/naive/node_iterators.cpp (+38/-12)
src/store/naive/node_iterators.h (+68/-14)
src/store/naive/node_updates.cpp (+41/-23)
src/store/naive/nsbindings.cpp (+4/-4)
src/store/naive/nsbindings.h (+3/-2)
src/store/naive/ordpath.cpp (+96/-2)
src/store/naive/ordpath.h (+11/-4)
src/store/naive/properties.cpp (+1/-1)
src/store/naive/properties.h (+1/-1)
src/store/naive/pul_primitive_factory.cpp (+26/-4)
src/store/naive/pul_primitive_factory.h (+20/-1)
src/store/naive/pul_primitives.cpp (+230/-68)
src/store/naive/pul_primitives.h (+125/-27)
src/store/naive/qname_pool.cpp (+73/-88)
src/store/naive/qname_pool.h (+18/-18)
src/store/naive/shared_types.h (+6/-4)
src/store/naive/simple_collection.cpp (+22/-79)
src/store/naive/simple_collection.h (+13/-16)
src/store/naive/simple_collection_set.cpp (+34/-27)
src/store/naive/simple_collection_set.h (+117/-0)
src/store/naive/simple_index.cpp (+324/-305)
src/store/naive/simple_index.h (+165/-204)
src/store/naive/simple_index_general.cpp (+1604/-2176)
src/store/naive/simple_index_general.h (+320/-177)
src/store/naive/simple_index_value.cpp (+221/-53)
src/store/naive/simple_index_value.h (+91/-40)
src/store/naive/simple_item_factory.cpp (+134/-25)
src/store/naive/simple_item_factory.h (+37/-3)
src/store/naive/simple_iterator_factory.cpp (+6/-6)
src/store/naive/simple_lazy_temp_seq.cpp (+169/-97)
src/store/naive/simple_lazy_temp_seq.h (+31/-144)
src/store/naive/simple_pul.cpp (+291/-182)
src/store/naive/simple_pul.h (+32/-5)
src/store/naive/simple_store.cpp (+369/-566)
src/store/naive/simple_store.h (+135/-89)
src/store/naive/simple_temp_seq.cpp (+185/-229)
src/store/naive/simple_temp_seq.h (+49/-51)
src/store/naive/store_defs.h (+1/-79)
src/store/naive/store_properties.h (+36/-24)
src/store/naive/string_pool.cpp (+8/-7)
src/store/naive/text_node_content.h (+1/-1)
src/system/globalenv.cpp (+73/-25)
src/system/globalenv.h (+41/-22)
src/system/zorba_properties.h (+50/-19)
src/system/zorba_properties.txt (+4/-2)
src/types/casting.cpp (+740/-275)
src/types/casting.h (+39/-17)
src/types/root_typemanager.cpp (+11/-11)
src/types/root_typemanager.h (+6/-9)
src/types/schema/EventSchemaValidator.cpp (+2/-2)
src/types/schema/SchemaValidatorFilter.cpp (+4/-2)
src/types/schema/XercSchemaValidator.cpp (+2/-2)
src/types/schema/XercesParseUtils.cpp (+2/-2)
src/types/schema/revalidateUtils.cpp (+3/-3)
src/types/schema/schema.cpp (+7/-7)
src/types/schema/schema.h (+2/-2)
src/types/schema/validate.cpp (+24/-18)
src/types/typeconstants.h (+1/-51)
src/types/typeimpl.cpp (+21/-5)
src/types/typeimpl.h (+7/-7)
src/types/typemanager.h (+6/-3)
src/types/typemanagerimpl.cpp (+36/-13)
src/types/typemanagerimpl.h (+1/-1)
src/types/typeops.cpp (+104/-39)
src/types/typeops.h (+25/-9)
src/unit_tests/CMakeLists.txt (+18/-6)
src/unit_tests/json_parser.cpp (+637/-0)
src/unit_tests/stemmer.cpp (+14/-1)
src/unit_tests/string.cpp (+11/-1)
src/unit_tests/string_instantiate.cpp (+9/-1)
src/unit_tests/test_debugger_protocol.cpp (+0/-414)
src/unit_tests/test_icu_streambuf.cpp (+152/-0)
src/unit_tests/thesaurus.cpp (+18/-14)
src/unit_tests/tokenizer.cpp (+48/-24)
src/unit_tests/unique_ptr.cpp (+8/-1)
src/unit_tests/unit_test_list.h (+12/-1)
src/unit_tests/unit_tests.cpp (+13/-1)
src/util/CMakeLists.txt (+8/-1)
src/util/ascii_util.h (+1/-6)
src/util/http_util.cpp (+9/-4)
src/util/http_util.h (+0/-2)
src/util/icu_streambuf.cpp (+307/-0)
src/util/icu_streambuf.h (+140/-0)
src/util/json_parser.cpp (+663/-0)
src/util/json_parser.h (+570/-0)
src/util/mem_streambuf.cpp (+120/-0)
src/util/mem_streambuf.h (+108/-0)
src/util/omanip.h (+205/-57)
src/util/oseparator.h (+17/-5)
src/util/passthru_streambuf.cpp (+105/-0)
src/util/passthru_streambuf.h (+76/-0)
src/util/regex.cpp (+53/-17)
src/util/regex.h (+2/-2)
src/util/regex_ascii.h (+0/-2)
src/util/stl_util.h (+81/-21)
src/util/string/ptr_rep.tcc (+1/-0)
src/util/string_util.cpp (+13/-5)
src/util/string_util.h (+12/-5)
src/util/transcode_streambuf.h (+47/-0)
src/util/unicode_util.h (+4/-9)
src/util/uri_util.cpp (+2/-2)
src/util/utf8_util.cpp (+17/-0)
src/util/utf8_util.h (+0/-5)
src/util/utf8_util_base.h (+27/-12)
src/util/uuid/uuid.cpp (+27/-4)
src/util/uuid/uuid.h (+3/-0)
src/util/xml_util.h (+0/-1)
src/zorbamisc/ns_consts.h (+1/-5)
src/zorbaserialization/archiver.cpp (+4/-1)
src/zorbaserialization/archiver.h (+1/-1)
src/zorbaserialization/bin_archiver.cpp (+1/-0)
src/zorbaserialization/zorba_class_serializer.cpp (+38/-5)
src/zorbaserialization/zorba_class_serializer.h (+14/-7)
src/zorbaserialization/zorba_class_versions.cpp (+5/-5)
src/zorbatypes/URI.cpp (+18/-5)
src/zorbatypes/binary.cpp (+10/-0)
src/zorbatypes/decimal.cpp (+80/-47)
src/zorbatypes/decimal.h (+68/-48)
src/zorbatypes/floatimpl.cpp (+20/-1)
src/zorbatypes/floatimpl.h (+19/-4)
src/zorbatypes/ft_token.cpp (+1/-1)
src/zorbatypes/ft_token.h (+1/-1)
src/zorbatypes/integer.cpp (+144/-96)
src/zorbatypes/integer.h (+369/-308)
src/zorbatypes/numconversions.cpp (+8/-1)
src/zorbatypes/numconversions.h (+4/-0)
src/zorbatypes/rchandle.h (+9/-2)
src/zorbatypes/rclist.h (+37/-0)
src/zorbatypes/schema_types.h (+5/-1)
src/zorbatypes/zorbatypes_decl.h (+13/-1)
src/zorbautils/hashmap.h (+36/-9)
src/zorbautils/hashmap_itemh.h (+112/-0)
src/zorbautils/hashmap_zstring.h (+8/-8)
src/zorbautils/hashmap_zstring_nonserializable.h (+76/-0)
src/zorbautils/locale.cpp (+247/-6)
src/zorbautils/locale.h (+300/-265)
swig/CMakeLists.txt (+2/-7)
swig/ItemFactory.h (+69/-0)
swig/ItemFactory.i (+192/-0)
swig/StaticContext.h (+69/-0)
swig/StaticContext.i (+43/-107)
swig/XQuery.i (+14/-0)
swig/Zorba.i (+28/-1)
swig/java/CMakeLists.txt (+2/-0)
swig/php/CMakeLists.txt (+17/-27)
swig/php/XQueryProcessor.php (+397/-0)
swig/php/generate_proxy.php.in (+0/-209)
swig/php/test.xq (+1/-0)
swig/php/zorba_api.i (+8/-14)
swig/php/zorba_api_wrapper.php (+1215/-0)
swig/python/CMakeLists.txt (+2/-0)
swig/ruby/CMakeLists.txt (+10/-0)
swig/zorba_api.i (+4/-1)
test/apitest.cpp (+21/-6)
test/http-test-data/docroot/http-test-data/http2.xml (+4/-0)
test/rbkt/ExpCompilerResults/IterPlan/iterscript.cmake (+14/-10)
test/rbkt/ExpCompilerResults/IterPlan/zorba/collections/count_dynamic_zorba_collection.iter (+25/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/collections/count_static_zorba_collection.iter (+61/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/collections/count_w3c_collection.iter (+35/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/error/trace1.iter (+8/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/hashjoins/idx5.iter (+1/-1)
test/rbkt/ExpCompilerResults/IterPlan/zorba/misc/hoist4.iter (+7/-7)
test/rbkt/ExpCompilerResults/IterPlan/zorba/misc/inline_var1.iter (+2/-2)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/dataguide-c.iter (+375/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/dataguide-nc.iter (+375/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/dataguide2-c.iter (+139/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/dataguide2-nc.iter (+139/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/dblp-q0.iter (+182/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-9065.iter (+62/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-9198.iter (+75/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-9199.iter (+75/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-9212.iter (+83/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-9389.iter (+70/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-9390.iter (+70/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-9392.iter (+71/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-gary1.iter (+227/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-idx1.iter (+105/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-idx4.iter (+168/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/hashjoin-q8.iter (+102/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/path17.iter (+70/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q1.iter (+49/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q10.iter (+246/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q11.iter (+103/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q12.iter (+115/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q13.iter (+45/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q14.iter (+39/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q15.iter (+50/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q16.iter (+65/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q17.iter (+47/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q18.iter (+38/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q19.iter (+56/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q2.iter (+43/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q20.iter (+192/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q3.iter (+139/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q4.iter (+126/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q5.iter (+41/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q6.iter (+29/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q7.iter (+39/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q8.iter (+107/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/q9.iter (+169/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/no-copy/udfs1.iter (+58/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/paths/pred_order.iter (+2/-2)
test/rbkt/ExpCompilerResults/IterPlan/zorba/string/SubstringFunc/SubstringFunc2.iter (+10/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/string/SubstringFunc/SubstringFunc3.iter (+14/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/udf/udf-fib-rec.iter (+42/-0)
test/rbkt/ExpCompilerResults/IterPlan/zorba/udf/udf1.iter (+5/-5)
test/rbkt/ExpCompilerResults/IterPlan/zorba/xray/ppm_10.iter (+18/-23)
test/rbkt/ExpQueryResults/zorba/base64/binary_1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/base64/file_read_1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/base64/file_read_2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/collections/count_dynamic_zorba_collection.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/collections/count_static_zorba_collection.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/collections/count_w3c_collection.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/collections/delete_double.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/collections/delete_nodes/truncate_001.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/collections/dynamic3.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/collections/dynamic4.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/collections/dynamic5.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/collections/dynamic6.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/K-ConcatFunc-3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/K-ConcatFunc-4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/K-ConcatFunc-5.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/K-ConcatFunc-6.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/K-ConcatFunc-7.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/K-ConcatFunc-8.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/K-ConcatFunc-9.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concat-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concat-10.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concat-11.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concat-12.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concat-13.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concat-14.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concat-15.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concat-16.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concat-17.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concat-2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concat-3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concat-4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concat-5.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concat-6.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concat-7.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concat-8.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concat-9.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatdbl2args-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatdbl2args-2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatdbl2args-3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatdbl2args-4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatdbl2args-5.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatdec2args-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatdec2args-2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatdec2args-3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatdec2args-4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatdec2args-5.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatflt2args-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatflt2args-2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatflt2args-3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatflt2args-4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatflt2args-5.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatint2args-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatint2args-2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatint2args-3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatint2args-4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatint2args-5.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatintg2args-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatintg2args-2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatintg2args-3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatintg2args-4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatintg2args-5.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatlng2args-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatlng2args-2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatlng2args-3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatlng2args-4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatlng2args-5.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatnint2args-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatnint2args-2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatnint2args-3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatnint2args-4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatnint2args-5.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatnni2args-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatnni2args-2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatnni2args-3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatnni2args-4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatnni2args-5.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatnpi2args-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatnpi2args-2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatnpi2args-3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatnpi2args-4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatnpi2args-5.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatpint2args-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatpint2args-2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatpint2args-3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatpint2args-4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatpint2args-5.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatsht2args-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatsht2args-2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatsht2args-3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatsht2args-4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatsht2args-5.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatulng2args-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatulng2args-2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatulng2args-3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatulng2args-4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatulng2args-5.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatusht2args-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatusht2args-2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatusht2args-3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatusht2args-4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/concat_operator/fn-concatusht2args-5.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/debugger/dmh/break_response.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/debugger/dmh/break_response_no_info.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/error/trace1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/eval/eval10.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/eval/eval11.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/eval/eval12.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/eval/eval13.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/eval/eval9.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/eval/invoke1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-009.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-010.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-010a.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-012.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-013.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-014.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-014.xml.spec (+2/-0)
test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-015.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-016.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-017.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-019.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-020.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-021.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-022.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-023.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/ext_var/w3c/extvardef-025.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fetch/fetch_random_file.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/file/cp1252.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/file/streamability2.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-expr-clone-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-current-lang-true-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stem-lang-da-supported-true.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stem-lang-de-supported-true.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stem-lang-en-supported-true.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stem-lang-es-supported-true.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stem-lang-fi-supported-true.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stem-lang-hu-supported-true.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stem-lang-it-supported-true.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stem-lang-nl-supported-true.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stem-lang-no-supported-true.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stem-lang-pt-supported-true.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stem-lang-ru-supported-true.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stem-lang-supported-false-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stem-lang-supported-false-2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stem-lang-sv-supported-true.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stop-word-false-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stop-word-lang-da-supported-true.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stop-word-lang-de-supported-true.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stop-word-lang-en-supported-true.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stop-word-lang-es-supported-true.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stop-word-lang-fi-supported-true.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stop-word-lang-fr-supported-true.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stop-word-lang-hu-supported-true.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stop-word-lang-it-supported-true.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stop-word-lang-nl-supported-true.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stop-word-lang-no-supported-true.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stop-word-lang-pt-supported-true.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stop-word-lang-supported-false-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stop-word-lang-supported-false-2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stop-word-lang-sv-supported-true.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stop-word-true-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stop-word-true-2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stop-word-true-3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-stop-word-true-4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-thesaurus-lang-supported-false-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-thesaurus-lang-supported-false-2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-thesaurus-lang-supported-true-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-is-thesaurus-lang-supported-true-2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-stem-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-stem-2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-stem-3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-stem-4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-strip-diacritics-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-thesaurus-lookup-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-thesaurus-lookup-2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-thesaurus-lookup-3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-thesaurus-lookup-4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-thesaurus-lookup-5.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-tokenize-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-tokenize-2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-tokenize-3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-tokenize-4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-tokenize-string-1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-tokenize-string-2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-tokenizer-properties-1.xml.res (+112/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-module-tokenizer-properties-2.xml.res (+112/-0)
test/rbkt/ExpQueryResults/zorba/fulltext/ft-same-sentence-false-2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/groupby/posvar.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/index/auctions1.xml.res (+3/-3)
test/rbkt/ExpQueryResults/zorba/index/auctions2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/index/numbers.xml.res (+21/-0)
test/rbkt/ExpQueryResults/zorba/json/json-jsonml_array-parse-01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/json/json-jsonml_array-parse-02.xml.res (+4/-0)
test/rbkt/ExpQueryResults/zorba/json/json-jsonml_array-parse-03.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/json/json-jsonml_array-parse-04.xml.res (+7/-0)
test/rbkt/ExpQueryResults/zorba/json/json-jsonml_array-parse-05.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/json/json-jsonml_array-parse-wikipedia.xml.res (+10/-0)
test/rbkt/ExpQueryResults/zorba/json/json-jsonml_array-serialize-01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/json/json-jsonml_array-serialize-02.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/json/json-jsonml_array-serialize-03.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/json/json-jsonml_array-serialize-indent-wikipedia.xml.res (+11/-0)
test/rbkt/ExpQueryResults/zorba/json/json-jsonml_array-serialize-none-wikipedia.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/json/json-jsonml_array-serialize-some-wikipedia.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-null-handling.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-numbers-and-decimals.xml.res (+7/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-array-01.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-array-02.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-array-03.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-array-04.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-array-05.xml.res (+4/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-array-06.xml.res (+8/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-array-07.xml.res (+10/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-array-08.xml.res (+6/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-example.xml.res (+14/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-object-01.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-object-02.xml.res (+4/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-object-03.xml.res (+8/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-object-04.xml.res (+6/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-parse-serialize.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-serialize-array-01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-serialize-array-02.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-serialize-array-03.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-serialize-array-04.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-serialize-array-05.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-serialize-array-12.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-serialize-indent-example.xml.res (+11/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-serialize-none-example.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-serialize-object-01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-serialize-object-02.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-serialize-object-03.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-serialize-parse.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-serialize-some-example.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-uncommon-chars.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/json/json-snelson-utf-8.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/misc/baseuri.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/dataguide-c.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/dataguide-nc.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/dataguide2-c.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/dataguide2-nc.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/dblp-q0.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-9198.xml.res (+19/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-9199.xml.res (+19/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-9212.xml.res (+49/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-9389.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-9390.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-9392.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-gary1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-idx1.xml.res (+254/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-idx4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/hashjoin-q8.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/parser_test.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/path17.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q1.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q10.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q11.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q12.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q13.xml.res (+18/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q14.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q17.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q18.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q19.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q2.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q20.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q3.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q5.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q6.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q7.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q8.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/q9.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/no-copy/udfs1.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/nodes/position_1.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/nodes/position_1_parsed.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/nodes/position_2.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/nodes/position_2_parsed.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/nodes/position_3.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/nodes/position_3_parsed.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/nodes/position_4.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/nodes/position_4_parsed.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/nodes/position_err.xml.res (+6/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-01.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-02.xml.res (+6/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-03.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-04.xml.res (+12/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-05.xml.res (+12/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-06.xml.res (+8/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-07.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-08.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-09.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-10.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-11.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-12.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-13.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-14.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-15.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-16.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-17.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-18.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-19.xml.res (+8/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-20.xml.res (+8/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-21.xml.res (+6/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-22.xml.res (+4/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-23.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-24.xml.res (+5/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-25.xml.res (+14/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-26.xml.res (+14/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-27.xml.res (+10/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-28.xml.res (+6/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-29.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-30.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-31.xml.res (+59/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-32.xml.res (+50/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-33.xml.res (+34/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-34.xml.res (+18/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-35.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-36.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-37.xml.res (+14/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-38.xml.res (+14/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-39.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-40.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-41.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-42.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-43.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-44.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-45.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-46.xml.res (+31/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-53.xml.res (+8/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-54.xml.res (+7/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-55.xml.res (+8/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-56.xml.res (+7/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-xml-fragment-12.xml.res (+1/-1)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-xml-fragment-16.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/paths/ref1.xml.res (+387/-0)
test/rbkt/ExpQueryResults/zorba/reference/reference_1.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/reference/reference_2.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/reference/reference_3.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/reference/reference_4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/reference/reference_5.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/reference/reference_coll_1.xml.res (+2/-1)
test/rbkt/ExpQueryResults/zorba/reference/reference_coll_2.xml.res (+2/-1)
test/rbkt/ExpQueryResults/zorba/reference/reference_coll_3.xml.res (+2/-1)
test/rbkt/ExpQueryResults/zorba/schemas/val-inplace3.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/schemas/val-inplace4.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/schemas/val-xsiType-noSchemaImport.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/schemas/validate_xqdoc_01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/schemas/validate_xqdoc_02.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/spec/xquery_1_1.xml.res (+0/-4)
test/rbkt/ExpQueryResults/zorba/spec/xquery_3_0.xml.res (+4/-0)
test/rbkt/ExpQueryResults/zorba/string/Regex/regex_a4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/string/StringToCodepointFunc/StringToCodepointFunc4.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/string/tokenize01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/string/tokenize02.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/string/tokenize03.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/string/tokenize04.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/udf/udf-fib-rec-BIG_INTEGER.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/udf/udf-fib-rec.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/updates/no_hoist.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/updates/recursive.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/updates/undo10.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/updates/undo11.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/updates/undo8.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/updates/undo9.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/uris/decode_01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/uris/decode_03.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/uris/decode_04.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding02.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding03.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding04.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding06.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding07.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding09.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding10.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding11.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding12.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding13.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/sliding14.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling01.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling02.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling04.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling05.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling07.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling08.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling09.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling10.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling24.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling26.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling27.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling28.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling29.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling30.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling32.xml.res (+12/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling33.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling34.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling35.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling36.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling38.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling39.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling40.xml.res (+24/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling41.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling45.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling46.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling47.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/tumbling48.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/windowing/windowing12.xml.res (+1/-0)
test/rbkt/ExpQueryResults/zorba/xqdoc/basic.xml.res (+2/-2)
test/rbkt/ExpQueryResults/zorba/xqdoc/content.xml.res (+2/-2)
test/rbkt/ExpQueryResults/zorba/xqdoc/indentation.xml.res (+1/-2)
test/rbkt/ExpQueryResults/zorba/xqdoc/local.xml.res (+1/-1)
test/rbkt/ExpQueryResults/zorba/xqdoc/no_global_var.xml.res (+1/-2)
test/rbkt/ExpQueryResults/zorba/xqdoc/testSchemaTypes.xml.res (+1/-2)
test/rbkt/ExpQueryResults/zorba/xqdoc/unorderedAnnotations.xml.res (+2/-3)
test/rbkt/Queries/CMakeLists.txt (+305/-32)
test/rbkt/Queries/w3c_known_failures.txt (+51/-82)
test/rbkt/Queries/w3c_known_failures_XQueryX.txt (+88/-0)
test/rbkt/Queries/zorba/annotations/annot-unknown-02.spec (+1/-1)
test/rbkt/Queries/zorba/annotations/annot-unknown-02.xq (+10/-6)
test/rbkt/Queries/zorba/annotations/annot-unknown-04.spec (+1/-1)
test/rbkt/Queries/zorba/annotations/annot-unknown-04.xq (+9/-6)
test/rbkt/Queries/zorba/base64/binary_1.xq (+1/-0)
test/rbkt/Queries/zorba/base64/decoded-text (+1/-0)
test/rbkt/Queries/zorba/base64/encoded (+1/-0)
test/rbkt/Queries/zorba/base64/encoded-text (+1/-0)
test/rbkt/Queries/zorba/base64/file_read_1.xq (+10/-0)
test/rbkt/Queries/zorba/base64/file_read_2.xq (+11/-0)
test/rbkt/Queries/zorba/collections/collection_002.xqdata (+3/-1)
test/rbkt/Queries/zorba/collections/count_dynamic_zorba_collection.xq (+10/-0)
test/rbkt/Queries/zorba/collections/count_static_zorba_collection.xq (+14/-0)
test/rbkt/Queries/zorba/collections/count_w3c_collection.xq (+8/-0)
test/rbkt/Queries/zorba/collections/delete_double.xq (+10/-0)
test/rbkt/Queries/zorba/collections/delete_nodes/truncate_001.xq (+27/-0)
test/rbkt/Queries/zorba/collections/dynamic3.xq (+7/-0)
test/rbkt/Queries/zorba/collections/dynamic4.xq (+7/-0)
test/rbkt/Queries/zorba/collections/dynamic5.xq (+7/-0)
test/rbkt/Queries/zorba/collections/dynamic6.xq (+10/-0)
test/rbkt/Queries/zorba/concat_operator/K-ConcatFunc-3.xq (+7/-0)
test/rbkt/Queries/zorba/concat_operator/K-ConcatFunc-4.xq (+7/-0)
test/rbkt/Queries/zorba/concat_operator/K-ConcatFunc-5.xq (+7/-0)
test/rbkt/Queries/zorba/concat_operator/K-ConcatFunc-6.xq (+7/-0)
test/rbkt/Queries/zorba/concat_operator/K-ConcatFunc-7.xq (+8/-0)
test/rbkt/Queries/zorba/concat_operator/K-ConcatFunc-8.xq (+7/-0)
test/rbkt/Queries/zorba/concat_operator/K-ConcatFunc-9.xq (+7/-0)
test/rbkt/Queries/zorba/concat_operator/K2-ConcatFunc-1.spec (+1/-0)
test/rbkt/Queries/zorba/concat_operator/K2-ConcatFunc-1.xq (+7/-0)
test/rbkt/Queries/zorba/concat_operator/K2-ConcatFunc-2.spec (+1/-0)
test/rbkt/Queries/zorba/concat_operator/K2-ConcatFunc-2.xq (+7/-0)
test/rbkt/Queries/zorba/concat_operator/K2-ConcatFunc-3.spec (+1/-0)
test/rbkt/Queries/zorba/concat_operator/K2-ConcatFunc-3.xq (+7/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concat-1.xq (+5/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concat-10.xq (+4/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concat-11.xq (+3/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concat-12.xq (+3/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concat-14.xq (+4/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concat-15.xq (+4/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concat-16.xq (+4/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concat-17.xq (+4/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concat-2.xq (+5/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concat-3.xq (+5/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concat-4.xq (+5/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concat-5.xq (+4/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concat-6.xq (+4/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concat-7.xq (+4/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concat-8.xq (+5/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concat-9.xq (+4/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatdbl2args-1.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatdbl2args-2.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatdbl2args-3.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatdbl2args-4.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatdbl2args-5.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatdec2args-1.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatdec2args-2.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatdec2args-3.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatdec2args-4.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatdec2args-5.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatflt2args-1.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatflt2args-2.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatflt2args-3.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatflt2args-4.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatflt2args-5.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatint2args-1.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatint2args-2.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatint2args-3.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatint2args-4.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatint2args-5.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatintg2args-1.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatintg2args-2.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatintg2args-3.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatintg2args-4.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatintg2args-5.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatlng2args-1.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatlng2args-2.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatlng2args-3.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatlng2args-4.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatlng2args-5.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatnint2args-1.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatnint2args-2.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatnint2args-3.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatnint2args-4.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatnint2args-5.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatnni2args-1.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatnni2args-2.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatnni2args-3.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatnni2args-4.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatnni2args-5.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatnpi2args-1.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatnpi2args-2.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatnpi2args-3.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatnpi2args-4.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatnpi2args-5.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatpint2args-1.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatpint2args-2.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatpint2args-3.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatpint2args-4.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatpint2args-5.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatsht2args-1.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatsht2args-2.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatsht2args-3.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatsht2args-4.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatsht2args-5.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatulng2args-1.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatulng2args-2.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatulng2args-3.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatulng2args-4.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatulng2args-5.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatusht2args-1.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatusht2args-2.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatusht2args-3.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatusht2args-4.xq (+11/-0)
test/rbkt/Queries/zorba/concat_operator/fn-concatusht2args-5.xq (+11/-0)
test/rbkt/Queries/zorba/debugger/dmh/break_response.xq (+5/-0)
test/rbkt/Queries/zorba/debugger/dmh/break_response_no_info.xq (+7/-0)
test/rbkt/Queries/zorba/error/trace1.xq (+6/-0)
test/rbkt/Queries/zorba/eval/eval10.xq (+28/-0)
test/rbkt/Queries/zorba/eval/eval11.xq (+34/-0)
test/rbkt/Queries/zorba/eval/eval12.xq (+34/-0)
test/rbkt/Queries/zorba/eval/eval13.xq (+34/-0)
test/rbkt/Queries/zorba/eval/eval9.xq (+6/-0)
test/rbkt/Queries/zorba/eval/invoke1.xq (+5/-0)
test/rbkt/Queries/zorba/eval/invoke1_1.xqlib (+10/-0)
test/rbkt/Queries/zorba/eval/invoke1_2.xqlib (+3/-0)
test/rbkt/Queries/zorba/ext_var/w3c/SchemaImport/hats.xsd (+68/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-008.spec (+1/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-008.xq (+1/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-009.xq (+1/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-010.xq (+4/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-010a.xq (+4/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-011.spec (+1/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-011.xq (+3/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-011a.spec (+1/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-011a.xq (+9/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-012.xq (+4/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-013.spec (+3/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-013.xq (+6/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-014.spec (+1/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-014.xq (+3/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-015.xq (+4/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-016.xq (+4/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-017.xq (+2/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-018.spec (+1/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-018.xq (+2/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-019.xq (+3/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-020.xq (+5/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-021.xq (+3/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-022.xq (+5/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-023.xq (+8/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-024.spec (+1/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-024.xq (+8/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-025.xq (+8/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-026.spec (+1/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-026.xq (+8/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-027.spec (+1/-0)
test/rbkt/Queries/zorba/ext_var/w3c/extvardef-027.xq (+7/-0)
test/rbkt/Queries/zorba/fetch/fetch_bogus2.xq (+1/-1)
test/rbkt/Queries/zorba/fetch/fetch_random_file.xq (+4/-0)
test/rbkt/Queries/zorba/file/cp1252.txt (+1/-0)
test/rbkt/Queries/zorba/file/cp1252.xq (+3/-0)
test/rbkt/Queries/zorba/file/files_pattern_rec1.xq (+7/-1)
test/rbkt/Queries/zorba/file/files_pattern_rec2.xq (+7/-1)
test/rbkt/Queries/zorba/file/invalid_encoding.spec (+1/-0)
test/rbkt/Queries/zorba/file/invalid_encoding.xq (+3/-0)
test/rbkt/Queries/zorba/file/streamability2.spec (+0/-1)
test/rbkt/Queries/zorba/fulltext/ft-expr-clone-1.xq (+10/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-current-lang-true-1.xq (+5/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stem-lang-da-supported-true.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stem-lang-de-supported-true.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stem-lang-en-supported-true.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stem-lang-es-supported-true.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stem-lang-fi-supported-true.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stem-lang-hu-supported-true.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stem-lang-it-supported-true.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stem-lang-nl-supported-true.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stem-lang-no-supported-true.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stem-lang-pt-supported-true.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stem-lang-ru-supported-true.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stem-lang-supported-false-1.xq (+4/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stem-lang-supported-false-2.xq (+4/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stem-lang-sv-supported-true.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stop-word-false-1.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stop-word-lang-da-supported-true.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stop-word-lang-de-supported-true.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stop-word-lang-en-supported-true.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stop-word-lang-es-supported-true.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stop-word-lang-fi-supported-true.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stop-word-lang-fr-supported-true.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stop-word-lang-hu-supported-true.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stop-word-lang-it-supported-true.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stop-word-lang-nl-supported-true.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stop-word-lang-no-supported-true.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stop-word-lang-pt-supported-true.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stop-word-lang-supported-false-1.xq (+4/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stop-word-lang-supported-false-2.xq (+4/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stop-word-lang-sv-supported-true.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stop-word-true-1.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stop-word-true-2.xq (+5/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stop-word-true-3.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-stop-word-true-4.xq (+5/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-thesaurus-lang-supported-false-1.spec (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-thesaurus-lang-supported-false-1.xq (+4/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-thesaurus-lang-supported-false-2.spec (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-thesaurus-lang-supported-false-2.xq (+4/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-thesaurus-lang-supported-false-3.spec (+1/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-thesaurus-lang-supported-false-3.xq (+4/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-thesaurus-lang-supported-true-1.spec (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-thesaurus-lang-supported-true-1.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-thesaurus-lang-supported-true-2.spec (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-is-thesaurus-lang-supported-true-2.xq (+6/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-stem-1.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-stem-2.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-stem-3.xq (+5/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-stem-4.xq (+5/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-strip-diacritics-1.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-thesaurus-lookup-1.spec (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-thesaurus-lookup-1.xq (+6/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-thesaurus-lookup-2.spec (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-thesaurus-lookup-2.xq (+6/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-thesaurus-lookup-3.spec (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-thesaurus-lookup-3.xq (+7/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-thesaurus-lookup-4.spec (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-thesaurus-lookup-4.xq (+7/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-thesaurus-lookup-5.spec (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-thesaurus-lookup-5.xq (+8/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-tokenize-1.xq (+18/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-tokenize-2.xq (+18/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-tokenize-3.xq (+10/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-tokenize-4.xq (+10/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-tokenize-string-1.xq (+8/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-tokenize-string-2.xq (+10/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-tokenizer-properties-1.xq (+3/-0)
test/rbkt/Queries/zorba/fulltext/ft-module-tokenizer-properties-2.xq (+5/-0)
test/rbkt/Queries/zorba/fulltext/ft-same-sentence-false-2.xq (+2/-0)
test/rbkt/Queries/zorba/fulltext/ft-same-sentence-true-2.xq (+1/-1)
test/rbkt/Queries/zorba/fulltext/ft-same-sentence-true-3.xq (+1/-1)
test/rbkt/Queries/zorba/fulltext/ft-same-sentence-true-4.xq (+1/-1)
test/rbkt/Queries/zorba/fulltext/ft-thesaurus-FOCA0003-1.spec (+4/-0)
test/rbkt/Queries/zorba/fulltext/ft-thesaurus-FOCA0003-1.xq (+10/-0)
test/rbkt/Queries/zorba/groupby/posvar.xq (+17/-0)
test/rbkt/Queries/zorba/http-client/send-request/http2-read-svg.xq (+2/-2)
test/rbkt/Queries/zorba/index/auctions1.xml (+1/-0)
test/rbkt/Queries/zorba/index/auctions1.xq (+1/-1)
test/rbkt/Queries/zorba/index/auctions2.xq (+25/-0)
test/rbkt/Queries/zorba/index/numbers.xml (+10/-0)
test/rbkt/Queries/zorba/index/numbers.xq (+75/-0)
test/rbkt/Queries/zorba/index/numbers.xqlib (+28/-0)
test/rbkt/Queries/zorba/json/json-invalid-option-parameter.spec (+1/-0)
test/rbkt/Queries/zorba/json/json-invalid-option-parameter.xq (+10/-0)
test/rbkt/Queries/zorba/json/json-jsonml_array-parse-01.xq (+9/-0)
test/rbkt/Queries/zorba/json/json-jsonml_array-parse-02.xq (+14/-0)
test/rbkt/Queries/zorba/json/json-jsonml_array-parse-03.xq (+18/-0)
test/rbkt/Queries/zorba/json/json-jsonml_array-parse-04.xq (+27/-0)
test/rbkt/Queries/zorba/json/json-jsonml_array-parse-05.xq (+66/-0)
test/rbkt/Queries/zorba/json/json-jsonml_array-parse-06.spec (+1/-0)
test/rbkt/Queries/zorba/json/json-jsonml_array-parse-06.xq (+10/-0)
test/rbkt/Queries/zorba/json/json-jsonml_array-parse-wikipedia.xq (+23/-0)
test/rbkt/Queries/zorba/json/json-jsonml_array-serialize-01.xq (+10/-0)
test/rbkt/Queries/zorba/json/json-jsonml_array-serialize-02.xq (+13/-0)
test/rbkt/Queries/zorba/json/json-jsonml_array-serialize-03.xq (+10/-0)
test/rbkt/Queries/zorba/json/json-jsonml_array-serialize-indent-wikipedia.xq (+20/-0)
test/rbkt/Queries/zorba/json/json-jsonml_array-serialize-none-wikipedia.xq (+19/-0)
test/rbkt/Queries/zorba/json/json-jsonml_array-serialize-some-wikipedia.xq (+20/-0)
test/rbkt/Queries/zorba/json/json-snelson-invalid-json.spec (+1/-0)
test/rbkt/Queries/zorba/json/json-snelson-invalid-json.xq (+9/-0)
test/rbkt/Queries/zorba/json/json-snelson-null-handling.xq (+5/-0)
test/rbkt/Queries/zorba/json/json-snelson-numbers-and-decimals.xq (+10/-0)
test/rbkt/Queries/zorba/json/json-snelson-parse-array-01.xq (+5/-0)
test/rbkt/Queries/zorba/json/json-snelson-parse-array-02.xq (+5/-0)
test/rbkt/Queries/zorba/json/json-snelson-parse-array-03.xq (+5/-0)
test/rbkt/Queries/zorba/json/json-snelson-parse-array-04.xq (+5/-0)
test/rbkt/Queries/zorba/json/json-snelson-parse-array-05.xq (+5/-0)
test/rbkt/Queries/zorba/json/json-snelson-parse-array-06.xq (+7/-0)
test/rbkt/Queries/zorba/json/json-snelson-parse-array-07.xq (+5/-0)
test/rbkt/Queries/zorba/json/json-snelson-parse-array-08.xq (+7/-0)
test/rbkt/Queries/zorba/json/json-snelson-parse-empty.spec (+1/-0)
test/rbkt/Queries/zorba/json/json-snelson-parse-empty.xq (+5/-0)
test/rbkt/Queries/zorba/json/json-snelson-parse-example.xq (+20/-0)
test/rbkt/Queries/zorba/json/json-snelson-parse-object-01.xq (+5/-0)
test/rbkt/Queries/zorba/json/json-snelson-parse-object-02.xq (+5/-0)
test/rbkt/Queries/zorba/json/json-snelson-parse-object-03.xq (+7/-0)
test/rbkt/Queries/zorba/json/json-snelson-parse-object-04.xq (+12/-0)
test/rbkt/Queries/zorba/json/json-snelson-parse-serialize.xq (+8/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-array-01.xq (+8/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-array-02.xq (+8/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-array-03.xq (+8/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-array-04.xq (+8/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-array-05.xq (+9/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-array-06.spec (+1/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-array-06.xq (+8/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-array-07.spec (+1/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-array-07.xq (+8/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-array-08.spec (+1/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-array-08.xq (+8/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-array-09.spec (+1/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-array-09.xq (+8/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-array-10.spec (+1/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-array-10.xq (+8/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-array-11.spec (+1/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-array-11.xq (+8/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-array-12.xq (+11/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-comment-node.spec (+1/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-comment-node.xq (+5/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-indent-example.xq (+24/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-invalid-value-for-attribute.spec (+1/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-invalid-value-for-attribute.xq (+8/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-none-example.xq (+19/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-object-01.xq (+8/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-object-02.xq (+9/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-object-03.xq (+12/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-parse.xq (+5/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-some-example.xq (+24/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-type-value-missing.spec (+1/-0)
test/rbkt/Queries/zorba/json/json-snelson-serialize-type-value-missing.xq (+8/-0)
test/rbkt/Queries/zorba/json/json-snelson-uncommon-chars.xq (+5/-0)
test/rbkt/Queries/zorba/json/json-snelson-utf-8.xq (+5/-0)
test/rbkt/Queries/zorba/misc/baseuri.xml (+1/-0)
test/rbkt/Queries/zorba/misc/baseuri.xq (+2/-0)
test/rbkt/Queries/zorba/modules/libraryModule15.xqlib (+8/-3)
test/rbkt/Queries/zorba/no-copy/auction.xml (+2182/-0)
test/rbkt/Queries/zorba/no-copy/books.xml (+25/-0)
test/rbkt/Queries/zorba/no-copy/dataguide-c.xq (+87/-0)
test/rbkt/Queries/zorba/no-copy/dataguide-nc.xq (+91/-0)
test/rbkt/Queries/zorba/no-copy/dataguide2-c.xq (+33/-0)
test/rbkt/Queries/zorba/no-copy/dataguide2-nc.xq (+38/-0)
test/rbkt/Queries/zorba/no-copy/dblp-q0.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/dblp-q0.xq (+32/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-9065.xq (+9/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-9198.xq (+13/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-9199.xq (+11/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-9212.xq (+15/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-9389.xq (+13/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-9390.xq (+15/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-9392.xq (+14/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-gary1.xq (+42/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-idx1.xq (+12/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-idx4.xq (+33/-0)
test/rbkt/Queries/zorba/no-copy/hashjoin-q8.xq (+17/-0)
test/rbkt/Queries/zorba/no-copy/parser_test.xq (+3/-0)
test/rbkt/Queries/zorba/no-copy/path17.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/path17.xq (+12/-0)
test/rbkt/Queries/zorba/no-copy/q1.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q1.xq (+9/-0)
test/rbkt/Queries/zorba/no-copy/q10.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q10.xq (+36/-0)
test/rbkt/Queries/zorba/no-copy/q11.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q11.xq (+13/-0)
test/rbkt/Queries/zorba/no-copy/q12.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q12.xq (+16/-0)
test/rbkt/Queries/zorba/no-copy/q13.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q13.xq (+9/-0)
test/rbkt/Queries/zorba/no-copy/q14.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q14.xq (+11/-0)
test/rbkt/Queries/zorba/no-copy/q15.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q15.xq (+10/-0)
test/rbkt/Queries/zorba/no-copy/q16.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q16.xq (+17/-0)
test/rbkt/Queries/zorba/no-copy/q17.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q17.xq (+10/-0)
test/rbkt/Queries/zorba/no-copy/q18.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q18.xq (+17/-0)
test/rbkt/Queries/zorba/no-copy/q19.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q19.xq (+13/-0)
test/rbkt/Queries/zorba/no-copy/q2.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q2.xq (+10/-0)
test/rbkt/Queries/zorba/no-copy/q20.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q20.xq (+34/-0)
test/rbkt/Queries/zorba/no-copy/q3.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q3.xq (+14/-0)
test/rbkt/Queries/zorba/no-copy/q4.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q4.xq (+14/-0)
test/rbkt/Queries/zorba/no-copy/q5.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q5.xq (+13/-0)
test/rbkt/Queries/zorba/no-copy/q6.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q6.xq (+10/-0)
test/rbkt/Queries/zorba/no-copy/q7.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q7.xq (+11/-0)
test/rbkt/Queries/zorba/no-copy/q8.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q8.xq (+14/-0)
test/rbkt/Queries/zorba/no-copy/q9.spec (+3/-0)
test/rbkt/Queries/zorba/no-copy/q9.xq (+20/-0)
test/rbkt/Queries/zorba/no-copy/simple_parser.xqlib (+2207/-0)
test/rbkt/Queries/zorba/no-copy/test1.xq (+17/-0)
test/rbkt/Queries/zorba/no-copy/udfs1.xq (+31/-0)
test/rbkt/Queries/zorba/no-copy/udfs2.xq (+31/-0)
test/rbkt/Queries/zorba/nodes/position.xml (+15/-0)
test/rbkt/Queries/zorba/nodes/position_1.xq (+97/-0)
test/rbkt/Queries/zorba/nodes/position_1_parsed.xq (+98/-0)
test/rbkt/Queries/zorba/nodes/position_2.xq (+157/-0)
test/rbkt/Queries/zorba/nodes/position_2_parsed.xq (+156/-0)
test/rbkt/Queries/zorba/nodes/position_3.xq (+32/-0)
test/rbkt/Queries/zorba/nodes/position_3_parsed.xq (+34/-0)
test/rbkt/Queries/zorba/nodes/position_4.xq (+84/-0)
test/rbkt/Queries/zorba/nodes/position_4_parsed.xq (+81/-0)
test/rbkt/Queries/zorba/nodes/position_err.xq (+60/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-01.xq (+8/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-02.xq (+13/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-03.xq (+13/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-04.xq (+19/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-05.xq (+19/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-06.xq (+19/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-07.xq (+19/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-08.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-09.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-10.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-11.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-12.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-13.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-14.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-15.xq (+8/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-16.xq (+8/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-17.xq (+8/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-18.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-19.xq (+15/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-20.xq (+15/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-21.xq (+15/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-22.xq (+15/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-23.xq (+15/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-24.xq (+16/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-25.xq (+21/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-26.xq (+21/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-27.xq (+21/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-28.xq (+21/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-29.xq (+21/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-30.xq (+21/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-31.xq (+65/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-32.xq (+65/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-33.xq (+65/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-34.xq (+65/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-35.xq (+65/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-36.xq (+65/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-37.xq (+20/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-38.xq (+20/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-39.xq (+20/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-40.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-41.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-42.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-43.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-44.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-45.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-46.xq (+37/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-47.spec (+1/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-47.xq (+13/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-48.spec (+1/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-48.xq (+13/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-49.spec (+1/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-49.xq (+13/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-50.spec (+1/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-50.xq (+13/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-51.spec (+1/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-51.xq (+11/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-52.spec (+1/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-52.xq (+11/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-53.xq (+13/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-54.xq (+14/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-55.xq (+14/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-56.xq (+14/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-01.xq (+6/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-02.xq (+6/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-03.xq (+6/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-04.xq (+6/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-05.xq (+8/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-06.xq (+6/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-07.xq (+6/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-08.xq (+7/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-09.xq (+6/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-10.xq (+2/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-11.xq (+7/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-12.xq (+6/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-13.xq (+7/-1)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-14.xq (+6/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-15.xq (+8/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-16.spec (+0/-1)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-16.xq (+0/-8)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-17.spec (+0/-1)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-17.xq (+0/-8)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-18.spec (+1/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-18.xq (+8/-0)
test/rbkt/Queries/zorba/paths/ref1.spec (+0/-1)
test/rbkt/Queries/zorba/reference/error.spec (+0/-4)
test/rbkt/Queries/zorba/reference/error.xq (+0/-6)
test/rbkt/Queries/zorba/reference/reference.xqlib (+3/-0)
test/rbkt/Queries/zorba/reference/reference_1.xq (+13/-0)
test/rbkt/Queries/zorba/reference/reference_2.xq (+14/-0)
test/rbkt/Queries/zorba/reference/reference_3.xq (+33/-0)
test/rbkt/Queries/zorba/reference/reference_4.spec (+1/-0)
test/rbkt/Queries/zorba/reference/reference_4.xq (+3/-0)
test/rbkt/Queries/zorba/reference/reference_5.xq (+29/-0)
test/rbkt/Queries/zorba/reference/reference_doc_example_01.spec (+0/-4)
test/rbkt/Queries/zorba/reference/reference_doc_example_01.xq (+0/-7)
test/rbkt/Queries/zorba/reference/reference_doc_example_02.spec (+0/-4)
test/rbkt/Queries/zorba/reference/reference_doc_example_02.xq (+0/-8)
test/rbkt/Queries/zorba/schemas/local-xhtml.spec (+1/-0)
test/rbkt/Queries/zorba/schemas/local-xhtml.xq (+6/-0)
test/rbkt/Queries/zorba/schemas/val-inplace-err2.spec (+1/-0)
test/rbkt/Queries/zorba/schemas/val-inplace-err2.xq (+23/-0)
test/rbkt/Queries/zorba/schemas/val-inplace-err2.xsd (+18/-0)
test/rbkt/Queries/zorba/schemas/val-inplace3.xq (+22/-0)
test/rbkt/Queries/zorba/schemas/val-inplace3.xsd (+13/-0)
test/rbkt/Queries/zorba/schemas/val-inplace4.xq (+40/-0)
test/rbkt/Queries/zorba/schemas/val-inplace4.xsd (+26/-0)
test/rbkt/Queries/zorba/schemas/val-xsiType-noSchemaImport.xq (+11/-0)
test/rbkt/Queries/zorba/schemas/validate_xqdoc_01.xq (+4/-0)
test/rbkt/Queries/zorba/schemas/validate_xqdoc_02.xq (+4/-0)
test/rbkt/Queries/zorba/spec/XQuery_3.0.html (+28771/-30944)
test/rbkt/Queries/zorba/spec/xquery_1_1.spec (+0/-5)
test/rbkt/Queries/zorba/spec/xquery_1_1.xq (+0/-69)
test/rbkt/Queries/zorba/spec/xquery_3_0.spec (+5/-0)
test/rbkt/Queries/zorba/spec/xquery_3_0.xq (+69/-0)
test/rbkt/Queries/zorba/spec/xquery_spec.xqi (+4/-13)
test/rbkt/Queries/zorba/store/documents.xq (+1/-0)
test/rbkt/Queries/zorba/store/example_3.xq (+4/-4)
test/rbkt/Queries/zorba/string/Regex/regex_a4.xq (+1/-0)
test/rbkt/Queries/zorba/string/StringToCodepointFunc/StringToCodepointFunc4.xq (+10/-0)
test/rbkt/Queries/zorba/string/token01.txt (+1/-0)
test/rbkt/Queries/zorba/string/token02.txt (+1/-0)
test/rbkt/Queries/zorba/string/token03.txt (+1/-0)
test/rbkt/Queries/zorba/string/token04.txt (+1/-0)
test/rbkt/Queries/zorba/string/tokenize01.xq (+5/-0)
test/rbkt/Queries/zorba/string/tokenize02.xq (+5/-0)
test/rbkt/Queries/zorba/string/tokenize03.xq (+5/-0)
test/rbkt/Queries/zorba/string/tokenize04.xq (+5/-0)
test/rbkt/Queries/zorba/udf/udf-fib-rec.spec (+1/-0)
test/rbkt/Queries/zorba/udf/udf-fib-rec.xq (+8/-0)
test/rbkt/Queries/zorba/updates/no_hoist.xq (+8/-0)
test/rbkt/Queries/zorba/updates/recursive.xq (+11/-0)
test/rbkt/Queries/zorba/updates/subst.xsd (+23/-0)
test/rbkt/Queries/zorba/updates/undo10.xq (+34/-0)
test/rbkt/Queries/zorba/updates/undo11.xq (+54/-0)
test/rbkt/Queries/zorba/updates/undo8.xq (+54/-0)
test/rbkt/Queries/zorba/updates/undo9.xq (+54/-0)
test/rbkt/Queries/zorba/updates/utils.xqlib (+30/-0)
test/rbkt/Queries/zorba/uris/decode_01.xq (+3/-0)
test/rbkt/Queries/zorba/uris/decode_02.spec (+1/-0)
test/rbkt/Queries/zorba/uris/decode_02.xq (+3/-0)
test/rbkt/Queries/zorba/uris/decode_03.xq (+4/-0)
test/rbkt/Queries/zorba/uris/decode_04.xq (+3/-0)
test/rbkt/Queries/zorba/versioning/import-chain1.xq (+1/-1)
test/rbkt/Queries/zorba/versioning/import-chain2.xq (+1/-1)
test/rbkt/Queries/zorba/versioning/import1.xq (+1/-1)
test/rbkt/Queries/zorba/versioning/import2.xq (+1/-1)
test/rbkt/Queries/zorba/versioning/import3.xq (+1/-1)
test/rbkt/Queries/zorba/versioning/import4.xq (+1/-1)
test/rbkt/Queries/zorba/versioning/import5.xq (+1/-1)
test/rbkt/Queries/zorba/versioning/import6.xq (+1/-1)
test/rbkt/Queries/zorba/versioning/import7.xq (+1/-1)
test/rbkt/Queries/zorba/windowing/sliding01.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/sliding02.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/sliding03.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/sliding04.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/sliding05.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/sliding06.xq (+6/-0)
test/rbkt/Queries/zorba/windowing/sliding07.xq (+10/-0)
test/rbkt/Queries/zorba/windowing/sliding08.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/sliding08.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/sliding09.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/sliding10.xq (+18/-0)
test/rbkt/Queries/zorba/windowing/sliding11.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/sliding12.xq (+7/-0)
test/rbkt/Queries/zorba/windowing/sliding13.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/sliding14.xq (+12/-0)
test/rbkt/Queries/zorba/windowing/tumbling01.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling02.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/tumbling04.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling05.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/tumbling06.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling07.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling08.xq (+6/-0)
test/rbkt/Queries/zorba/windowing/tumbling09.xq (+6/-0)
test/rbkt/Queries/zorba/windowing/tumbling10.xq (+10/-0)
test/rbkt/Queries/zorba/windowing/tumbling11.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling11.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling14.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling14.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling15.spec (+2/-0)
test/rbkt/Queries/zorba/windowing/tumbling15.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling16.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling16.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling17.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling17.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling18.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling18.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling19.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling19.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling20.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling20.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling21.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling21.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling22.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling22.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling24.xq (+6/-0)
test/rbkt/Queries/zorba/windowing/tumbling25.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/tumbling26.xq (+3/-0)
test/rbkt/Queries/zorba/windowing/tumbling27.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling28.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling29.xq (+17/-0)
test/rbkt/Queries/zorba/windowing/tumbling31.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling31.xq (+3/-0)
test/rbkt/Queries/zorba/windowing/tumbling32.xq (+19/-0)
test/rbkt/Queries/zorba/windowing/tumbling33.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/tumbling34.xq (+6/-0)
test/rbkt/Queries/zorba/windowing/tumbling35.xq (+8/-0)
test/rbkt/Queries/zorba/windowing/tumbling36.xq (+5/-0)
test/rbkt/Queries/zorba/windowing/tumbling37.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling37.xq (+8/-0)
test/rbkt/Queries/zorba/windowing/tumbling38.xq (+8/-0)
test/rbkt/Queries/zorba/windowing/tumbling39.xq (+12/-0)
test/rbkt/Queries/zorba/windowing/tumbling40.xq (+27/-0)
test/rbkt/Queries/zorba/windowing/tumbling41.xq (+9/-0)
test/rbkt/Queries/zorba/windowing/tumbling42.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling42.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling43.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling43.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling44.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/tumbling44.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling45.xq (+4/-0)
test/rbkt/Queries/zorba/windowing/tumbling46.xq (+17/-0)
test/rbkt/Queries/zorba/windowing/tumbling47.xq (+20/-0)
test/rbkt/Queries/zorba/windowing/tumbling48.xq (+18/-0)
test/rbkt/Queries/zorba/windowing/tumbling49.xq (+12/-0)
test/rbkt/Queries/zorba/windowing/windowing12.xq (+9/-0)
test/rbkt/Queries/zorba/windowing/windowing13.spec (+1/-0)
test/rbkt/Queries/zorba/windowing/windowing13.xq (+4/-0)
test/rbkt/Queries/zorba/xmark/q10.xq (+8/-4)
test/rbkt/Queries/zorba/xqddf/test-node-reference.xq (+2/-0)
test/rbkt/Queries/zorba/xqdoc/moduleDocumentation.spec (+1/-3)
test/rbkt/Queries/zorba/xqdoc/moduleDocumentation.xq (+58/-63)
test/rbkt/Scripts/w3c/Readme.txt (+17/-7)
test/rbkt/Scripts/w3c/Submit_xqts.cmake (+23/-9)
test/rbkt/Scripts/w3c/generate-submission-xqftts.xq (+4/-4)
test/rbkt/Scripts/w3c/generate-submission-xqts.xq (+4/-9)
test/rbkt/Scripts/w3c/import_w3c_full_text_testsuite.sh (+1/-1)
test/rbkt/Scripts/w3c/import_w3c_testsuite.sh (+1/-1)
test/rbkt/itertest.xq.in (+58/-44)
test/rbkt/modules/CMakeLists.txt (+7/-3)
test/rbkt/modules/bad-ver.xq (+1/-1)
test/rbkt/modules/module-A.xq (+1/-1)
test/rbkt/modules/module-B.xq (+1/-1)
test/rbkt/modules/random-file.txt (+1/-0)
test/rbkt/modules/ver.xq (+1/-1)
test/rbkt/modules/ver2.xq (+1/-1)
test/rbkt/specification.h (+1/-1)
test/rbkt/testdriver.cpp (+1/-0)
test/rbkt/testdriver_common.cpp (+17/-4)
test/rbkt/testdriver_mt.cpp (+32/-5)
test/unit/CMakeLists.txt (+40/-10)
test/unit/context_item.cpp (+158/-0)
test/unit/context_item1.xq (+4/-0)
test/unit/context_item2.xq (+6/-0)
test/unit/cxx_api_ch1.xq (+26/-0)
test/unit/cxx_api_ch2.xq (+17/-0)
test/unit/cxx_api_ch3.xq (+20/-0)
test/unit/cxx_api_ch4.xq (+19/-0)
test/unit/cxx_api_changes.cpp (+345/-0)
test/unit/datetime.cpp (+2/-0)
test/unit/ext_main2.xq (+21/-0)
test/unit/ext_main3.xq (+21/-0)
test/unit/ext_mod.xq (+4/-0)
test/unit/ext_mod2.xq (+19/-0)
test/unit/external_function.cpp (+169/-15)
test/unit/guestbook.xq (+9/-0)
test/unit/guestbook_main.xq (+1/-1)
test/unit/main_invoke.xq (+9/-0)
test/unit/mini_audit.xq (+13/-0)
test/unit/mini_http.xq (+40/-0)
test/unit/module1.xq (+1/-1)
test/unit/module2.xq (+17/-0)
test/unit/module4.xq (+6/-0)
test/unit/module5.xq (+20/-0)
test/unit/module6.xq (+38/-0)
test/unit/plan_serializer.cpp (+61/-14)
test/unit/schema1.xsd (+21/-0)
test/unit/static_context.cpp (+75/-0)
test/unit/staticcollectionmanager.cpp (+293/-19)
test/unit/testGetExtVarA.xq (+13/-0)
test/unit/testGetExtVarB.xq (+6/-0)
test/update/CMakeLists.txt (+1/-1)
test/update/Queries/zorba/store/sc3_ex3.xq (+1/-1)
test/update/Scripts/Readme.txt (+8/-5)
test/update/Scripts/XQUTS.xml (+1/-1)
test/update/Scripts/generate-submission-xquts.xq (+11/-4)
test/update/Scripts/import_w3c_update_testsuite.sh (+1/-1)
test/update/Scripts/zorba-xquts-submission.xml (+858/-0)
test/update/Scripts/zorba-xqutsx-submission.xml (+858/-0)
test/zperf/src/start.xq (+154/-100)
To merge this branch: bzr merge lp:~zorba-coders/zorba/feature-ft_module
Reviewer Review Type Date Requested Status
Matthias Brantner Pending
Paul J. Lucas Pending
Review via email: mp+98564@code.launchpad.net

This proposal supersedes a proposal from 2012-03-14.

Commit message

create a try.zorba-xquery.com web interface for this branch
More documentation/improvements.

Description of the change

create a try.zorba-xquery.com web interface for this branch
More documentation/improvements.

To post a comment you must log in.
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

The attempt to merge lp:~paul-lucas/zorba/feature-ft_module into lp:~zorba-coders/zorba/zorba-experimental failed. Below is the output from the failed tests.

experimental build started for lp:~paul-lucas/zorba/feature-ft_module. Check out http://feature-ft_module.zorba-xquery.com/ in half an hour or so. Logfile at http://zorbatest.lambda.nu:8080/remotequeue/experimental/feature-ft_module.log .

Revision history for this message
Paul J. Lucas (paul-lucas) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Attempt to merge into lp:~zorba-coders/zorba/zorba-experimental failed due to conflicts:

text conflict in modules/ExternalModules.conf

Revision history for this message
Paul J. Lucas (paul-lucas) wrote : Posted in a previous version of this proposal

The branch must have some old copy of that file. I merged the trunk into the ft_module branch and there are no conflicts there.

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
10729. By William Candillon

Minor update on the PHP example page. Approved: William Candillon, Matthias Brantner

10730. By Markos Zaharioudakis

fixed windowing bug Approved: Markos Zaharioudakis

10731. By Markos Zaharioudakis

fixed bug #872234 Approved: Markos Zaharioudakis

10732. By Matthias Brantner

fixed bug #955574 (http-client "hangs" if following a POST request) Approved: Till Westmann, Matthias Brantner

10733. By Rodolfo Ochoa

This upgrade supply the required objects and methods for basic XQJ support. Approved: Matthias Brantner, Rodolfo Ochoa, Cezar Andrei

10734. By Markos Zaharioudakis

comments and cosmetic changes Approved: Markos Zaharioudakis

10735. By Ghislain Fourny

Introduced SimpleStore API (separating factory, collection and treeID creation from the rest of the store). Approved: Markos Zaharioudakis, Matthias Brantner

10736. By Markos Zaharioudakis

Fixed performance problem with the findNodeSources function of the no-copy rule Approved: Markos Zaharioudakis

10737. By Matthias Brantner

fix for bug #963091 (Zorba 2.2.0 fails to build with gcc 4.7) Approved: Chris Hillery, Matthias Brantner

10738. By Federico Cavalieri <federico@M702X>

* Fixed performance problem with the findNodeSources function of the no-copy rule Approved: Markos Zaharioudakis, Cezar Andrei

10739. By Markos Zaharioudakis

Fixed bug #866547 Approved: Markos Zaharioudakis

10740. By Ghislain Fourny

Fixed code for QNames not in pool. Approved: Markos Zaharioudakis, Matthias Brantner

10741. By Ghislain Fourny

Uses (overridable) typedef and traits for tree ID. Approved: Markos Zaharioudakis, Matthias Brantner

10742. By Paul J. Lucas

Augmented API for transcoding streambuf. Approved: Chris Hillery, Matthias Brantner

10743. By Markos Zaharioudakis

fixed bug #967428 Approved: Markos Zaharioudakis

10744. By Markos Zaharioudakis

Fixed bug #967864 (var substitution did not update theFreeVars property) Approved: Markos Zaharioudakis

10745. By Markos Zaharioudakis

small code refactoring + cosmetic Approved: Markos Zaharioudakis

10746. By Ghislain Fourny

Solved bug 949910. Approved: Sorin Marian Nasoi, Markos Zaharioudakis

10747. By Ghislain Fourny

Removed unused link directory. Approved: Markos Zaharioudakis, Till Westmann

10748. By Markos Zaharioudakis

removed class-version infrastrure from plan serializer Approved: Markos Zaharioudakis

10749. By Rodolfo Ochoa

just a header change will allow windows to compile... Approved: Cezar Andrei, Sorin Marian Nasoi

10750. By Markos Zaharioudakis

file renaming + comments + cosmetic Approved: Markos Zaharioudakis

10751. By Sorin Marian Nasoi

Fixed the XQDoc visitor on Windows that caused the "xqdoc-xml" project to fail to build. Approved: Rodolfo Ochoa, Sorin Marian Nasoi

10752. By Ghislain Fourny

fixed bug 955135 (err:XQDY0044 not caught by try-catch expressions)
fixed bug 955170 (Catch clause with URILiteral-based wilcard NameTest) Approved: Till Westmann, Ghislain Fourny, Matthias Brantner

10753. By David Graf

Making destructors virtual for several classes that have virtual functions. Approved: Till Westmann, David Graf

10754. By Ghislain Fourny

No longer destroying built-in annotations twice. Approved: Markos Zaharioudakis, Ghislain Fourny, Matthias Brantner

10755. By Matthias Brantner

fix for bug #906494 (default compile with D_FILE_OFFSET_BITS=64) Approved: Chris Hillery, Matthias Brantner

10756. By Matthias Brantner

fix for bug #978722 (change annotation prefix from "ann" to "an") Approved: Matthias Brantner, William Candillon

10757. By David Graf

Bug #980600.
Introduced ZORBA_ASSERT_WITH_MSG macro to give additional debugging information in case an assertion fails. Currently used in Ordpath functions. Approved: Till Westmann, Markos Zaharioudakis

10758. By Matthias Brantner

fix for bug #948879 (--uri-path doesn't work with fetch:content()) Approved: Chris Hillery, Matthias Brantner

10759. By Markos Zaharioudakis

abstract classes don't need class factory for serialization + cosmetic + comments Approved: Markos Zaharioudakis

10760. By Ghislain Fourny

Introducing XDM and PUL schemas. Approved: Ghislain Fourny, Matthias Brantner, Alexander Kreutz, David Graf

10761. By Daniel Turcanu

"No Unicode" is now "No ICU."
Added a a q-flag fix for an undiscovered bug. Approved: Rodolfo Ochoa, Markos Zaharioudakis

10762. By Matthias Brantner

fix for bug #867253 (cdml:delete-nodes should only remove root nodes) Approved: Matthias Brantner, David Graf

10763. By David Graf

Fix for bug #914655. Approved: Markos Zaharioudakis, Matthias Brantner, David Graf

10764. By Ghislain Fourny

Fixed tests involving unordered collections, though assuming order for test results. Approved: Markos Zaharioudakis, Till Westmann

10765. By Markos Zaharioudakis

Annotation QNames are now released when destroy is called (used to be in class destructor). Approved: Markos Zaharioudakis, Matthias Brantner

10766. By Matthias Brantner

Fix for bug #921458 (file:read-text-lines() blocking) Approved: Paul J. Lucas, William Candillon

10767. By Paul J. Lucas

Added operators for built-in types (when ZORBA_WITH_BIG_INTEGER=OFF). Approved: Markos Zaharioudakis, Matthias Brantner, Paul J. Lucas

10768. By Paul J. Lucas

Now comparing name() to name(). Approved: Matthias Brantner, Paul J. Lucas

10769. By Markos Zaharioudakis

Fixed bug #891650 Approved: Markos Zaharioudakis

10770. By Markos Zaharioudakis

fix for bug #980526 Approved: Markos Zaharioudakis

10771. By Paul J. Lucas

Removed use of is_arithmetic for Windows and "unrolled" all the types.
 Approved: Rodolfo Ochoa, Paul J. Lucas

10772. By Chris Hillery

Improve "known-crashing test" list support in ADD_TEST_DIRECTORY(): only skip such tests on Win32, otherwise use EXPECTED_FAILURE(). Also raise an error if an unknown test is passed to this macro. Approved: Juan Zacarias, Chris Hillery

10773. By Markos Zaharioudakis

removed forward-referencing stuff Approved: Markos Zaharioudakis

10774. By Juan Zacarias

Bug #930157: fn:available-environment-variables Implementation
Bug #930158: fn:environment-variables Implementation
Bug #930160: fn:uri-collection Implementation
Bug #930161: fn:unparsed-text Implementation
Bug #930162: fn:unparsed-text-available Implementation Approved: Sorin Marian Nasoi, Matthias Brantner

10775. By William Candillon

Add prefix attribute to xqdoc:annotation elements.
This enables a better handling of predeclared namespaces. Approved: Matthias Brantner, Sorin Marian Nasoi

10776. By Matthias Brantner

proper return type specification for analyze-string Approved: Markos Zaharioudakis, Paul J. Lucas

10777. By Chris Hillery

Add java classpath to zorbacmd and to Zorba API.
Fix dynamic libraries loading.
Tested it works on Windows with both xsl-fo and xmlbeans modules. All tests are passing.

Fixed ExternalModule integration, fixed comment and indentation of previously property generated files: src/system/zorba_properties.h and bin/zorbacmdproperties_base.h. Approved: Chris Hillery, Matthias Brantner, Cezar Andrei

10778. By Rodolfo Ochoa

Diagnostic Handler is now working with other languages API, also the SWIG-Director functionality is active. Approved: Matthias Brantner, Cezar Andrei

10779. By Ghislain Fourny

Declaration of XQuery version 3.0 upon DDL module import Approved: Markos Zaharioudakis, Matthias Brantner

10780. By Matthias Brantner

fix for build on mac Approved: Paul J. Lucas, Matthias Brantner

10781. By Paul J. Lucas

Added extra check for ')' without '('. Approved: Chris Hillery, Paul J. Lucas

10782. By Paul J. Lucas

Added functions to get rid of warnings.
Added is_xs_TTTTTT() functions to Integer. Approved: Matthias Brantner, Paul J. Lucas

10783. By William Candillon

Fix the mac build with the PHP binding Approved: Paul J. Lucas, William Candillon

10784. By Rodolfo Ochoa

Added XQJ support.
New clean branch. Approved: Cezar Andrei, Matthias Brantner

10785. By Markos Zaharioudakis

removed get_is_temp_field_also_for_ptr() method and reduced use of set_is_temp_field_one_level(),
changed the serializat5ion of maps (std and hashmaps)
added --serialize-plan option to zorbacmd
 Approved: Markos Zaharioudakis

10786. By Rodolfo Ochoa

Work-around for Windows compiler problem; see:
http://stackoverflow.com/questions/9285657/sfinae-differentiation-between-signed-and-unsigned Approved: Rodolfo Ochoa, Paul J. Lucas

10787. By Cezar Andrei <email address hidden>

Update trunk to use data-formating-module branch at at latest tag: zorba-2.2-jvm. Approved: Chris Hillery, Cezar Andrei

10788. By Matthias Brantner

fixed bug #947627 (setting the static type of the context item is ignored)
 Approved: Markos Zaharioudakis, Till Westmann

10789. By Cezar Andrei <email address hidden>

According to Xerces-C++ team( http://issues.apache.org/jira/browse/XERCESC-1980 ) XMLSchema.xsd i.e. schema4schema should be avoided to be imported. This fix avoids importing this schema file. Approved: Chris Hillery, Cezar Andrei

10790. By Markos Zaharioudakis

Fixed bug #986075 Approved: Markos Zaharioudakis

10791. By Chris Hillery

added a check and rethrow for error zerr::ZXQP0029_URI_ACCESS_DENIED when importing schemas Approved: Chris Hillery

10792. By Chris Hillery

Make error message for ZXQP0029 more general-purpose. Approved: Dennis Knochenwefel, Chris Hillery

10793. By Markos Zaharioudakis

Fixed bug #981405 Approved: Markos Zaharioudakis

10794. By Chris Hillery

Set ICU_VERSION when finding ICU.
 Approved: Paul J. Lucas, Chris Hillery

10795. By Sorin Marian Nasoi <email address hidden>

Added try/catch for errors in the module processing. Approved: William Candillon, Sorin Marian Nasoi

10796. By Sorin Marian Nasoi <email address hidden>

Fix for lp:967284. Approved: Nicolae Brinza, Sorin Marian Nasoi

10797. By Ghislain Fourny

Fixing case where accessing an empty vector with position 0 in base64binary (causes assertion on Windows to be hit). Approved: Markos Zaharioudakis, Matthias Brantner

10798. By Markos Zaharioudakis

put back --compile-plan and --execute-plan options Approved: Markos Zaharioudakis

10799. By Juan Zacarias

Solves bug #928135
Segmentation fault on python Approved: Rodolfo Ochoa, Matthias Brantner

10800. By Matthias Brantner

fix for bug #988412 (date:current-dateTime daylight saving) Approved: William Candillon, Matthias Brantner

10801. By Paul J. Lucas

Better implementation of listing files in a directory. Approved: Rodolfo Ochoa, Cezar Andrei

10802. By Chris Hillery

Add zorba::Item::getTypeCode(), and make corresponding SchemaTypeCode enum part of the public API. Add zorba::ItemFactory::assignElementTypedValue() to allow construction of elements with typed values in the public API. As discussed, this API is not the prettiest, but it is the least intrusive while being the easiest for end-users to make use of. Approved: Markos Zaharioudakis, Chris Hillery, Matthias Brantner

10803. By Ghislain Fourny

Added an instruction to sort chained tests for deterministic order. Approved: Matthias Brantner, Markos Zaharioudakis

10804. By Paul J. Lucas

1. Added a new full-text module.
2. Fixed semi-broken Thesaurus API.
3. Now supporting many more languages for tokenization including Chinese.
4. Many other full-text improvements. Approved: Chris Hillery, Paul J. Lucas

10805. By Nicolae Brinza

Fixes for bugs #931501 and #866987 -- improved error messages for fn:format-number() Approved: Nicolae Brinza, Matthias Brantner

10806. By Rodolfo Ochoa

Collection Manager and Document Manager is ready on XQJ API. Approved: Cezar Andrei, Matthias Brantner

10807. By Chris Hillery

Fix remote queue failures due to change in 28msec.com. Approved: Till Westmann, Chris Hillery

10808. By Cezar Andrei <email address hidden>

Fix for Bug #857842 Assertion failed with simple content element with comments
Make use of XML_SCHEMA_NS definition from ns_consts.h. Approved: Matthias Brantner, Cezar Andrei

10809. By Sorin Marian Nasoi <email address hidden>

fix for lp:987830. Approved: Sorin Marian Nasoi, Markos Zaharioudakis

10810. By Sorin Marian Nasoi <email address hidden>

Added the STACK and QUEUE modules. Approved: Matthias Brantner, Sorin Marian Nasoi

10811. By Chris Hillery

Added note about re-running CMake if you add or remove .cpp files in your module source directory.
 Approved: Juan Zacarias, Chris Hillery

10812. By Nicolae Brinza

Added XQuery 3.0 Functions
path, has-children#0, nilled#0 Approved: Juan Zacarias, Matthias Brantner

10813. By Chris Hillery

Massively refactor, reformat, correct, and clean up Zorba's Build doc. Approved: William Candillon, Chris Hillery

10814. By Markos Zaharioudakis

1. Fixed memory leak in case of index truncation
2. Fixed bug in mergeUpdates() method
 Approved: Markos Zaharioudakis

10815. By Nicolae Brinza

Small optimization in the serializer to avoid a repeated string comparison Approved: Nicolae Brinza, David Graf

10816. By Markos Zaharioudakis

Fixed bug in MarkNodeCopyProps rule (static cast to replace_expr without chaing the expr kind first) Approved: Markos Zaharioudakis

10817. By Markos Zaharioudakis

fixed bug #966706 (key uniqueness of value equality index not enforced) Approved: Markos Zaharioudakis, Till Westmann, Matthias Brantner

10818. By Markos Zaharioudakis

Fixed bug #862971 (no error upon duplicate function declarations) Approved: Markos Zaharioudakis

10819. By Paul J. Lucas

Fixed warnings and build error. Approved: David Graf, Paul J. Lucas

10820. By David Graf

fixing windows build Approved: Ghislain Fourny, David Graf

10821. By Till Westmann

enable blocking of internal modules by running through URI mapping (but not through URL resolution) during translation Approved: Matthias Brantner, Markos Zaharioudakis, Chris Hillery

10822. By Markos Zaharioudakis

fixed memory leak in population of value index Approved: Markos Zaharioudakis

10823. By Paul J. Lucas

Fixed typos. Approved: Matthias Brantner, Paul J. Lucas

10824. By Matthias Brantner

optimized ft:tokenize (no validation of tokens + factorized creation of qnames) Approved: Paul J. Lucas, Matthias Brantner

10825. By Chris Hillery

Removed note about JSONiq (not in 2.5 after all). Approved: Matthias Brantner, Chris Hillery

10826. By Markos Zaharioudakis

fixed bug 867170$ Approved: Markos Zaharioudakis

10827. By Ghislain Fourny

Fixed bug 978254 (QName comparison in item sequence chainer ignored namespaces and took prefixes into account). Approved: Markos Zaharioudakis, Matthias Brantner

10828. By Paul J. Lucas

Fixes the stop-words core dump on 64-bit Linux. Approved: Matthias Brantner, Paul J. Lucas

10829. By Paul J. Lucas

1. Added fix for [\s] -- should now always throw FORX0002.
2. I think all regex tests "pass" using both pre- and post-4.0 of ICU. Approved: Ghislain Fourny, Paul J. Lucas

10830. By Matthias Brantner

no node copying during insertion into collection if the nodes are freshly constructed nodes Approved: Markos Zaharioudakis, Matthias Brantner

10831. By Matthias Brantner

- Add the ability to create a StreamableStringItem that re-uses the stream from another Streamable*Item (in a memory-ownership-safe way). Fixed bug #996084 (crash in Streamable*Item with file module)

- Add a base64:decode#2 function that also does transcoding to utf-8 Approved: Chris Hillery, Dennis Knochenwefel, William Candillon, Matthias Brantner

10832. By Paul J. Lucas

Added current-compare-options() function. Approved: Matthias Brantner, Paul J. Lucas

10833. By Matthias Brantner

note in the java documentation that it might be deprecated in favor of xqj Approved: Matthias Brantner, Rodolfo Ochoa

10834. By Paul J. Lucas

1. In transcoding streambufs, throwing std::invalid_argument for empty charsets.
2. In the HTTP code, now setting the charset to ISO-8859-1 in the constructor so it's set even when there's no Content-Type header. Approved: Dennis Knochenwefel, Paul J. Lucas

10835. By Paul J. Lucas

Documentation tweaks. Approved: Matthias Brantner, Paul J. Lucas

10836. By Nicolae Brinza

Documentation fixes. Approved: Matthias Brantner, Nicolae Brinza

10837. By Paul J. Lucas

Added link to full-text module.
Note that I have no way to test it. Approved: Matthias Brantner, Paul J. Lucas

10838. By Paul J. Lucas

Added check to see that JsonML (array form) really starts with '['. Approved: William Candillon, Paul J. Lucas

10839. By Sorin Marian Nasoi <email address hidden>

Updated the import scripts to use the W3C testsuites from 04-May-2012. Approved: Chris Hillery, Sorin Marian Nasoi

10840. By Rodolfo Ochoa

Complete XQJ Documentation Approved: Matthias Brantner, Cezar Andrei

10841. By Rodolfo Ochoa

BaseURI can now be cleared through a method.
When BaseUri is undefined it returns an empty string instead of asserting.
Fixed some compilation warnings to have a cleaner compiling.
Added #define stdafx.h to some files to fix the precompiled headers on Windows. Approved: Matthias Brantner, Chris Hillery

10842. By Matthias Brantner

use an instead of ann prefix in the documentation Approved: Matthias Brantner, Chris Hillery

10843. By Matthias Brantner

- no undo is done for collection truncate
- fix for bug #986377 "do not apply any updates on collection if it is to be truncated" Approved: Markos Zaharioudakis, Matthias Brantner

10844. By Nicolae Brinza

Documentation improvements. Fixed the type of the options parameter to the parse-fragment() function. Approved: Nicolae Brinza, Matthias Brantner

10845. By Paul J. Lucas

Renamed Tokenizer::Numbers to Tokenizer::State now (just prior to the 2.5 release) to give it a better name for the forthcoming addition of the ability to tokenize using include/exclude Item lists. At that time, State will most likely be expanded to include additional state information beyond just numbers, hence the name change.

(In the previous proposal, I had forgotten to update the documentation -- now done.) Approved: Matthias Brantner, Paul J. Lucas

10846. By Ghislain Fourny

Allowing general tree IDs (containing hexadecimal digits and dash) in structural URIs (test). Approved: Markos Zaharioudakis, Matthias Brantner

10847. By Matthias Brantner

replaced occurrences of XQuery version 1.1 with 3.0 Approved: Chris Hillery, Matthias Brantner

10848. By Chris Hillery

Fix (from Matthias) to ensure StaticContext used for invoke() lives as long as the ItemSequence returned from said invoke().
 Approved: Matthias Brantner, Chris Hillery

10849. By Matthias Brantner

- fixed itemfactory unit test on Windows
- disabled string unit test on Windows (because of bug #867271) Approved: Chris Hillery, Matthias Brantner

10850. By William Candillon

Remove dead links in the documentation. Approved: William Candillon, Matthias Brantner

10851. By Paul J. Lucas

Fixed the build error and also fixed several warnings that are new with Xcode 4.3.2. Approved: Matthias Brantner, Paul J. Lucas

10852. By Paul J. Lucas

Getting in another public API change for 2.5 for the full-text module since now's the time to do it. Renamed tokenize() to tokenize-node() for 2 reasons:

1. There already exists tokenize-string() and therefore tokenize-node() is a better name than just plain tokenize().

2. The forthcoming addition of the black & white tokenization function will most likely be called tokenize-nodes() -- plural. Approved: Matthias Brantner, Paul J. Lucas

10853. By William Candillon

Fix PHP build Approved: Paul J. Lucas, William Candillon

10854. By Sorin Marian Nasoi <email address hidden>

Update modules_svg generation target. Add mechanism for core build to detect whether a given non-core module exists (by URI). Use that method to check for graphviz before generating modules_svg. Approved: Sorin Marian Nasoi, Chris Hillery

10855. By Chris Hillery

Allow modules to specify their own libs for their Config file, in addition to the automatically-added libs from DECLARE_ZORBA_MODULE().
 Approved: Matthias Brantner, Chris Hillery

10856. By Matthias Brantner

- fetch:content-binary
- fetch:content#3 (with encoding parameter)
- StreamResource::isStreamSeekable to make sure the streamable strings returned by fetch are seekable.
- fixed two warnings in nodes_impl.cpp
- extended the C++ api to be symmetric to the fetch module Approved: Till Westmann, Chris Hillery, Matthias Brantner

10857. By Paul J. Lucas

Fixed a couple of warnings. Approved: Matthias Brantner, Paul J. Lucas

10858. By Matthias Brantner

fix for bug #1001463 (type not available during computation of function caching). Approved: Markos Zaharioudakis, Matthias Brantner

10859. By Matthias Brantner

Add support for function items test in the print xquery visitor. Approved: Matthias Brantner, William Candillon

10860. By Matthias Brantner

added stacks and queues to the data lifecycle documentation Approved: William Candillon, Matthias Brantner

10861. By Matthias Brantner

push-down of count(probe-index()) into the store Approved: Till Westmann, Matthias Brantner

10862. By Chris Hillery

Set CMAKE_INSTALL_RPATH_USE_LINK_PATH to TRUE to have correct RPATHs in installed binaries. Add comment about INSTALL_NAME_DIR. Approved: Matthias Brantner, Chris Hillery

10863. By Matthias Brantner

Update changelog, update module tags for Zorba 2.5. Approved: Matthias Brantner, Chris Hillery

10864. By Sorin Marian Nasoi <email address hidden>

Fixed bug lp:1001477. Approved: Rodolfo Ochoa, Sorin Marian Nasoi

10865. By Paul J. Lucas

No longer setting the charset of an overridden media type to a default value. Approved: David Graf, Matthias Brantner

10866. By Matthias Brantner

updated change log to reflect bug #1002867 Approved: Paul J. Lucas, Matthias Brantner

10867. By Matthias Brantner

added a cmake variable that allows to configure whether external jars are packaged or not (ZORBA_PACKAGE_EXTERNAL_JARS)
 Approved: Matthias Brantner, Chris Hillery

10868. By Paul J. Lucas

s/ZORBA_ASSERT/if/ Approved: Matthias Brantner, Paul J. Lucas

10869. By Paul J. Lucas

1. Fixed return type of ft:thesaurus-lookup().
2. Added a test to ensure that a look-up of a non-existant word works. Approved: Matthias Brantner, Paul J. Lucas

10870. By Rodolfo Ochoa

- Install added for XQJ bindings and documentation
- more documentation for all SWIG generated language bindings
- other installer related cleanups Approved: Matthias Brantner, Chris Hillery, Juan Zacarias

10871. By Markos Zaharioudakis

fixed bug #1006166 Approved: Markos Zaharioudakis

10872. By Markos Zaharioudakis

fixed bug 960083$ (improper error handling of NaN comparisons) + small optimization of comparison operations Approved: Markos Zaharioudakis

10873. By Carlos Manuel Lopez

Implements new group by syntax, as defined in the XQuery 3.0 Spec since September 2011 Approved: Markos Zaharioudakis

10874. By Markos Zaharioudakis

Fixed bug #1003023$ (optimizer problems due to common subexpression after var folding into if-then-else) Approved: Markos Zaharioudakis

10875. By Markos Zaharioudakis

fixed bug #854506 and partial fix for bug #867008 Approved: Markos Zaharioudakis

10876. By Markos Zaharioudakis

Improved hoist rule: tighter hoisting of expressions (also fixes bug #967428) Approved: Markos Zaharioudakis

10877. By Markos Zaharioudakis

Fixed bug #991088$ (raise XUST0001 in trycatch with mixed updating and simple clauses)
 Approved: Markos Zaharioudakis

10878. By Till Westmann

add location information to ZXQP0029_URI_ACCESS_DENIED Approved: Chris Hillery, Markos Zaharioudakis

10879. By Till Westmann

remove unnecessary annotations and clean-up indentation Approved: Ghislain Fourny, Till Westmann

10880. By Markos Zaharioudakis

Merged the JSONiq branch into the zorba trunk, with JSONiq deactivated. Approved: Matthias Brantner, Ghislain Fourny, Markos Zaharioudakis

10881. By Markos Zaharioudakis

renamed file test/unit/static_context.cpp to avoid conflict with src/context/static_contectx.cpp during debugging Approved: Markos Zaharioudakis

10882. By Markos Zaharioudakis

Fixed bug #1008082 (bug in transform expr when a copy var is not used anywhere) Approved: Markos Zaharioudakis

10883. By Markos Zaharioudakis

Fixed bug #932314 (non-comparable values must be treated as distinct by fn:distinct-values) Approved: Markos Zaharioudakis

10884. By Ghislain Fourny

The builtin schema type names, in the store, are now created directly from the pool (this is to prevent a cyclic dependency if another item factory than the simple item factory needs to access the store to produce the QNames, because at this point the store has not been initialized yet). Approved: Matthias Brantner, Markos Zaharioudakis

10885. By Markos Zaharioudakis

Plan serializer does not serialize expressions anymore. Approved: Markos Zaharioudakis

10886. By Markos Zaharioudakis

added serialize_csize function Approved: Markos Zaharioudakis

10887. By Rodolfo Ochoa

Error fixed on windows Approved: Chris Hillery, Cezar Andrei

10888. By Till Westmann

Added support for transient maps in the unordered-maps module. Approved: Matthias Brantner, Till Westmann

10889. By Nicolae Brinza

Improved parser error messages (bug #867357). Approved: David Graf, Matthias Brantner

10890. By Ghislain Fourny

Fixes csize serialization. Approved: Markos Zaharioudakis, Ghislain Fourny

10891. By Ghislain Fourny

Adding asserts in OrdPath::getLocalBitLength to prevent endless loops and possibly reproduce such a potential endless loop with more information. Approved: David Graf, Markos Zaharioudakis

10892. By Dennis Knochenwefel

Cleaning up attribute and element nodes' type handling and checking invariants, following an inconsistency discovered on Windows. Approved: Markos Zaharioudakis, Matthias Brantner, Dennis Knochenwefel

10893. By Nicolae Brinza

Fixed and enabled fn:parse-xml-fragment(). Approved: Juan Zacarias, Matthias Brantner

10894. By Paul J. Lucas

Added base64::streambuf class and replaced horribly inefficient base64 code. Approved: Matthias Brantner, Paul J. Lucas

10895. By Rodolfo Ochoa

Adding cacert.pem for Windows Approved: Cezar Andrei, Chris Hillery

10896. By Markos Zaharioudakis

A better fix for compilation problems involving integer types. Approved: Markos Zaharioudakis

10897. By Paul J. Lucas

Fixed warnings. Approved: Matthias Brantner, Paul J. Lucas

10898. By Markos Zaharioudakis

Optimized hash sets used by fn:distinct-values and nodes-distinct Approved: Markos Zaharioudakis

10899. By Till Westmann

modify fn:path to add support for fragments Approved: Juan Zacarias, Matthias Brantner, Till Westmann

10900. By Paul J. Lucas

Added C++98 subset of C++11's unordered_map. The configure process checks for a working C++11 unordered_map first: if found, it will be used instead. The goal is to phase out the old hash*map* classes over time. Approved: Markos Zaharioudakis, Matthias Brantner

10901. By Till Westmann

add ref:has-node-reference and ref:assign-node-reference Approved: Markos Zaharioudakis, Matthias Brantner

10902. By Paul J. Lucas

Added the missing specialization for hash<unique_ptr<T,D>>. Approved: Matthias Brantner, Paul J. Lucas

10903. By Matthias Brantner

- added API function Item:isSeekable
- fixed a problem in the file module where all exceptions being throw in the body were caught and rethrown as file exception Approved: Chris Hillery, Matthias Brantner

10904. By David Graf

add positional skipping to access of static and dynamic collections Approved: Matthias Brantner, Till Westmann

10905. By Markos Zaharioudakis

Fixed bug #1018673 + renamed misleading isXXXNode() methods. Approved: Markos Zaharioudakis

10906. By Markos Zaharioudakis

Optimized hash function used for nodes (fixes bug #1010051) + some hashmap/hashset cleanup Approved: Markos Zaharioudakis

10907. By Markos Zaharioudakis

Fixed bug #1016429 (scoping of copy variables in transform expr) Approved: Markos Zaharioudakis

10908. By Paul J. Lucas

Added tokenize-nodes() function. Approved: Matthias Brantner, Paul J. Lucas

10909. By David Graf

windows build fix Approved: Dennis Knochenwefel, David Graf

10910. By Ghislain Fourny

Differentiating between two reasons why references are unregistered. Approved: Markos Zaharioudakis, Matthias Brantner

10911. By Ghislain Fourny

Fixed a bug preventing from compiling Zorba single-threadedly. Approved: Markos Zaharioudakis, Ghislain Fourny

10912. By Dennis Knochenwefel

fix for bug #1020953 (access of freed object) Approved: Ghislain Fourny, Nicolae Brinza

10913. By Ghislain Fourny

Adding a NOT ZORBA_HAVE_UNIQUE_PTR guard for adding the unique_ptr test, for consistency. There are guards for including the corresponding resources, so that the test was failing by lack of them.
 Approved: Markos Zaharioudakis, Till Westmann

10914. By Dennis Knochenwefel

fixed memory leak reading data of zstring after destruction. Encoded illegal char in exception to not cause any problems. Approved: Till Westmann, Ghislain Fourny

10915. By Dennis Knochenwefel

fixed CHECK_CXX_SOURCE_COMPILES doesn't work with backslash-n using cmake 2.8.8 on windows. Approved: Paul J. Lucas, Dennis Knochenwefel

10916. By Paul J. Lucas

Now checking data size before accessing vector[0]. Approved: Dennis Knochenwefel, Paul J. Lucas

10917. By David Graf

Unifying .bat and .vcproj generation. Bug #1013075 Approved: Rodolfo Ochoa, Dennis Knochenwefel

10918. By Chris Hillery

EXPECTED_FAILURE()s for two tests failing due to flworfound.org changes. Approved: Matthias Brantner, Chris Hillery

10919. By Paul J. Lucas

1. Added missing "lang" attribute to tokens generated from tokenize-nodes().
2. Added a test. Approved: Chris Hillery, Paul J. Lucas

10920. By Paul J. Lucas

Moved URI resolution for the thesaurus into the translator. Approved: Matthias Brantner, Paul J. Lucas

10921. By Paul J. Lucas

Fixed warnings. Approved: Matthias Brantner, Paul J. Lucas

10922. By Markos Zaharioudakis

Fixed bug #1022557 (subsequence function applied on window variable) Approved: Markos Zaharioudakis

10923. By Ghislain Fourny

Several modifications in the implementation of JSONiq to make it in sync with the new specification, in particular:
- No more pairs,
- Minor changes to the update syntax
- Synced returned error codes
- Support for collections and indices, including automatic maintenance
- Serializer extended to allow mixed JDM and XDM
- Updated C++ API Approved: Matthias Brantner, Ghislain Fourny, Chris Hillery, Markos Zaharioudakis

10924. By Markos Zaharioudakis

added auditing in zorba cmd + fixed bug in auditing the parse time Approved: Markos Zaharioudakis

10925. By Markos Zaharioudakis

Fixed bug #1002993 (bug during revalidation after update due to improper condition for calling TypeOps::get_atomic_type_code() from SchemaValidatorImpl::isPossibleSimpleContentRevalImpl()) Approved: Cezar Andrei, Markos Zaharioudakis

10926. By Ghislain Fourny

Adding two tests for allowing two errors upon sequence of several JSON items and an XML node. Approved: Till Westmann, Matthias Brantner

10927. By Markos Zaharioudakis

Avoid (if possible) treat expr for checking that the value of a non-external global variable conforms to the type declaration of the vatiable Approved: Markos Zaharioudakis

10928. By Nicolae Brinza

Implemented the new EQName syntax. Approved: Matthias Brantner, Nicolae Brinza

10929. By Paul J. Lucas

Reverted previous "fix." Approved: Matthias Brantner, Paul J. Lucas

10930. By Markos Zaharioudakis

Streaming execution for tumbling windows (also fixes bug #1010051) Approved: Markos Zaharioudakis

10931. By Ghislain Fourny

Fixed build errors occurring on Windows by exposing structured item types even in JSONiq is deactivated. Approved: Matthias Brantner, Markos Zaharioudakis

10932. By Markos Zaharioudakis

Incremental maintenance for general indexes. Approved: Markos Zaharioudakis

10933. By Paul J. Lucas

Fixed typo. Approved: Chris Hillery, Paul J. Lucas

10934. By Sorin Marian Nasoi <email address hidden>

Updated the F&O 1.1 and 3.0 documents used in the comparison of the functions and corrected the util:download-and-write-spec function. Approved: Chris Hillery, Sorin Marian Nasoi

10935. By Chris Hillery

Add test case demonstrating bug 1010728. Approved: Markos Zaharioudakis, Chris Hillery

10936. By David Graf

Removed internal debug info from fn:trace out by using zorba serializer instead of the internal show function. Approved: Chris Hillery, David Graf

10937. By Dennis Knochenwefel

Added case for DT_UNKNOWN. Approved: Dennis Knochenwefel, Paul J. Lucas

10938. By Rodolfo Ochoa

Fix for precompiled headers on Windows Approved: Rodolfo Ochoa, Chris Hillery

10939. By Cezar Andrei <email address hidden>

Integrate:
  Fix for bug 1023120 xs:include ignored in schemas.
  Added a new test for this case. Approved: Chris Hillery, David Graf

10940. By Till Westmann

fix position for elements and processing-instructions in fn:path Approved: Markos Zaharioudakis, Matthias Brantner

10941. By Nicolae Brinza

Added support for the unix shebang script launcher (#!/path/interpreter) Approved: Nicolae Brinza, David Graf

10942. By Paul J. Lucas

Now using enable_if for more functions to make overload resolution work better. Approved: Matthias Brantner, Paul J. Lucas

10943. By Rodolfo Ochoa

Disabling "print stack trace" for windows Approved: Chris Hillery, Rodolfo Ochoa

10944. By Paul J. Lucas

Now handling UTF-16 surrogate pairs. Approved: Dennis Knochenwefel, Paul J. Lucas

10945. By Nicolae Brinza

The parse-fragment function now allows a DOCTYPE declaration in the input. Approved: Nicolae Brinza, Matthias Brantner

10946. By Paul J. Lucas

Added functions to test for and create UTF-16 surrogate pairs.
These will probably be needed by whoever fixes bug #1025622. Approved: Dennis Knochenwefel, Paul J. Lucas

10947. By Ghislain Fourny

Fix that gives precedence to an array replacement over an array deletion, and adds tests about multiple updates with same selector on arrays and on objects. Approved: Markos Zaharioudakis, Matthias Brantner

10948. By Paul J. Lucas

Now doing proper JSON serialization. Approved: Chris Hillery, Dennis Knochenwefel, Paul J. Lucas

10949. By Paul J. Lucas

No longer checking captured subgroups in replacement string when 'q' flag is given. Approved: Matthias Brantner, Paul J. Lucas

10950. By Matthias Brantner

removed a non-core module dependency from the reuse-stream test Approved: Chris Hillery, Matthias Brantner

10951. By Markos Zaharioudakis

removed some debugging code, which causes Windows compilation problems Approved: Markos Zaharioudakis

10952. By Paul J. Lucas

Removed zorbatypes/transcoder.h & .cpp. Approved: Matthias Brantner, Paul J. Lucas

10953. By Paul J. Lucas

Now properly serializing JSON for JsonML. Approved: Chris Hillery, Paul J. Lucas

10954. By Paul J. Lucas

1. Tweaked equals().
2. Added "const&" to std_string function arguments. Approved: Matthias Brantner, Paul J. Lucas

10955. By Matthias Brantner

fix for bug #898066 (Stringstream & fn:trace) Approved: Chris Hillery, Matthias Brantner

10956. By Sorin Marian Nasoi <email address hidden>

- added information about the Zorba and XQTS versions that were used in generating the reports
- updated the README.txt with info regarding conformance reports generation Approved: William Candillon, Sorin Marian Nasoi

10957. By Ghislain Fourny

Activating ZORBA_WITH_JSON by default. Approved: Chris Hillery, Matthias Brantner

10958. By Rodolfo Ochoa

Documentation fixed for Zorba binary package with PHP. Approved: Cezar Andrei, Chris Hillery

10959. By Paul J. Lucas

s/0/npos/

This probably fixes some as-of-yet-undiscovered bug. Approved: Matthias Brantner, Paul J. Lucas

10960. By Rodolfo Ochoa

C# API Binding Approved: Cezar Andrei, Chris Hillery

10961. By Ghislain Fourny

Corrects bug 1029836. Approved: Chris Hillery, Matthias Brantner

10962. By Ghislain Fourny

Fixing Windows build with JSONiq. Approved: Chris Hillery, Matthias Brantner

10963. By Paul J. Lucas

Removed JsonML-object. Approved: Ghislain Fourny, Paul J. Lucas

10964. By Matthias Brantner

new ItemFactory function that allows creating dateTime items without timezone Approved: Chris Hillery, Matthias Brantner

10965. By Ghislain Fourny

Fixes bug 1032166 (critical memory bug). Approved: Chris Hillery, Matthias Brantner

10966. By Paul J. Lucas

1. s/take/swap/
2. Removed unnecessary assignment. Approved: Matthias Brantner, Paul J. Lucas

10967. By Juan Zacarias

Fix of bugs
Bug #1014979: Make thesaurus optional component on Windows
Bug #1014981: Make default thesaurus available as Ubuntu package
Also Fixed FindJNI.cmake to be found-able in the Ubuntu Installer Approved: Juan Zacarias, Chris Hillery

10968. By David Graf

Make testdriver_mt work with boost version >1.49. Approved: David Graf, Chris Hillery

10969. By Matthias Brantner

Added a keys() function to the index dml module. This fixes bug #900677. Approved: Matthias Brantner, David Graf

10970. By Chris Hillery

Test temporarily disabled while http-client is being updated. Also get HEAD of OAuth module rather than zorba-2.5 tag for some reason. Approved: Juan Zacarias, Chris Hillery

10971. By Chris Hillery

Split image into image + graphviz; split data-converters into csv + html. Approved: Juan Zacarias, Chris Hillery

10972. By William Candillon

Fix make doc target when multiple version of the same module exists. Approved: Sorin Marian Nasoi, Matthias Brantner

10973. By Ghislain Fourny

Correct array insert expression syntax to include [] like append expressions. Approved: Matthias Brantner, Chris Hillery

10974. By Juan Zacarias

Fixed windows installer component options for c# Bindings Approved: Rodolfo Ochoa, Chris Hillery

10975. By Matthias Brantner

removed some hardcoded english words from error messages raised by the json parser Approved: Paul J. Lucas, Matthias Brantner

10976. By Chris Hillery

Regenerate scanner and parser with flex/bison 2.5 - apparently 2.6 creates code that Clang doesn't like. Approved: Matthias Brantner, Chris Hillery

10977. By Matthias Brantner

prepare ChangeLog for 2.6 release Approved: Chris Hillery, Matthias Brantner

10978. By Chris Hillery

Bump version number to 2.6; update tagged modules; add archive module. Approved: Cezar Andrei, Sorin Marian Nasoi, Chris Hillery

10979. By David Graf

Since OSX Mountain Lion, clang is the default c++ compiler on mac. Therefore, it is not enough to check if the c++ compiler executable is called clang. Approved: David Graf, Paul J. Lucas

10980. By Chris Hillery

Add "generation" of local copy of FlexLexer.h, to ensure it always stays in sync with the generated lexer .cpp file. Approved: Paul J. Lucas, Chris Hillery

10981. By Sorin Marian Nasoi <email address hidden>

Fixed the XQDoc documentation issue related to the formatting of the parameters for the higher order functions. Approved: William Candillon, Sorin Marian Nasoi

10982. By Chris Hillery

Try to find FlexLexer.h associated with the flex binary being used.
 Approved: David Graf, Chris Hillery

10983. By Markos Zaharioudakis

Fixed bug #1033407 (do not store var_expr rchandles in the static context) Approved: Markos Zaharioudakis

10984. By Markos Zaharioudakis

Fixed bugs #899364 and 899363 (throw XQST0103 in case of non-distinct window variables)
Fixed bug #899366 (enforce the type declaration of a window variable) Approved: Markos Zaharioudakis

10985. By Markos Zaharioudakis

Fixed bug #1024892 (index declaration references udf declared after the index) Approved: Markos Zaharioudakis

10986. By David Graf

remove clang warnings in auditing code Approved: Matthias Brantner, Till Westmann, David Graf

10987. By Chris Hillery

added the archive module to ExternalModules.conf and the ChangeLog Approved: Luis Rodriguez Gonzalez, Juan Zacarias, Chris Hillery, Matthias Brantner

10988. By David Graf

Because the jsoniq_emitter aggregates the xml_emitter, it needs to handover all the parameters. Inclusive aEmitAttributes. Approved: Till Westmann, David Graf

10989. By luisrod <luisrod@LUISROD-LAP>

- Added code for bug#1025564 "Deprecate -f argument to zorbacmd"

10990. By Markos Zaharioudakis

Allow prolog variables to be referenced before they are declared (XQuery 3.0 feature) (fixes bug #900688) Approved: Markos Zaharioudakis

10991. By Chris Hillery

Revert unintentional commit r10989. Approved: Luis Rodriguez Gonzalez, Chris Hillery

10992. By Ghislain Fourny

Updated JSONiq tutorial. Approved: William Candillon, Matthias Brantner

10993. By Paul J. Lucas

Miscellaneous changes, some a prerequisite for LLVM that should be done anyway and not have to wait for the far-in-the-future LLVM branch merge. Approved: Matthias Brantner, Paul J. Lucas

10994. By Ghislain Fourny

Specifying collection and property upon ZDST0006. Approved: Till Westmann, Matthias Brantner

10995. By Paul J. Lucas

QueryLoc clean-up:
1. Added all-argument constructor (needed for LLVM).
2. Removed pointless copy constructor since default is fine.
3. Removed pointless virtual destructor (there are no virtual functions!). Approved: Matthias Brantner, Paul J. Lucas

10996. By Nicolae Brinza

Dynamically computed strings can now be cast to xs:QName. Fixes bug #898792 Approved: Nicolae Brinza, Chris Hillery

10997. By Till Westmann

move appending of ${requiredlibs-store} to requiredlibs to a place where it works Approved: Ghislain Fourny, Till Westmann

10998. By Ghislain Fourny

Fixes a bug that makes Zorba crash upon inserting more than one pair. Approved: Till Westmann, Matthias Brantner

10999. By Ghislain Fourny

Adds a method isEncoded to user-typed atomic items. Approved: Till Westmann, Matthias Brantner

11000. By Sorin Marian Nasoi <email address hidden>

fix for lp:969251. Approved: Ghislain Fourny, Sorin Marian Nasoi

11001. By Ghislain Fourny

Made URI computation lazy in StructuralAnyUri. Approved: Markos Zaharioudakis, Matthias Brantner

11002. By Ghislain Fourny

Fixes a Windows compiler error (bug 1040558). Approved: Luis Rodriguez Gonzalez, Juan Zacarias

11003. By William Candillon

Enable XML output from doxygen by default. Approved: Chris Hillery, Matthias Brantner

11004. By Markos Zaharioudakis

Fixed bug #1038410 (Memory leaks in parser, trace iterator, and general index) Approved: Markos Zaharioudakis

11005. By Markos Zaharioudakis

Fixed bug #1042840 (qname pool free-list corruption) Approved: Markos Zaharioudakis

11006. By Chris Hillery

Restoring execute bit to a bunch of scripts. Approved: Juan Zacarias, Matthias Brantner, Chris Hillery

11007. By Carlos Manuel Lopez

New memory management for compiler expressions (fixes bug #1036111) Approved: Markos Zaharioudakis

11008. By Ghislain Fourny

Simplified JSON items class and fixed some Xml Node static casts to handle JSON items as well. Approved: Markos Zaharioudakis, Matthias Brantner

11009. By Markos Zaharioudakis

Fixed bug #866984 (better error message for an eval error) Approved: Markos Zaharioudakis

11010. By Ghislain Fourny

Fixing a memory leak in append update primitive. Approved: Matthias Brantner, Till Westmann

11011. By William Candillon

Remove deprecated reference to the old sourceforge mailing-list. Approved: Matthias Brantner, William Candillon

11012. By Nicolae Brinza

Fixes for bugs #1023170, #1024033, #1027270 Approved: Chris Hillery, Matthias Brantner

11013. By Markos Zaharioudakis

rchandle cleanup Approved: Markos Zaharioudakis

11014. By Paul J. Lucas

Replaced UUID with thin layer over native platform implementation. Approved: Chris Hillery, Rodolfo Ochoa, Matthias Brantner, Paul J. Lucas

11015. By Chris Hillery

Corrected HTML serialization of empty elements. Added test cases for XHTML.
 Approved: Matthias Brantner, Chris Hillery

11016. By Chris Hillery

Fixes debug mode crash because of missing dictionary entries. Approved: William Candillon, Chris Hillery

11017. By Ghislain Fourny

Fixed bug 1041411 (prefixed true/false/null should be interpreted as name tests). Approved: Matthias Brantner, Chris Hillery

11018. By Ghislain Fourny

Removing superfluous store/naive prefixes in store includes. Approved: Till Westmann, Matthias Brantner

11019. By Paul J. Lucas

Suppressed warnings; moved gcc diagnostic push macros to config.h. Approved: Matthias Brantner, Paul J. Lucas

11020. By Till Westmann

add dependency on libuuid

11021. By Till Westmann

ensure deterministic test results for keys of index on unordered collection by sorting

11022. By Till Westmann

Some fixes in TreeID API and some include cleanup.

11023. By Matthias Brantner

Adding missing JSONiq library functions.

11024. By Matthias Brantner

Updated JSONiq tutorial.

11025. By Matthias Brantner

implementation of parse-json#2 allowing multiple top-level items

11026. By Matthias Brantner

more tests for jn:parse-json

11027. By Matthias Brantner

adapted changelog regarding jn:parse-json

Unmerged revisions

11027. By Matthias Brantner

adapted changelog regarding jn:parse-json

11026. By Matthias Brantner

more tests for jn:parse-json

11025. By Matthias Brantner

implementation of parse-json#2 allowing multiple top-level items

11024. By Matthias Brantner

Updated JSONiq tutorial.

11023. By Matthias Brantner

Adding missing JSONiq library functions.

11022. By Till Westmann

Some fixes in TreeID API and some include cleanup.

11021. By Till Westmann

ensure deterministic test results for keys of index on unordered collection by sorting

11020. By Till Westmann

add dependency on libuuid

11019. By Paul J. Lucas

Suppressed warnings; moved gcc diagnostic push macros to config.h. Approved: Matthias Brantner, Paul J. Lucas

11018. By Ghislain Fourny

Removing superfluous store/naive prefixes in store includes. Approved: Till Westmann, Matthias Brantner

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeConfiguration.txt'
2--- CMakeConfiguration.txt 2011-09-16 19:55:59 +0000
3+++ CMakeConfiguration.txt 2012-03-23 17:30:28 +0000
4@@ -70,10 +70,6 @@
5 SET(ZORBA_FOR_ONE_THREAD_ONLY OFF CACHE BOOL "compile zorba for single threaded use")
6 MESSAGE(STATUS "ZORBA_FOR_ONE_THREAD_ONLY: " ${ZORBA_FOR_ONE_THREAD_ONLY})
7
8-# by default the zorba command line client is deactivated until it gets to a more stable and userfriendly state
9-SET(ZORBA_WITH_DEBUGGER_CLIENT OFF CACHE BOOL "build and install zorbas command line debugger client")
10-MESSAGE(STATUS "ZORBA_WITH_DEBUGGER_CLIENT: " ${ZORBA_WITH_DEBUGGER_CLIENT})
11-
12 IF (DEFINED UNIX)
13 IF (NOT DEFINED ZORBA_HAVE_PTHREAD_H AND NOT DEFINED ZORBA_FOR_ONE_THREAD_ONLY)
14 MESSAGE(FATAL_ERROR "pthread is not available")
15
16=== modified file 'CMakeLists.txt'
17--- CMakeLists.txt 2011-09-08 15:09:20 +0000
18+++ CMakeLists.txt 2012-03-23 17:30:28 +0000
19@@ -130,18 +130,17 @@
20 ################################################################################
21 # Various cmake macros
22
23-IF(WIN32)
24+SET (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake_modules ${CMAKE_MODULE_PATH})
25+IF (WIN32)
26 # On Windows we use proxy modules that try to guess first the location
27 # of the required third party libraries. This will search in order in:
28 # 1. the path pointed by ZORBA_THIRD_PARTY_REQUIREMENTS
29 # 2. the Program Files directory available on the users computer
30 # 3. the PATH environment variable
31 # The logic is implemented by the macros in the ProxyFindModule.cmake module.
32- LIST (APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake_modules/Windows")
33- INCLUDE(ProxyFindModule)
34-ENDIF(WIN32)
35-LIST (APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake_modules")
36-
37+ SET (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake_modules/Windows ${CMAKE_MODULE_PATH})
38+ INCLUDE (ProxyFindModule)
39+ENDIF (WIN32)
40
41 ################################################################################
42 # This section is used for batch script generation. Each executable
43@@ -238,11 +237,21 @@
44 MESSAGE(STATUS "Looking for LibXml2")
45 FIND_PACKAGE(LibXml2)
46 IF(LIBXML2_FOUND)
47- MESSAGE(STATUS "Found LIBXML2 library -- " ${LIBXML2_LIBRARIES})
48-
49- INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
50- SET(requiredlibs-store ${requiredlibs-store} ${LIBXML2_LIBRARIES})
51- SET(CXXFLAGS ${CXXFLAGS} ${LIBXML2_DEFINITONS})
52+ # Now check LibXml2's version
53+ FILE(STRINGS ${LIBXML2_INCLUDE_DIR}/libxml/xmlversion.h LIBXML2_VERSION_TMP REGEX
54+ "^#define[ \t]+LIBXML_DOTTED_VERSION[ \t]+\".*\"")
55+ STRING(REGEX REPLACE "^#define[ \t]+LIBXML_DOTTED_VERSION[ \t]+\"(.*)\"" "\\1"
56+ LIBXML2_VERSION ${LIBXML2_VERSION_TMP})
57+
58+ IF(LIBXML2_VERSION VERSION_EQUAL "2.7.0" OR LIBXML2_VERSION VERSION_GREATER "2.7.0")
59+ MESSAGE(STATUS "Found LIBXML2 library -- " ${LIBXML2_LIBRARIES})
60+ INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
61+ SET(requiredlibs-store ${requiredlibs-store} ${LIBXML2_LIBRARIES})
62+ SET(CXXFLAGS ${CXXFLAGS} ${LIBXML2_DEFINITONS})
63+ ELSE(LIBXML2_VERSION VERSION_EQUAL "2.7.0" OR LIBXML2_VERSION VERSION_GREATER "2.7.0")
64+ MESSAGE(FATAL_ERROR "The libxml2 library version 2.7.0 or higher is required in order to build Zorba.")
65+ ENDIF(LIBXML2_VERSION VERSION_EQUAL "2.7.0" OR LIBXML2_VERSION VERSION_GREATER "2.7.0")
66+
67 ELSE(LIBXML2_FOUND)
68 MESSAGE(FATAL_ERROR "The libxml2 library and headers are required in order to build simple store.")
69 ENDIF(LIBXML2_FOUND)
70@@ -418,13 +427,35 @@
71
72 # zorba versioning
73 SET(ZORBA_MAJOR_NUMBER "2")
74-SET(ZORBA_MINOR_NUMBER "0")
75-SET(ZORBA_PATCH_NUMBER "1")
76+SET(ZORBA_MINOR_NUMBER "2")
77+SET(ZORBA_PATCH_NUMBER "0")
78 SET(ZORBA_VERSION ${ZORBA_MAJOR_NUMBER}.${ZORBA_MINOR_NUMBER}.${ZORBA_PATCH_NUMBER})
79 MESSAGE(STATUS "Zorba version number: ${ZORBA_VERSION}")
80-SET(ZORBA_MODULES_INSTALL_DIR "share/zorba-${ZORBA_VERSION}/modules"
81- CACHE STRING "Path (relative to installdir) to modules" FORCE)
82-MARK_AS_ADVANCED(ZORBA_MODULES_INSTALL_DIR)
83+
84+SET(ZORBA_LIB_DIRNAME "lib" CACHE STRING
85+ "directory name for libs (may want to set to 'lib64' on 64-bit Linux platforms)")
86+
87+# Directories for modules and schemas. "Core" are those which are
88+# shipped with Zorba and must be present for correct Zorba
89+# functionality. "Non-core" are developed independently of Zorba and
90+# have different version lifecycles.
91+#
92+# URI dir is for things resolved by URI - specifically modules (.xq
93+# files) and schemas (.xsd files) - which are platform-
94+# independent. Lib dir is for platform-specific files, specifically
95+# shared libraries for module external functions.
96+SET(ZORBA_NONCORE_URI_DIR "share/zorba/uris"
97+ CACHE STRING "Path (relative to installdir) to non-core modules/schemas")
98+MARK_AS_ADVANCED(ZORBA_NONCORE_URI_DIR)
99+SET(ZORBA_CORE_URI_DIR "${ZORBA_NONCORE_URI_DIR}/core/${ZORBA_VERSION}"
100+ CACHE STRING "Path (relative to installdir) to core modules/schemas")
101+MARK_AS_ADVANCED(ZORBA_CORE_URI_DIR)
102+SET(ZORBA_NONCORE_LIB_DIR "${ZORBA_LIB_DIRNAME}/zorba"
103+ CACHE STRING "Path (relative to installdir) to non-core libraries")
104+MARK_AS_ADVANCED(ZORBA_NONCORE_LIB_DIR)
105+SET(ZORBA_CORE_LIB_DIR "${ZORBA_NONCORE_LIB_DIR}/core/${ZORBA_VERSION}"
106+ CACHE STRING "Path (relative to installdir) to core libraries")
107+MARK_AS_ADVANCED(ZORBA_CORE_LIB_DIR)
108
109 # add compiler variables
110 ADD_DEFINITIONS(${DEFINITIONS})
111@@ -461,7 +492,7 @@
112 SET(ZORBA_CMAKE_DIR "cmake" CACHE STRING
113 "Relative path to CMake files in Zorba installation")
114 ELSE (WIN32)
115- SET(ZORBA_CMAKE_DIR "share/zorba-${ZORBA_VERSION}/cmake" CACHE STRING
116+ SET(ZORBA_CMAKE_DIR "share/cmake/zorba-${ZORBA_VERSION}" CACHE STRING
117 "Relative path to CMake files in Zorba installation")
118 ENDIF (WIN32)
119
120@@ -477,14 +508,15 @@
121 # Subdirectory ordering: We need to include "test" before "config" so
122 # ZorbaConfig knows about testdriver. We need to include "config"
123 # before "modules" so external modules will be able to find
124-# ZorbaConfig.cmake.
125+# ZorbaConfig.cmake. We need to include "modules" before "include" so
126+# config.h can know eg. whether we found CURL.
127
128 ADD_SUBDIRECTORY(test)
129 ADD_SUBDIRECTORY(config)
130-ADD_SUBDIRECTORY(include)
131 ADD_SUBDIRECTORY(doc)
132 ADD_SUBDIRECTORY(schemas)
133 ADD_SUBDIRECTORY(modules)
134+ADD_SUBDIRECTORY(include)
135
136 ADD_DEFINITIONS(-Dzorba_EXPORTS)
137 ADD_SUBDIRECTORY(src)
138@@ -535,4 +567,4 @@
139 # This dependency is zorba-only related, which is why it's added here
140 # and not within zorba-modules, which is for general use in other
141 # non-zorba modules.
142-ADD_DEPENDENCIES(check_uris gen_diag_modules)
143+ADD_DEPENDENCIES(check_core_uris gen_diag_modules)
144
145=== modified file 'CPackSourceConfig.cmake.in'
146--- CPackSourceConfig.cmake.in 2009-10-30 16:24:51 +0000
147+++ CPackSourceConfig.cmake.in 2012-03-23 17:30:28 +0000
148@@ -19,7 +19,7 @@
149
150 SET(CPACK_CMAKE_GENERATOR "Unix Makefiles")
151 SET(CPACK_GENERATOR "TGZ;TZ")
152-SET(CPACK_IGNORE_FILES "test/coverity/;dist/;_CPack_Packages/;build/;build./;CVS/;/\\.svn/;\\.swp$;\\.#;/#")
153+SET(CPACK_IGNORE_FILES "test/coverity/;dist/;_CPack_Packages/;build/;build./;CVS/;/\\.svn/;\\.swp$;\\.#;/#;\\.bzr/")
154 SET(CPACK_INSTALLED_DIRECTORIES "@CMAKE_SOURCE_DIR@;/")
155 SET(CPACK_INSTALL_CMAKE_PROJECTS "")
156 SET(CPACK_MODULE_PATH "")
157
158=== modified file 'ChangeLog'
159--- ChangeLog 2011-10-05 22:39:18 +0000
160+++ ChangeLog 2012-03-23 17:30:28 +0000
161@@ -1,13 +1,108 @@
162 Zorba - The XQuery Processor
163
164-version 2.x
165-
166- * Custom Full-text thesaurus.
167- * Fixed bug #3401971 (node-by-reference on dynamic collections)
168+version 2.2
169+
170+New Features:
171+ * Add --compile-plan (-c) and --execute-plan (-e) options to zorba command line.
172+ * Add XQuery 3.0 concat operator (http://www.w3.org/TR/xquery-30/#id-string-concat-expr)
173+ * New URI module providing percent-decoding functions.
174+ * The core parse-xml module is now able to parse input files in a streaming mode. A number of new options have also been added.
175+ * LibXml2 version 2.7.0 or higher is now required in order to build Zorba.
176+ * Added index management function to the C++ api's StaticCollectionManager.
177+ * Added createDayTimeDuration, createYearMonthDuration, createDocumentNode, createCommentNode, createPiNode to api's ItemFactory.
178+ * Fixed bug #905050 (setting and getting the context item type via the c++ api).
179+ * Added split function to the string module that allows for streamable tokenization but doesn't have regular expression
180+ * Add new XQuery interface for the PHP bindings.
181+ * Added two API methods StaticContext::getFunctions to introspect the functions of a static context
182+ * Added API method Item::getNamespaceBindings().
183+ * Added a transcoding streambuffer to the API which allows transcoding arbitrary encodings
184+ from and to UTF-8
185+ * file:read-text is able to handle arbitrary encodings (fixes bug #867159)
186+ * http:send-request is able to handle arbitrary encodings
187+ * Added API method StaticContext::getNamespaceBindings() (see bug #905035)
188+ * New version of the JSON converter module in the core of Zorba (no external dependencies anymore)
189+ * Added truncate function to the collection modules for efficient deletion of all nodes in a collection.
190+
191+
192+Optimization:
193+ * No-copy optimization: avoids copying nodes during node-constructor expressions.
194+ * Added external function annotations %ann:propagates-input-nodes and
195+ %ann:must-copy-input-nodes to be used by the no-copy optimization.
196+ * Caching of results for recursive functions with atomic parameter and return types.
197+ * Added %ann:cache and %ann:no-cache to enable or disable caching of results of functions with atomic parameter and return types.
198+ * Types-related optimizations for runtime operators (comparisons, FnBoolean, Or, And,
199+ Compare, instance-of, cast, castable, treat, promote).
200+ * More efficient implementation for base64Binary items
201+ * Preallocate and reuse temp sequence iterator for LetVarITerator
202+ and CtxVarIterator.
203+ * Enhanced push-down of positional predicate into LetVarITerator
204+ and CtxVarIterator.
205+ * Change the implementation of the free-vars annotation and got rid
206+ of the annotations map in expressions.
207+
208+Bug Fixes/Other Changes:
209+ * Fixed bug 923015 (clone() not implemented for full-text expressions)
210+ * Fixed bug 917923 (bug in copying outer var values into the eval dynamic context)
211+ * Fixed bug 867509 (Can not handle largest xs:unsignedLong values)
212+ * Fixed bug 924063 (sentence is incorrectly incremented when token characters end without sentence terminator)
213+ * Fixed bug 909126 (bug in cloning of var_expr)
214+ * Fixed bug 928631 (external builtin function were not executed in the module they
215+ were declared)
216+ * Fixed bug in destruction of exit_catcher_expr
217+ * Fixed bug #867024 (error messages)
218+ * Fixed bug #957580 (stream read failure in StringToCodepointsIteartor)
219+ * Fixed bug #911585 (management of variables during eval)
220+ * Fixed bug #866423 (fn:empty and fn:exists iterators must reset their input in
221+ case of early-out)
222+ * Fixed bug #945241 (StaticCollectionManager::declaredIndexes() and temporary indexes)
223+ * Fixed bug #872288 (reset recursive flag during node rename)
224+ * Fixed bug #905041 (allow for the default element and function namespaces to be
225+ set multiple times via the c++ api).
226+ * Fixed bug #907872 (segfault when returning an input ItemSequence from an external function).
227+ * Fixed bug in codegen: do not create a materialize clause if one exists already
228+ support.
229+ * Fixed bug involving positional var and groupby
230+ * Fixed bug #867266 (do not hoist updating expressions)
231+ * Fixed bug #867022 (added location and params to some XPTY0004 errors)
232+ * zerr is not predeclared anymore to be http://www.zorba-xquery.com/errors
233+ * Fixed bug #917981 (disallow declaring same module twice).
234+ * Deprecated StaticContext:getNamespaceURIByPrefix()
235+ * Fixed bug #943788 (streamable string is not seekable)
236+ * Fixed bug #921624 (slow queries with bogus example.com schema URIs)
237+ * Fixed bug #918211 (xqueryx fulltext w3c conformance generation)
238+ * Fixed bug #918157 (Add XQFTTS to validation queue)
239+ * Fixed bug with unversioned modules with C++ external functions
240+ * Fixed bug #912579 (validate-in-place on non-root elements)
241+ * Fixed bug #891209 (validation with xsi:type returns untyped)
242+ * Fixed bug #952829 (Nondeterministic annotation doesn't seem to be checked)
243+ * Fixed bug #951772 (Comment node crashes serialization)
244+ * Fixed bug #945241 (StaticCollectionManager::declaredIndexes() and temporary indexes)
245+
246+version 2.1
247+
248+New Features:
249+ * New node-position module. This module allows to obtain a representation of a node position, which
250+ can be used to assess structural relationships with other nodes.
251+ * New node-reference module. References can be obtained for any node, and
252+ different nodes cannot have the same identifier.
253+ * Custom Full-text thesaurus using Zorba URI resolver mechanism.
254+ * Modified C++ API to add isSequential, getExternalVariables, isBoundContextItem and
255+ isBoundExternalVariable Functions
256+ * Collection allows to retrieve information about the type
257+ and the annotations of a static collection.
258+ * Implemented the probe-index-range-value for general indexes
259+ * Added ExternalFunctionParameter class to be registered in the DynamicContext
260+ * New module for compiling and executing XQueries from XQuery (xqxq)
261+ * External functions are allowed to be updating (i.e. return a pending update list)
262+
263+Optimization:
264 * Optimization for positioned sequence access (e.g. $x[$x[1]] where $x is a
265 sequence of integers)
266- * documentation improvements
267- * installer improvements
268+ * Optimization for count(collection()) expressions
269+ * Optimization of the fn:substring function in the case when its $start and $length arguments
270+ are integers
271+
272+Bug Fixes/Other Changes:
273 * Fixed bug #3403291 (build for Fedora 15)
274 * Fixed bug #3397293 (Incorrect XQueryX error message)
275 * Fixed bug #3398637 (Nested element constructors cause loss of namespace bindings)
276@@ -15,20 +110,19 @@
277 * Fixed bug #3404689 (assignment problem in flwor)
278 * Fix for bug #3404450 (testdriver_mt problem: caching and validation of docs)
279 * Fixed installation bug to not install the .so for test modules
280- * Fix for running ctest on Windows
281 * Fixed bug #3390410 (Adding a node to a collection causes out of bound in vector)
282 * Fixed bug #3406200 (node types were not being moved to new tree during node detach)
283 * Fixed bug #3406191 (Namespace bindings lost after update due to bug in node detach)
284 * Fixed bug #3290122 (ZDST0003 needs collection name)
285- * Collection allows to retrieve information about the type
286- and the annotations of a static collection.
287 * Fixed bug #3406272 (merging of adjacent text nodes must be done after all
288 updates have been applied).
289+ * Don't raise warnings for unknown annotations.
290 * Fixed bug #3409344 (during detach, if the node being detached is the root of
291 its tree, it should be detached from the tree as well; otherwise memory
292 corruption will occur)
293- * Fixed bug # (Should not destroy the parent of a node that is being detached
294- before the detach is done).
295+ * Fixed bug # (Should not destroy the parent of a node that is being detached
296+ before the detach is done).
297+ * Added const qualifier to StaticContext::getAuditEvent()
298 * Fixed bug #3408181 (available-collection() returns undeclared collections)
299 * Fixed bug #859465 (Fatal error if a PUL contains two deactivate IC primitives)
300 * Fixed bug #859467 (Fatal error if a PUL contains two activate Foreign Key primitives)
301@@ -36,11 +130,53 @@
302 * Fixed bug #859522 (Fatal error if a PUL contains two delete document primitives)
303 * Fixed bug #859968 (Using put on an attribute produces an invalid XDM instance and may cause segmentation faults)
304 * Fixed bug #855314 (should not fold a constant expr that returns an error item)
305- * Added ExternalFunctionParameter class to be registered in the DynamicContext
306+ * Fixed bug when parsing a document with a base-uri attribute.
307 * Fixed bug #863320 (Sentence is incorrectly incremented when token characters end without sentence terminator)
308 * Fixed bug #863730 (static delete-node* functions don't raise ZDDY0012)
309- * Implemented the probe-index-range-value for general indexes
310+ * Removed ZSTR0005 and ZSTR0006 error codes
311+ * Fixed bug #868258 (Assertion failure with two delete collection)
312+ * Fixed bug #871623 and #871629 (assertion failures with insertions in dynamic collections)
313+ * Fixed bug #867262 (allow reuse of iterator over ExtFuncArgItemSequence)
314+ * Fixed bug #869024 (segmentation fault with node-reference)
315+ * Fixed bug #869025 (segmentation fault with node-reference)
316+ * New node-reference module. References can be obtained for any node, and
317+ different nodes cannot have the same identifier.
318+ * Fixed bug #872697 (segmentation fault with validation of NMTOKENS)
319+ * Added undo for node revalidation
320+ * Optimization for count(collection()) expressions
321+ * Fixed bug #872796 (validate-in-place can interfere with other update primitives)
322+ * Fixed bug #872799 (validate-in-place can set incorrect types)
323+ * Fixed bug #855715 (Invalid escaped characters in regex not caught)
324+ * Fixed bug #868325 (fn:analyze-string fails with some recursive subgroups)
325+ * Fixed bug #872697 (segmentation fault with validation of NMTOKENS)
326+ * General index cannot be declared as unique if the type of its key is
327+ xs:anyAtomicType or xs:untypedAtomic.
328+ * Added undo for node revalidation
329+ * Optimization for count(collection()) expressions
330+ * Fixed bug #867133 (SWIG PHP build failure on Mac OSX)
331+ * Fixed bug #872796 (validate-in-place can interfere with other update primitives)
332+ * Fixed bug #872799 (validate-in-place can set incorrect types)
333+ * Fixed bug #872850 (Serialization of Tumbling Window For fails)
334+ * Fixed bug #855715 (Invalid escaped characters in regex not caught)
335+ * Fixed bug #862089 (Split binary/xq install directories for modules) by
336+ splitting "module path" into separate URI and Library paths
337+ * Fixed bug #872502 (validation of the JSON module xqdoc fails)
338+ * Fixed bug #897619 (testdriver_mt can not run the XQueryX tests)
339+ * Fixed bug #867107 (xqdoc dependency to zorba is wrong)
340+ * Fixed bug #897616 (Fix the generation of the XQFTTS report results for
341+ W3C)
342+
343+version 2.0.3
344 * Fixed bug #867662 ("nullptr" warning)
345+ * documentation improvements
346+
347+version 2.0.2
348+ * Fixed bug #3401971 (node-by-reference on dynamic collections)
349+ * documentation improvements
350+ * installer improvements
351+ * Fixed bug #3403291 (build for Fedora 15)
352+ * Don't install the .so for test modules
353+ * Fix for running ctest on Windows
354
355 version 2.0.1
356
357
358=== modified file 'NOTICE.txt'
359--- NOTICE.txt 2011-09-01 01:58:54 +0000
360+++ NOTICE.txt 2012-03-23 17:30:28 +0000
361@@ -1,5 +1,5 @@
362 -----------
363-Zorba 2.0.1
364+Zorba 2.2.0
365 -----------
366
367 (Note: This file is generated automatically from NOTICE.xml.
368
369=== modified file 'README.txt'
370--- README.txt 2011-10-05 07:54:00 +0000
371+++ README.txt 2012-03-23 17:30:28 +0000
372@@ -11,7 +11,7 @@
373 -------------
374
375 The documentation is included in the doc directory, as well as
376- on the website of the project at http://www.zorba-xquery.com/doc/zorba-latest/zorba/html/.
377+ on the website of the project at http://www.zorba-xquery.org/html/documentation
378
379 Build & Installation
380 --------------------
381@@ -45,4 +45,4 @@
382 https://bugs.launchpad.net/zorba.
383
384 o If you want to participate in actively developing Zorba or
385- support Zorba, please write a mail to: zorba-coders@lists.inf.ethz.ch.
386+ support Zorba, please write a mail to: zorba-dev@googlegroups.com
387
388=== modified file 'bin/CMakeLists.txt'
389--- bin/CMakeLists.txt 2011-08-05 02:21:55 +0000
390+++ bin/CMakeLists.txt 2012-03-23 17:30:28 +0000
391@@ -15,33 +15,38 @@
392 INCLUDE_DIRECTORIES(AFTER ${CMAKE_SOURCE_DIR}/src/)
393 INCLUDE_DIRECTORIES(AFTER ${CMAKE_CURRENT_SOURCE_DIR})
394
395-IF(ZORBA_WITH_DEBUGGER_CLIENT)
396- CONFIGURE_FILE (debug_client/event_handler_init.cpp.in debug_client/event_handler_init.cpp)
397-
398- SET(DEBUG_CLIENT_SRCS
399- debug_client/tuple.h
400- debug_client/main.cpp
401- debug_client/debug_command.h
402- debug_client/debug_command.cpp
403- debug_client/command_line_handler.h
404- debug_client/command_line_handler.cpp
405- debug_client/lock_free_queue.h
406- debug_client/event_handler.h
407- debug_client/event_handler.cpp
408- ${CMAKE_CURRENT_BINARY_DIR}/debug_client/event_handler_init.cpp
409+IF (ZORBA_WITH_DEBUGGER)
410+ IF (NOT WIN32)
411+ FIND_PACKAGE (Libedit)
412+ IF (LIBEDIT_FOUND)
413+ INCLUDE_DIRECTORIES (${LIBEDIT_INCLUDE_DIRS})
414+ SET (LIBEDIT_LIBS ${LIBEDIT_LIBRARIES})
415+ SET (ZORBA_HAVE_LIBEDIT_H ${LIBEDIT_FOUND})
416+ ENDIF (LIBEDIT_FOUND)
417+ ENDIF (NOT WIN32)
418+
419+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/debugger/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/debugger/config.h)
420+ MESSAGE(STATUS "configured ${CMAKE_CURRENT_SOURCE_DIR}/debugger/config.h.cmake --> ${CMAKE_CURRENT_BINARY_DIR}/debugger/config.h")
421+ INCLUDE_DIRECTORIES (BEFORE ${CMAKE_CURRENT_BINARY_DIR}/debugger)
422+
423+ SET (DEBUG_CLIENT_SRCS
424+ debugger/main.cpp
425+ debugger/xqdb_client.cpp
426+ debugger/process_listener.cpp
427+ debugger/command_prompt.cpp
428+ debugger/command_line_handler.cpp
429+ debugger/event_handler.cpp
430 )
431
432- CONFIGURE_FILE (debug_client/message-handler.xq message-handler.xq)
433-
434- ZORBA_GENERATE_EXE("debuggercmd" "${DEBUG_CLIENT_SRCS}" "" "debugger" "bin")
435-ENDIF(ZORBA_WITH_DEBUGGER_CLIENT)
436+ ZORBA_GENERATE_EXE ("xqdb" "${DEBUG_CLIENT_SRCS}" "${LIBEDIT_LIBS}" "xqdb" "bin")
437+ENDIF (ZORBA_WITH_DEBUGGER)
438
439 SET(SRCS
440 zorbacmd.cpp
441 zorbacmdproperties.cpp
442 error_printer.cpp
443 util.cpp
444- module_path.cpp
445+ path_util.cpp
446 )
447
448 INCLUDE("${CMAKE_SOURCE_DIR}/cmake_modules/ZorbaGenerateExe.cmake")
449@@ -84,3 +89,37 @@
450 # test the --option option to set an option in the static context
451 ZORBA_ADD_TEST(bin/zorba_option zorbacmd -q "${CMAKE_CURRENT_SOURCE_DIR}/test/option.xq" -f --option "{http://www.zorba-xquery.com}option=value")
452 ZORBA_SET_TEST_PROPERTY(bin/zorba_option PASS_REGULAR_EXPRESSION "value")
453+
454+# test the --uri-path, --lib-path, and --module-path args.
455+# Use the versioning tests as they utilize test modules already.
456+SET (_testdir
457+ "${CMAKE_CURRENT_SOURCE_DIR}/../test/rbkt/Queries/zorba/versioning")
458+SET (_uridir "${CMAKE_BINARY_DIR}/TEST_URI_PATH")
459+SET (_libdir "${CMAKE_BINARY_DIR}/TEST_LIB_PATH")
460+ZORBA_ADD_TEST(bin/zorba_uri_path_1 zorbacmd -f -q "${_testdir}/import1.xq"
461+ --uri-path "${_uridir}")
462+ZORBA_SET_TEST_PROPERTY(bin/zorba_uri_path_1
463+ PASS_REGULAR_EXPRESSION "hello, v2")
464+
465+ZORBA_ADD_TEST(bin/zorba_uri_path_2 zorbacmd -f -q "${_testdir}/external1.xq"
466+ --uri-path "${_uridir}")
467+ZORBA_SET_TEST_PROPERTY(bin/zorba_uri_path_2
468+ PASS_REGULAR_EXPRESSION "ZXQP0008")
469+
470+ZORBA_ADD_TEST(bin/zorba_uri_path_3 zorbacmd -f -q "${_testdir}/external1.xq"
471+ --uri-path "${_uridir}" --lib-path "${_libdir}")
472+ZORBA_SET_TEST_PROPERTY(bin/zorba_uri_path_3
473+ PASS_REGULAR_EXPRESSION "hello, v2")
474+
475+IF(WIN32)
476+ SET(PATH_SEP ";")
477+ELSE(WIN32)
478+ SET(PATH_SEP ":")
479+ENDIF(WIN32)
480+ZORBA_ADD_TEST(bin/zorba_module_path_1 zorbacmd -f -q "${_testdir}/external1.xq"
481+ --module-path "${_libdir}${PATH_SEP}${_uridir}")
482+ZORBA_SET_TEST_PROPERTY(bin/zorba_module_path_1
483+ PASS_REGULAR_EXPRESSION "hello, v2")
484+
485+# test compilation of the perf script
486+ZORBA_ADD_TEST(bin/zorba_compilechk4 zorbacmd -q "${CMAKE_CURRENT_SOURCE_DIR}/../test/zperf/src/start.xq" -f --compile-only)
487
488=== removed file 'bin/debug_client/debug_command.cpp'
489--- bin/debug_client/debug_command.cpp 2011-07-01 01:53:24 +0000
490+++ bin/debug_client/debug_command.cpp 1970-01-01 00:00:00 +0000
491@@ -1,99 +0,0 @@
492-/*
493- * Copyright 2006-2008 The FLWOR Foundation.
494- *
495- * Licensed under the Apache License, Version 2.0 (the "License");
496- * you may not use this file except in compliance with the License.
497- * You may obtain a copy of the License at
498- *
499- * http://www.apache.org/licenses/LICENSE-2.0
500- *
501- * Unless required by applicable law or agreed to in writing, software
502- * distributed under the License is distributed on an "AS IS" BASIS,
503- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
504- * See the License for the specific language governing permissions and
505- * limitations under the License.
506- */
507-#include <iostream>
508-#include "debug_client/debug_command.h"
509-
510-namespace zorba { namespace debugclient {
511-
512-
513- void CommandLine::execute()
514- {
515- for (;;) {
516- std::cout << "zdb>> ";
517- std::string command;
518- std::getline(std::cin, command);
519- std::vector<std::string> args;
520- args << command;
521- std::map<std::string, UntypedCommand*>::iterator lIter = theCommands.find(args[0]);
522- if (lIter == theCommands.end()) {
523- std::cout << args[0] << ": Command not found" << std::endl;
524- continue;
525- }
526- if (!lIter->second->execute(args))
527- continue;
528- return;
529- }
530- }
531-
532-
533- CommandLine::~CommandLine()
534- {
535- for (std::map<std::string, UntypedCommand*>::iterator i = theCommands.begin();
536- i != theCommands.end(); ++i)
537- {
538- delete i->second;
539- }
540- }
541-
542- CommandLine& CommandLine::operator<<(UntypedCommand *aCommand)
543- {
544- theCommands.insert(std::make_pair(aCommand->get_name(), aCommand));
545- return *this;
546- }
547-}}
548-
549-namespace std {
550- vector<string>& operator<< (vector<string>& vec, const string& str)
551- {
552- string::size_type before = 0;
553- string::size_type pos = str.find(" ", 0);
554- while (pos != str.npos) {
555- std::string lSub = str.substr(before, pos - before);
556- if (lSub[0] == '"') {
557- std::string::size_type lBeforeCopy = before;
558- do {
559- lBeforeCopy = str.find("\"", lBeforeCopy + 1);
560- } while (pos != str.npos && str.size() > pos + 1 && str[pos + 1] == '\\');
561- pos = lBeforeCopy;
562- lSub = str.substr(before + 1, pos - before - 1);
563- }
564- vec.push_back(lSub);
565- before = pos + 1;
566- pos = str.find(" ", before);
567- }
568- std::string lSub = str.substr(before);
569- if (lSub[0] == '"') {
570- pos = str.find("\"", before + 1);
571- lSub = str.substr(before + 1, pos - before - 1);
572- }
573- vec.push_back(lSub);
574- return vec;
575- }
576-
577- set<string>& operator<< (set<string>& vec, const string& str)
578- {
579- string::size_type before = 0;
580- string::size_type pos = str.find(" ", 0);
581- while (pos != str.npos) {
582- vec.insert(str.substr(before, pos));
583- before = pos + 1;
584- pos = str.find(" ", before);
585- }
586- vec.insert(str.substr(before));
587- return vec;
588- }
589-
590-}
591
592=== removed file 'bin/debug_client/event_handler_init.cpp.in'
593--- bin/debug_client/event_handler_init.cpp.in 2011-07-01 01:53:24 +0000
594+++ bin/debug_client/event_handler_init.cpp.in 1970-01-01 00:00:00 +0000
595@@ -1,41 +0,0 @@
596-/*
597- * Copyright 2006-2008 The FLWOR Foundation.
598- *
599- * Licensed under the Apache License, Version 2.0 (the "License");
600- * you may not use this file except in compliance with the License.
601- * You may obtain a copy of the License at
602- *
603- * http://www.apache.org/licenses/LICENSE-2.0
604- *
605- * Unless required by applicable law or agreed to in writing, software
606- * distributed under the License is distributed on an "AS IS" BASIS,
607- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
608- * See the License for the specific language governing permissions and
609- * limitations under the License.
610- */
611-#include <fstream>
612-#include "debug_client/event_handler.h"
613-
614-namespace zorba { namespace debugclient {
615-
616- std::istream* EventHandler::getCurrentDirectory() {
617- const char* build_dir = "@CMAKE_BINARY_DIR@/bin/message-handler.xq";
618- const char* install_dir =
619-#ifndef WIN32
620- "@CMAKE_INSTALL_PREFIX@/bin/";
621-#else
622- "C:/Program Files/Zorba XQuery Processor @ZORBA_MAJOR_NUMBER@.@ZORBA_MINOR_NUMBER@.@ZORBA_PATCH_NUMBER@/bin/";
623-#endif
624- std::auto_ptr<std::ifstream> stream(new std::ifstream(build_dir));
625- if (stream->good()) {
626- return stream.release();
627- }
628- stream.reset(new std::ifstream(install_dir));
629- if (stream->good()) {
630- return stream.release();
631- }
632- return 0;
633- }
634-
635-}} // end of namespace zorba::debugclient
636-
637
638=== removed file 'bin/debug_client/lock_free_queue.cpp'
639--- bin/debug_client/lock_free_queue.cpp 2011-07-01 01:53:24 +0000
640+++ bin/debug_client/lock_free_queue.cpp 1970-01-01 00:00:00 +0000
641@@ -1,16 +0,0 @@
642-/*
643- * Copyright 2006-2008 The FLWOR Foundation.
644- *
645- * Licensed under the Apache License, Version 2.0 (the "License");
646- * you may not use this file except in compliance with the License.
647- * You may obtain a copy of the License at
648- *
649- * http://www.apache.org/licenses/LICENSE-2.0
650- *
651- * Unless required by applicable law or agreed to in writing, software
652- * distributed under the License is distributed on an "AS IS" BASIS,
653- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
654- * See the License for the specific language governing permissions and
655- * limitations under the License.
656- */
657-#include "lock_free_queue.h"
658
659=== removed file 'bin/debug_client/message-handler.xq'
660--- bin/debug_client/message-handler.xq 2011-08-26 23:36:24 +0000
661+++ bin/debug_client/message-handler.xq 1970-01-01 00:00:00 +0000
662@@ -1,165 +0,0 @@
663-(:
664- : Copyright 2006-2009 The FLWOR Foundation.
665- :
666- : Licensed under the Apache License, Version 2.0 (the "License");
667- : you may not use this file except in compliance with the License.
668- : You may obtain a copy of the License at
669- :
670- : http://www.apache.org/licenses/LICENSE-2.0
671- :
672- : Unless required by applicable law or agreed to in writing, software
673- : distributed under the License is distributed on an "AS IS" BASIS,
674- : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
675- : See the License for the specific language governing permissions and
676- : limitations under the License.
677-:)
678-
679-import module namespace refl = 'http://www.zorba-xquery.com/modules/reflection';
680-import module namespace sctx = "http://www.zorba-xquery.com/modules/introspection/sctx";
681-import module namespace base64 = "http://www.zorba-xquery.com/modules/converters/base64";
682-
683-
684-declare variable $local:localns as xs:string := 'http://www.w3.org/2005/xquery-local-functions';
685-
686-
687-declare variable $local:endl as xs:string := '
688-';
689-
690-declare function local:has-to-stop($resp as element())
691-{
692- fn:not(($resp/@command/data(.) eq "stop" and $resp/@reason/data(.) eq "ok")
693- or ($resp/@status/data(.) eq "stopped")
694- or ($resp/@status/data(.) eq "stopping"))
695-};
696-
697-declare function local:status($resp as element())
698-{
699- fn:concat(
700- "Status: ", $resp/@status/data(.), $local:endl,
701- "Reason: ", $resp/@reason/data(.), $local:endl,
702- let $msg := $resp/text()
703- return
704- if (fn:empty($msg) or $msg eq "") then
705- ""
706- else
707- fn:concat($msg, $local:endl)
708- )
709-};
710-
711-
712-declare function local:run($resp as element()) {
713- if ($resp/@status/data(.) eq "starting") then
714- "Starting query"
715- else
716- local:status($resp)
717-};
718-
719-declare function local:stop($resp as element())
720-{
721- local:status($resp)
722-};
723-
724-declare function local:breakpoint_set($resp as element())
725-{
726- if ($resp/error) then
727- fn:concat("Error when setting a breakpoint: ", if ($resp/error/message) then $resp/error/message/text() else concat(" errcode: ", data($resp/error/@code)))
728- else
729- fn:concat("set breakpoint with id ", data($resp/@id), " and state ", data($resp/@state))
730-};
731-
732-declare function local:breakpoint_list($resp as element())
733-{
734- string-join(
735- for $b in $resp/breakpoint
736- return concat("Breakpoint ", data($b/@id), " at ", data($b/@filename), ":", data($b/@lineno), " ", data($b/@state)),
737- $local:endl
738- )
739-};
740-
741-declare function local:breakpoint_remove($resp as element())
742-{
743- "Breakpoint removed"
744-};
745-
746-declare function local:stack_depth($resp as element())
747-{
748- concat("Depth: ", data($resp/@depth))
749-};
750-
751-declare function local:stack_get($resp as element())
752-{
753- string-join(
754- for $s in $resp/stack
755- return concat("Level ", data($s/@level), " at ", data($s/@filename), ":", data($s/@lineno)),
756- $local:endl
757- )
758-};
759-
760-
761-declare function local:context_names($resp as element())
762-{
763- string-join(
764- for $c in $resp/context
765- return concat("Context: ", data($c/@name), " id: ", data($c/@id)),
766- $local:endl
767- )
768-};
769-
770-declare function local:context_get($resp as element())
771-{
772- string-join(
773- for $p in $resp/property
774- return concat(data($p/@fullname), ": [", data($p/@type), "]",
775- if ($p/text() ne "") then concat(": ", base64:decode($p/text())) else ""),
776- $local:endl
777- )
778-};
779-
780-declare function local:eval($resp as element())
781-{
782- if (data($resp/@success) eq "1") then
783- local:context_get($resp)
784- else
785- concat("Eval failed", ":", $resp/error/message/text())
786-};
787-
788-declare function local:process-response($resp as element())
789-{
790- if (data($resp/@command) eq "") then
791- (fn:true(), $resp/@transaction_id/data(.), local:status($resp))
792- else
793- let $fun-cont-name := fn:QName($local:localns, concat("local:", $resp/@command/data(.), "-cont"))
794- let $fun-msg-name := fn:QName($local:localns, concat("local:", $resp/@command/data(.)))
795- return (
796- if (sctx:function-arguments-count($fun-cont-name) = 1) then
797- refl:invoke($fun-cont-name, $resp)
798- else
799- local:has-to-stop($resp),
800- $resp/@transaction_id/data(.),
801- if (sctx:function-arguments-count($fun-msg-name) = 1) then
802- refl:invoke($fun-msg-name, $resp)
803- else
804- "Recieved a message - command not implemented"
805- )
806-};
807-
808-declare function local:process-init($init as element())
809-{
810- fn:true(),
811- 0,
812- fn:concat(fn:string-join(
813- ('Established connection with', $init/@language/data(.), 'client', $init/@appid/data(.)), ' '), '
814-')
815-};
816-
817-declare function local:main($response as element()) {
818- let $process-fun as xs:QName := fn:QName($local:localns, concat("local:process-", node-name($response)))
819- return
820- if (sctx:function-arguments-count($process-fun) = 1) then
821- refl:invoke($process-fun, $response)
822- else (
823- true(),
824- ($response/@transaction_id, 0)[1]/data(.),
825- "ERROR: Recieved unknown node from client"
826- )
827-};
828
829=== renamed directory 'bin/debug_client' => 'bin/debugger'
830=== renamed file 'bin/debug_client/debug_command.h' => 'bin/debugger/command.h'
831--- bin/debug_client/debug_command.h 2011-07-04 08:05:46 +0000
832+++ bin/debugger/command.h 2012-03-23 17:30:28 +0000
833@@ -14,7 +14,9 @@
834 * limitations under the License.
835 */
836 #pragma once
837-#include <zorba/config.h>
838+#ifndef ZORBA_DEBUGGER_COMMAND_H
839+#define ZORBA_DEBUGGER_COMMAND_H
840+
841 #include <string>
842 #include <vector>
843 #include <iostream>
844@@ -23,151 +25,18 @@
845 #include <sstream>
846 #include <memory>
847 #include <typeinfo>
848-#include "debug_client/tuple.h"
849-
850-namespace zorba { namespace debugclient {
851+
852+#include <zorba/config.h>
853+
854+#include "command_arg.h"
855+#include "tuple.h"
856+
857+
858+namespace zorba { namespace debugger {
859
860 class DebugClientParseException : public std::exception {
861 };
862
863- template<typename Tuple>
864- class CommandArg;
865-
866- template<typename Tuple>
867- class CommandArgInstance {
868- public:
869- virtual int get_index() const = 0;
870- virtual const CommandArg<Tuple>* get_arg() const = 0;
871- virtual void insertValue(Tuple& t) = 0;
872- virtual bool isSet(Tuple& t) const = 0;
873- };
874-
875- template<typename T, int Idx, typename Tuple>
876- class TypedCommandArgInstance : public CommandArgInstance<Tuple>
877- {
878- public:
879- TypedCommandArgInstance(T aValue, const CommandArg<Tuple>* aArg)
880- : theValue(aValue), theArg(aArg) {}
881- virtual int get_index() const { return Idx; }
882- virtual const CommandArg<Tuple>* get_arg() const { return theArg; }
883- virtual void insertValue(Tuple& t)
884- {
885- ZORBA_TR1_NS::get<Idx>(t).first = true;
886- ZORBA_TR1_NS::get<Idx>(t).second = theValue;
887- }
888- virtual bool isSet(Tuple& t) const
889- {
890- return ZORBA_TR1_NS::get<Idx>(t).first;
891- }
892- private:
893- T theValue;
894- const CommandArg<Tuple>* theArg;
895- };
896-
897- template<typename Tuple>
898- class CommandArgType {
899- public:
900- virtual CommandArgInstance<Tuple>* parse(const std::string& str,
901- const CommandArg<Tuple>* arg) = 0;
902- virtual bool isVoid() const = 0;
903- virtual bool isSet(Tuple& t) const = 0;
904- virtual ~CommandArgType() {}
905- };
906-
907- template<typename T, int Idx, typename Tuple>
908- class TypedCommandArgType : public CommandArgType<Tuple> {
909- public:
910- typedef T Type;
911- public: // implementation
912- TypedCommandArgType(bool aIsVoid) : theIsVoid(aIsVoid) {}
913- TypedCommandArgType(const T& aValue,
914- bool aIsVoid)
915- : theDefault(aValue), theIsVoid(aIsVoid) {}
916- virtual CommandArgInstance<Tuple>* parse(const std::string& str,
917- const CommandArg<Tuple>* arg)
918- {
919- T aValue;
920- std::stringstream stream(str);
921- stream >> aValue;
922- if (stream.fail()) {
923- std::cerr << "Could not parse argument of type "
924- << typeid(T).name()
925- << std::endl;
926- return 0;
927- }
928- return new TypedCommandArgInstance<T, Idx, Tuple>(aValue, arg);
929- }
930- virtual bool isVoid() const { return theIsVoid; }
931- virtual bool isSet(Tuple& t) const
932- {
933- return ZORBA_TR1_NS::get<Idx>(t).first;
934- }
935- private:
936- TypedCommandArgType<T, Idx, Tuple>() {}
937- T theDefault;
938- bool theIsVoid;
939- };
940-
941- template<typename Tuple>
942- class CommandArg {
943- public:
944- CommandArg(unsigned aId,
945- CommandArgType<Tuple>* aType,
946- const std::set<std::string>& aFlags,
947- const std::string& aDescription,
948- bool aIsRequired)
949- : theId(aId),
950- theType(aType),
951- theFlags(aFlags),
952- theDescription(aDescription),
953- theIsRequired(aIsRequired)
954- {
955- }
956- ~CommandArg() { delete theType; }
957- unsigned get_id() const { return theId; }
958- bool canHandle(const std::string& arg) const
959- {
960- if (theFlags.find(arg) != theFlags.end()) {
961- return true;
962- }
963- return false;
964- }
965- CommandArgInstance<Tuple>* parse(const std::string& str) const
966- {
967- return theType->parse(str, this);
968- }
969- bool isVoid() const {
970- return theType->isVoid();
971- }
972- bool isRequired() const { return theIsRequired; }
973- std::string get_name() const {
974- return *(theFlags.begin());
975- }
976- bool isSet(Tuple& t) const
977- {
978- return theType->isSet(t);
979- }
980- private:
981- unsigned theId;
982- CommandArgType<Tuple>* theType;
983- std::set<std::string> theFlags;
984- std::string theDescription;
985- bool theIsRequired;
986- };
987-}} // end namespace zorba
988-
989-namespace std {
990-
991- /**
992- * This is a helper split function
993- */
994- vector<string>& operator<< (vector<string>& vec, const string& str);
995-
996- set<string>& operator<< (set<string>& vec, const string& str);
997-} //end namespace std
998-
999-namespace zorba { namespace debugclient {
1000-
1001 template<typename Func, typename Tuple, int CommandIdx>
1002 class CommandInstance
1003 {
1004@@ -188,8 +57,10 @@
1005
1006 class UntypedCommand {
1007 public:
1008- virtual std::string get_name() const = 0;
1009- virtual std::string get_description() const = 0;
1010+ virtual std::string getName() const = 0;
1011+ virtual std::set<std::string> getAliases() const = 0;
1012+ virtual std::string getDescription() const = 0;
1013+ virtual void printHelp() const = 0;
1014 virtual bool execute(const std::vector<std::string>& args) = 0;
1015 };
1016
1017@@ -197,77 +68,141 @@
1018 class Command : public UntypedCommand {
1019 public:
1020 Command(const std::string& aName, Func& aFunction, const std::string& aDescription)
1021- : theName(aName), theFunction(aFunction), theDescription(aDescription) {}
1022+ : theName(aName), theFunction(aFunction), theDescription(aDescription)
1023+ {}
1024+
1025+ Command(const std::string& aName, const std::set<std::string> aAliases, Func& aFunction, const std::string& aDescription)
1026+ : theName(aName), theAliases(aAliases), theFunction(aFunction), theDescription(aDescription)
1027+ {}
1028+
1029 ~Command();
1030+
1031 public:
1032- Command& operator() (unsigned aId,
1033- const std::string& aFlags,
1034- CommandArgType<Tuple>* aType,
1035- const std::string& aDescription = "",
1036- bool isRequired = false);
1037- virtual std::string get_name() const { return theName; }
1038- virtual std::string get_description() const { return theDescription; }
1039+
1040+ void
1041+ addArgument(
1042+ unsigned aId,
1043+ const std::string& aFlags,
1044+ CommandArgType<Tuple>* aType,
1045+ const std::string& aDescription = "",
1046+ bool isRequired = false);
1047+
1048+ static void
1049+ splitNames(
1050+ const std::string& names,
1051+ std::set<std::string>& set);
1052+
1053+ virtual std::string
1054+ getName() const
1055+ {
1056+ return theName;
1057+ }
1058+
1059+ virtual std::set<std::string> getAliases() const
1060+ {
1061+ return theAliases;
1062+ }
1063+
1064+ virtual std::string
1065+ getDescription() const
1066+ {
1067+ return theDescription;
1068+ }
1069+
1070+ virtual void
1071+ printHelp() const;
1072+
1073 virtual bool execute(const std::vector<std::string>& args)
1074 {
1075 CommandInstance<Func, Tuple, CommandIdx> instance(theFunction, theTuple);
1076- if (instance.parseArguments(args, theArgs))
1077+ if (instance.parseArguments(args, theArgs)) {
1078 instance.execute();
1079- else
1080- return false;
1081- return true;
1082+ return true;
1083+ }
1084+ return false;
1085 }
1086 private:
1087 std::string theName;
1088+ std::set<std::string> theAliases;
1089 Func& theFunction;
1090 Tuple theTuple;
1091 std::string theDescription;
1092- std::map<std::string, CommandArg<Tuple>* > theArgs;
1093- };
1094-
1095- class CommandLine {
1096- public:
1097- ~CommandLine();
1098- public:
1099- void execute();
1100- CommandLine& operator<< (UntypedCommand* aCommand);
1101- private:
1102- std::map<std::string, UntypedCommand*> theCommands;
1103- };
1104-
1105- template<typename Func, typename Tuple, int CommandIdx>
1106- Command<Func, Tuple, CommandIdx>::~Command()
1107- {
1108- typedef std::map<std::string, CommandArg<Tuple>* > ArgType;
1109- for (typename ArgType::iterator i = theArgs.begin(); i != theArgs.end(); ++i) {
1110- delete i->second;
1111- }
1112- }
1113-
1114-
1115- template<typename Func, typename Tuple, int CommandIdx>
1116- Command<Func, Tuple, CommandIdx>&
1117- Command<Func, Tuple, CommandIdx>::operator() (unsigned aId,
1118- const std::string& aFlags,
1119- CommandArgType<Tuple>* aType,
1120- const std::string& aDescription,
1121- bool isRequired)
1122- {
1123- std::set<std::string> args;
1124- args << aFlags;
1125- for (std::set<std::string>::iterator i = args.begin(); i != args.end(); ++i) {
1126- std::string toAdd = (i->size() == 1) ? "-" + *i : "--" + *i;
1127- theArgs.insert(std::make_pair(toAdd,
1128- new CommandArg<Tuple>(aId,
1129- aType,
1130- args,
1131- aDescription,
1132- isRequired)
1133- )
1134- );
1135- }
1136- return *this;
1137- }
1138-
1139+ std::map<std::string, CommandArg<Tuple>*> theArgs;
1140+ };
1141+
1142+/*****************************************************************************/
1143+/*****************************************************************************/
1144+
1145+template<typename Func, typename Tuple, int CommandIdx>
1146+Command<Func, Tuple, CommandIdx>::~Command()
1147+{
1148+ typedef std::map<std::string, CommandArg<Tuple>*> ArgType;
1149+ for (typename ArgType::iterator i = theArgs.begin(); i != theArgs.end(); ++i) {
1150+ delete i->second;
1151+ }
1152+}
1153+
1154+template<typename Func, typename Tuple, int CommandIdx>
1155+void
1156+Command<Func, Tuple, CommandIdx>::printHelp() const
1157+{
1158+ std::cout << "Purpose: " << getDescription() << std::endl;
1159+
1160+ typename std::map<std::string, CommandArg<Tuple>*>::const_iterator lIter = theArgs.begin();
1161+ if (lIter == theArgs.end()) {
1162+ std::cout << "This command has no arguments." << std::endl;
1163+ std::cout << std::endl;
1164+ return;
1165+ }
1166+
1167+ std::cout << "Arguments:" << std::endl << std::endl;
1168+ for (; lIter != theArgs.end(); ++lIter) {
1169+ std::cout << " " << lIter->first << "\t" << lIter->second->getDescription() << std::endl;
1170+ }
1171+ std::cout << std::endl;
1172+}
1173+
1174+template<typename Func, typename Tuple, int CommandIdx>
1175+void
1176+Command<Func, Tuple, CommandIdx>::splitNames(const std::string& aNames, std::set<std::string>& aSet)
1177+{
1178+ std::string::size_type before = 0;
1179+ std::string::size_type pos = aNames.find(" ", 0);
1180+ while (pos != aNames.npos) {
1181+ std::string lName = aNames.substr(before, pos);
1182+ if (lName != "") {
1183+ aSet.insert(lName);
1184+ }
1185+ before = pos + 1;
1186+ pos = aNames.find(" ", before);
1187+ }
1188+ std::string lName = aNames.substr(before);
1189+ if (lName != "") {
1190+ aSet.insert(lName);
1191+ }
1192+}
1193+
1194+template<typename Func, typename Tuple, int CommandIdx>
1195+void
1196+Command<Func, Tuple, CommandIdx>::addArgument(
1197+ unsigned aId,
1198+ const std::string& aFlags,
1199+ CommandArgType<Tuple>* aType,
1200+ const std::string& aDescription,
1201+ bool isRequired)
1202+{
1203+ std::set<std::string> lNames;
1204+ splitNames(aFlags, lNames);
1205+
1206+ for (std::set<std::string>::iterator i = lNames.begin(); i != lNames.end(); ++i) {
1207+ std::string toAdd = (i->size() == 1) ? "-" + *i : "--" + *i;
1208+ CommandArg<Tuple>* lArg = new CommandArg<Tuple>(aId, aType, lNames, aDescription, isRequired);
1209+ theArgs.insert(std::make_pair(toAdd, lArg));
1210+ }
1211+}
1212+
1213+/*****************************************************************************/
1214+
1215 template<typename Tuple, typename T, int Idx>
1216 CommandArgType<Tuple>* createArgType(Tuple t)
1217 {
1218@@ -290,6 +225,16 @@
1219 return new Command<Func, Tuple, CommandIdx>(aName, aFunction, aDescription);
1220 }
1221
1222+ template<int CommandIdx, typename Tuple, typename Func>
1223+ Command<Func, Tuple, CommandIdx>* createCommand(Tuple t,
1224+ const std::string& aName,
1225+ const std::set<std::string>& aAliases,
1226+ Func& aFunction,
1227+ const std::string& aDescription)
1228+ {
1229+ return new Command<Func, Tuple, CommandIdx>(aName, aAliases, aFunction, aDescription);
1230+ }
1231+
1232 template<typename Func, typename Tuple, int CommandIdx>
1233 bool CommandInstance<Func, Tuple, CommandIdx>::
1234 parseArguments(const std::vector<std::string>& args,
1235@@ -301,29 +246,34 @@
1236 for (ArgType::size_type i = 1; i < size; ++i) {
1237 typename CArgType::const_iterator pos = aCommandArgs.find(args[i]);
1238 if (pos == aCommandArgs.end()) {
1239- std::cerr << "Error: Unknown Argument " << args[i] << std::endl;
1240+ std::cerr << "Error: Unknown option " << args[i] << std::endl;
1241 parseError = true;
1242 return false;
1243 }
1244 const CommandArg<Tuple>& arg = *(pos->second);
1245- if (!arg.isVoid() && args[++i][0] == '-') {
1246- std::cerr << "Did not expect parameter for option " << args[i] << std::endl;
1247- return false;
1248- }
1249 std::auto_ptr<CommandArgInstance<Tuple> > instance;
1250 if (arg.isVoid()) {
1251 instance.reset(arg.parse("1"));
1252 } else {
1253+ ++i;
1254+ if (i >= size) {
1255+ std::cerr << "Error: Missing value for argument " << args[i - 1] << std::endl;
1256+ parseError = true;
1257+ allSet = false;
1258+ return false;
1259+ }
1260 instance.reset(arg.parse(args[i]));
1261 }
1262- instance->insertValue(theTuple);
1263+ if (instance.get()) {
1264+ instance->insertValue(theTuple);
1265+ }
1266 }
1267 bool allSet = true;
1268 for (typename CArgType::const_iterator i = aCommandArgs.begin();
1269 i != aCommandArgs.end(); ++i)
1270 {
1271 if (i->second->isRequired() && !i->second->isSet(theTuple)) {
1272- std::cerr << "Error: Argument " << i->second->get_name() << " not set" << std::endl;
1273+ std::cerr << "Error: Argument -" << i->second->getName() << " not set" << std::endl;
1274 allSet = false;
1275 }
1276 }
1277@@ -336,4 +286,7 @@
1278 theFunction.template handle<CommandIdx>(this->theTuple);
1279 }
1280
1281-}} // end of namespace zorba::debugclient
1282+} // namespace zorba
1283+} // namespace debugger
1284+
1285+#endif // ZORBA_DEBUGGER_COMMAND_H
1286
1287=== added file 'bin/debugger/command_arg.h'
1288--- bin/debugger/command_arg.h 1970-01-01 00:00:00 +0000
1289+++ bin/debugger/command_arg.h 2012-03-23 17:30:28 +0000
1290@@ -0,0 +1,237 @@
1291+/*
1292+ * Copyright 2006-2008 The FLWOR Foundation.
1293+ *
1294+ * Licensed under the Apache License, Version 2.0 (the "License");
1295+ * you may not use this file except in compliance with the License.
1296+ * You may obtain a copy of the License at
1297+ *
1298+ * http://www.apache.org/licenses/LICENSE-2.0
1299+ *
1300+ * Unless required by applicable law or agreed to in writing, software
1301+ * distributed under the License is distributed on an "AS IS" BASIS,
1302+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1303+ * See the License for the specific language governing permissions and
1304+ * limitations under the License.
1305+ */
1306+#pragma once
1307+#ifndef ZORBA_DEBUGGER_COMMAND_ARG_H
1308+#define ZORBA_DEBUGGER_COMMAND_ARG_H
1309+
1310+#include <string>
1311+#include <iostream>
1312+#include <set>
1313+#include <sstream>
1314+
1315+#include "tuple.h"
1316+
1317+
1318+namespace zorba { namespace debugger {
1319+
1320+template<typename Tuple>
1321+class CommandArg;
1322+
1323+template<typename Tuple>
1324+class CommandArgInstance {
1325+ public:
1326+ virtual int get_index() const = 0;
1327+ virtual const CommandArg<Tuple>* get_arg() const = 0;
1328+ virtual void insertValue(Tuple& t) = 0;
1329+ virtual bool isSet(Tuple& t) const = 0;
1330+};
1331+
1332+template<typename T, int Idx, typename Tuple>
1333+class TypedCommandArgInstance : public CommandArgInstance<Tuple>
1334+{
1335+ public:
1336+ TypedCommandArgInstance(T aValue, const CommandArg<Tuple>* aArg)
1337+ : theValue(aValue), theArg(aArg)
1338+ {
1339+ }
1340+
1341+ virtual int
1342+ get_index() const
1343+ {
1344+ return Idx;
1345+ }
1346+
1347+ virtual const CommandArg<Tuple>*
1348+ get_arg() const
1349+ {
1350+ return theArg;
1351+ }
1352+
1353+ virtual void
1354+ insertValue(Tuple& t)
1355+ {
1356+ ZORBA_TR1_NS::get<Idx>(t).first = true;
1357+ ZORBA_TR1_NS::get<Idx>(t).second = theValue;
1358+ }
1359+
1360+ virtual bool isSet(Tuple& t) const
1361+ {
1362+ return ZORBA_TR1_NS::get<Idx>(t).first;
1363+ }
1364+
1365+ private:
1366+
1367+ T theValue;
1368+ const CommandArg<Tuple>* theArg;
1369+};
1370+
1371+template<typename Tuple>
1372+class CommandArgType
1373+{
1374+ public:
1375+ virtual CommandArgInstance<Tuple>*
1376+ parse(
1377+ const std::string& str,
1378+ const CommandArg<Tuple>* arg) = 0;
1379+
1380+ virtual bool
1381+ isVoid() const = 0;
1382+
1383+ virtual bool
1384+ isSet(Tuple& t) const = 0;
1385+
1386+ virtual ~CommandArgType() {}
1387+};
1388+
1389+ template<typename T, int Idx, typename Tuple>
1390+ class TypedCommandArgType : public CommandArgType<Tuple> {
1391+ public:
1392+ typedef T Type;
1393+ public: // implementation
1394+ TypedCommandArgType(bool aIsVoid) : theIsVoid(aIsVoid) {}
1395+ TypedCommandArgType(const T& aValue,
1396+ bool aIsVoid)
1397+ : theDefault(aValue), theIsVoid(aIsVoid) {}
1398+ virtual CommandArgInstance<Tuple>* parse(const std::string& str,
1399+ const CommandArg<Tuple>* arg)
1400+ {
1401+ T aValue;
1402+
1403+ // special treatment for strings
1404+ // this is a double hack:
1405+ // - we check the type name if this starts with: class std::basic_string
1406+ // - we use void* in readEntireString to workaround the template type T
1407+ // which would otherwise complain during compilation if types and
1408+ // operators do not match
1409+ // TOSO: probably someone can find a more elegant solution
1410+ std::string lTypeName(typeid(T).name());
1411+ if (lTypeName.find("class std::basic_string") == 0) {
1412+ readEntireString(str, &aValue);
1413+ } else {
1414+ std::stringstream stream(str);
1415+ std::stringstream out;
1416+ stream >> aValue;
1417+ if (stream.fail()) {
1418+ std::cerr << "Error: Could not parse value \"" << str << "\" as type "
1419+ << typeid(T).name()
1420+ << std::endl;
1421+ return 0;
1422+ }
1423+ }
1424+
1425+ return new TypedCommandArgInstance<T, Idx, Tuple>(aValue, arg);
1426+ }
1427+ virtual bool isVoid() const { return theIsVoid; }
1428+ virtual bool isSet(Tuple& t) const
1429+ {
1430+ return ZORBA_TR1_NS::get<Idx>(t).first;
1431+ }
1432+ private:
1433+ void readEntireString(std::string aIn, void* aValue)
1434+ {
1435+ *((std::string*)aValue) = aIn;
1436+ }
1437+
1438+ TypedCommandArgType<T, Idx, Tuple>() {}
1439+ T theDefault;
1440+ bool theIsVoid;
1441+ };
1442+
1443+ template<typename Tuple>
1444+ class CommandArg {
1445+ public:
1446+ CommandArg(unsigned aId,
1447+ CommandArgType<Tuple>* aType,
1448+ const std::set<std::string>& aNames,
1449+ const std::string& aDescription,
1450+ bool aIsRequired)
1451+ : theId(aId),
1452+ theType(aType),
1453+ theNames(aNames),
1454+ theDescription(aDescription),
1455+ theIsRequired(aIsRequired)
1456+ {
1457+ }
1458+
1459+ ~CommandArg()
1460+ {
1461+ delete theType;
1462+ }
1463+
1464+ unsigned
1465+ get_id() const
1466+ {
1467+ return theId;
1468+ }
1469+
1470+ bool
1471+ canHandle(const std::string& arg) const
1472+ {
1473+ if (theNames.find(arg) != theNames.end()) {
1474+ return true;
1475+ }
1476+ return false;
1477+ }
1478+
1479+ CommandArgInstance<Tuple>*
1480+ parse(const std::string& str) const
1481+ {
1482+ return theType->parse(str, this);
1483+ }
1484+
1485+ bool
1486+ isVoid() const
1487+ {
1488+ return theType->isVoid();
1489+ }
1490+
1491+ bool
1492+ isRequired() const
1493+ {
1494+ return theIsRequired;
1495+ }
1496+
1497+ std::string
1498+ getName() const
1499+ {
1500+ return *(theNames.begin());
1501+ }
1502+
1503+ std::string
1504+ getDescription() const
1505+ {
1506+ return theDescription;
1507+ }
1508+
1509+ bool
1510+ isSet(Tuple& t) const
1511+ {
1512+ return theType->isSet(t);
1513+ }
1514+
1515+ private:
1516+
1517+ unsigned theId;
1518+ CommandArgType<Tuple>* theType;
1519+ std::set<std::string> theNames;
1520+ std::string theDescription;
1521+ bool theIsRequired;
1522+ };
1523+
1524+} // namespace zorba
1525+} // namespace debugger
1526+
1527+#endif // ZORBA_DEBUGGER_COMMAND_ARG_H
1528
1529=== modified file 'bin/debugger/command_line_handler.cpp'
1530--- bin/debug_client/command_line_handler.cpp 2011-07-01 01:53:24 +0000
1531+++ bin/debugger/command_line_handler.cpp 2012-03-23 17:30:28 +0000
1532@@ -1,4 +1,4 @@
1533-/*
1534+ /*
1535 * Copyright 2006-2008 The FLWOR Foundation.
1536 *
1537 * Licensed under the Apache License, Version 2.0 (the "License");
1538@@ -23,225 +23,385 @@
1539 # define msleep Sleep
1540 #endif
1541
1542-namespace zorba { namespace debugclient {
1543+#include "command_prompt.h"
1544+
1545+
1546+namespace zorba { namespace debugger {
1547
1548- using namespace ::std;
1549 using namespace ::ZORBA_TR1_NS;
1550
1551- CommandLineHandler::CommandLineHandler(unsigned short port,
1552- LockFreeConsumer<std::size_t>& aConsumer,
1553- LockFreeConsumer<bool>& aContinueQueue,
1554- EventHandler& aHandler,
1555- CommandLine& aCommandLine)
1556+CommandLineHandler::CommandLineHandler(
1557+ unsigned short port,
1558+ LockFreeConsumer<std::size_t>& aConsumer,
1559+ LockFreeConsumer<bool>& aContinueQueue,
1560+ EventHandler* aHandler,
1561+ CommandPrompt* aCommandPrompt)
1562 : theConsumer(aConsumer),
1563 theContinueQueue(aContinueQueue),
1564- theClient(DebuggerClient::createDebuggerClient(&aHandler, port, "localhost")),
1565- theCommandLine(aCommandLine),
1566- theQuit(false), theContinue(false), theWaitFor(0)
1567+ theClient(DebuggerClient::createDebuggerClient(aHandler, port, "localhost")),
1568+ theCommandLine(aCommandPrompt),
1569+ theQuit(false), theTerminated(true), theContinue(false), theWaitFor(0)
1570 {
1571 addCommands();
1572 }
1573
1574- CommandLineHandler::~CommandLineHandler()
1575- {
1576- }
1577+CommandLineHandler::~CommandLineHandler()
1578+{
1579+}
1580
1581- void CommandLineHandler::execute()
1582- {
1583- theClient->accept();
1584- std::set<std::size_t> lIdList;
1585- do {
1586+void
1587+CommandLineHandler::execute()
1588+{
1589+ theClient->accept();
1590+ std::set<std::size_t> lIdList;
1591+ do {
1592+ getNextId(lIdList);
1593+ while (lIdList.find(theWaitFor) == lIdList.end()) {
1594 getNextId(lIdList);
1595- while (!theQuit && lIdList.find(theWaitFor) == lIdList.end()) {
1596- getNextId(lIdList);
1597- msleep(20);
1598- }
1599- while (!theContinueQueue.consume(theQuit)) {
1600- msleep(20);
1601- }
1602- theQuit = !theQuit;
1603- if (!theQuit) {
1604- theCommandLine.execute();
1605- while (theContinue) {
1606- theContinue = false;
1607- theCommandLine.execute();
1608- }
1609- }
1610- } while (!theQuit);
1611- }
1612-
1613- void CommandLineHandler::getNextId(std::set<std::size_t>& aIdList)
1614- {
1615- std::size_t result;
1616- if (theConsumer.consume(result)) {
1617- aIdList.insert(result);
1618- }
1619- }
1620-
1621- template<>
1622- void CommandLineHandler::handle<Status>(ZORBA_TR1_NS::tuple<> &t)
1623- {
1624- theWaitFor = theClient->status();
1625- }
1626-
1627- template<>
1628- void CommandLineHandler::handle<Quit>(ZORBA_TR1_NS::tuple<> &t)
1629- {
1630+ msleep(20);
1631+ }
1632+ bool lCanQuit;
1633+ while (!theContinueQueue.consume(lCanQuit)) {
1634+ msleep(20);
1635+ }
1636+ if (lCanQuit) {
1637+ theTerminated = true;
1638+ }
1639+ theCommandLine->execute();
1640+ while (theContinue) {
1641+ theContinue = false;
1642+ theCommandLine->execute();
1643+ }
1644+ } while (!theQuit);
1645+}
1646+
1647+void
1648+CommandLineHandler::getNextId(std::set<std::size_t>& aIdList)
1649+{
1650+ std::size_t result;
1651+ if (theConsumer.consume(result)) {
1652+ aIdList.insert(result);
1653+ }
1654+}
1655+
1656+template<>
1657+void
1658+CommandLineHandler::handle<Status>(ZORBA_TR1_NS::tuple<> &t)
1659+{
1660+ theWaitFor = theClient->status();
1661+}
1662+
1663+template<>
1664+void
1665+CommandLineHandler::handle<Variables>(ZORBA_TR1_NS::tuple<> &t)
1666+{
1667+ theWaitFor = theClient->variables();
1668+}
1669+
1670+template<>
1671+void
1672+CommandLineHandler::handle<Quit>(ZORBA_TR1_NS::tuple<> &t)
1673+{
1674+ if (!theTerminated) {
1675 bool answered = false;
1676 while (!answered) {
1677 std::cout << "Do you really want to stop debugging and exit? (y/n) ";
1678- char answer;
1679- std::cin >> answer;
1680- std::cout << std::endl;
1681- if (answer == 'y') {
1682+ std::string lAnswer;
1683+ std::getline(std::cin, lAnswer);
1684+ if (lAnswer == "y" || lAnswer == "yes") {
1685 answered = true;
1686- } else if (answered == 'n') {
1687+ } else if (lAnswer == "n" || lAnswer == "no") {
1688 theContinue = true;
1689 return;
1690 }
1691 }
1692- theWaitFor = theClient->stop();
1693- theClient->quit();
1694- }
1695-
1696- template<>
1697- void CommandLineHandler::handle<Run>(ZORBA_TR1_NS::tuple<> &t)
1698- {
1699- theWaitFor = theClient->run();
1700- }
1701-
1702- template<>
1703- void CommandLineHandler::handle<BreakpointSet>(std::tr1::tuple<bstring, bstring, bint> &t)
1704- {
1705- DebuggerClient::BreakpointType lType = DebuggerClient::Line;
1706- bool lEnabled = true;
1707- if (get<0>(t).first) {
1708- if (get<0>(t).second == "disabled") {
1709- lEnabled = false;
1710- }
1711- }
1712- theWaitFor = theClient->breakpoint_set(lType,
1713- lEnabled,
1714- get<1>(t).second,
1715- get<2>(t).second);
1716- }
1717-
1718- template<>
1719- void CommandLineHandler::handle<BreakpointGet>(tuple<bint> &aTuple)
1720- {
1721- theWaitFor = theClient->breakpoint_get(get<0>(aTuple).second);
1722- }
1723-
1724- template<>
1725- void CommandLineHandler::handle<BreakpointDel>(tuple<bint> &aTuple)
1726- {
1727- theWaitFor = theClient->breakpoint_remove(get<0>(aTuple).second);
1728- }
1729-
1730- template<>
1731- void CommandLineHandler::handle<BreakpointList>(tuple<> &t)
1732- {
1733- theWaitFor = theClient->breakpoint_list();
1734- }
1735-
1736- template<>
1737- void CommandLineHandler::handle<StackDepth>(tuple<> &t)
1738- {
1739- theWaitFor = theClient->stack_depth();
1740- }
1741-
1742- template<>
1743- void CommandLineHandler::handle<StackGet>(tuple<bint> &aTuple)
1744- {
1745- if (get<0>(aTuple).first) {
1746- theWaitFor = theClient->stack_get(get<0>(aTuple).second);
1747- } else {
1748- theWaitFor = theClient->stack_get();
1749- }
1750- }
1751-
1752- template<>
1753- void CommandLineHandler::handle<ContextNames>(tuple<>& aTuple)
1754- {
1755- theWaitFor = theClient->context_names();
1756- }
1757-
1758- template<>
1759- void CommandLineHandler::handle<ContextGet>(tuple<bint> &aTuple)
1760- {
1761- if (get<0>(aTuple).first)
1762- theWaitFor = theClient->context_get(get<0>(aTuple).second);
1763- else
1764- theWaitFor = theClient->context_get();
1765- }
1766-
1767- template<>
1768- void CommandLineHandler::handle<Eval>(tuple<bstring>& aTuple)
1769- {
1770- theWaitFor = theClient->eval(get<0>(aTuple).second);
1771- }
1772-
1773- void CommandLineHandler::addCommands()
1774- {
1775- theCommandLine << createCommand<Status>(tuple<>(), "status", *this,
1776- "Gets the status of the server");
1777- theCommandLine << createCommand<Quit>(tuple<>(), "quit", *this,
1778- "Stops debugging and quits the client");
1779- theCommandLine << createCommand<Run>(tuple<>(), "run", *this, "Run the Query");
1780- {
1781- Command<CommandLineHandler, tuple<bstring, bstring, bint>, BreakpointSet>* lCommand =
1782- createCommand<BreakpointSet>(tuple<bstring, bstring, bint>(), "break", *this, "Set a breakpoint");
1783- (*lCommand)(0, "s", createArgType<tuple<bstring, bstring, bint>, std::string, 0>(tuple<bstring, bstring, bint>()),
1784- "breakpoint state (enabled or disabled - default: enabled)", false);
1785- (*lCommand)(1, "f", createArgType<tuple<bstring, bstring, bint>, std::string, 1>(tuple<bstring, bstring, bint>()),
1786- "The name of the file where to stop", true);
1787- (*lCommand)(2, "l", createArgType<tuple<bstring, bstring, bint>, int, 2>(tuple<bstring, bstring, bint>()),
1788- "The line number", true);
1789-
1790- theCommandLine << lCommand;
1791- }
1792- {
1793- Command<CommandLineHandler, tuple<bint>, BreakpointGet>* lCommand
1794- = createCommand<BreakpointGet>(tuple<bint>(), "binfo", *this,
1795- "Get information about a given breakpoint");
1796- (*lCommand)(0, "i", createArgType<tuple<bint>, int, 0>(tuple<bint>()),
1797- "The id of the breakpoint", true);
1798-
1799- theCommandLine << lCommand;
1800- }
1801- {
1802- Command<CommandLineHandler, tuple<bint>, BreakpointDel>* lCommand
1803- = createCommand<BreakpointDel>(tuple<bint>(), "bdel", *this, "Delete a breakpoint with a given id");
1804- (*lCommand)(0, "i", createArgType<tuple<bint>, int, 0>(tuple<bint>()), "The id of the breakpoint", true);
1805-
1806- theCommandLine << lCommand;
1807- }
1808- theCommandLine << createCommand<BreakpointList>(tuple<>(), "blist", *this, "List all set breakpoints");
1809- theCommandLine << createCommand<StackDepth>(tuple<>(), "sdepth", *this, "Get the depth of the stack");
1810- {
1811- Command<CommandLineHandler, tuple<bint>, StackGet>* lCommand
1812- = createCommand<StackGet>(tuple<bint>(), "sget", *this, "Get information about one or all stack frames");
1813- (*lCommand)(0, "d", createArgType<tuple<bint>, int, 0>(tuple<bint>()), "The stack entry two show (show all if not provided)", false);
1814- theCommandLine << lCommand;
1815- }
1816- theCommandLine << createCommand<ContextNames>(tuple<>(), "cnames", *this, "Get the names of the avilable contexts");
1817- {
1818- Command<CommandLineHandler, tuple<bint>, ContextGet>* lCommand
1819- = createCommand<ContextGet>(tuple<bint>(), "cget", *this, "Get a context");
1820-
1821- (*lCommand)(0, "c", createArgType<tuple<bint>, int, 0>(tuple<bint>()), "The id of the context", false);
1822-
1823- theCommandLine << lCommand;
1824- }
1825- {
1826- Command<CommandLineHandler, tuple<bstring>, Eval>* lCommand
1827- = createCommand<Eval>(tuple<bstring>(), "eval", *this, "Evaluate a function");
1828-
1829- (*lCommand)(0, "c", createArgType<tuple<bstring>, std::string, 0>(tuple<bstring>()), "The command to evaluate", true);
1830-
1831- theCommandLine << lCommand;
1832- }
1833- }
1834-
1835-}} // namespace zorba::debugclient
1836-
1837+ }
1838+ theWaitFor = theClient->stop(true);
1839+ theClient->quit();
1840+ theQuit = true;
1841+}
1842+
1843+template<>
1844+void
1845+CommandLineHandler::handle<Run>(ZORBA_TR1_NS::tuple<> &t)
1846+{
1847+ theTerminated = false;
1848+ theWaitFor = theClient->run();
1849+}
1850+
1851+template<>
1852+void
1853+CommandLineHandler::handle<Stop>(ZORBA_TR1_NS::tuple<> &t)
1854+{
1855+ theWaitFor = theClient->stop(false);
1856+}
1857+
1858+template<>
1859+void
1860+CommandLineHandler::handle<BreakpointSet>(std::tr1::tuple<bstring, bstring, bint> &aTuple)
1861+{
1862+ DebuggerClient::BreakpointType lType = DebuggerClient::Line;
1863+ bool lEnabled = true;
1864+ if (get<0>(aTuple).first) {
1865+ if (get<0>(aTuple).second == "disabled") {
1866+ lEnabled = false;
1867+ }
1868+ }
1869+ theWaitFor = theClient->breakpoint_set(lType,
1870+ lEnabled,
1871+ get<1>(aTuple).second,
1872+ get<2>(aTuple).second);
1873+}
1874+
1875+template<>
1876+void
1877+CommandLineHandler::handle<BreakpointGet>(tuple<bint> &aTuple)
1878+{
1879+ theWaitFor = theClient->breakpoint_get(get<0>(aTuple).second);
1880+}
1881+
1882+template<>
1883+void
1884+CommandLineHandler::handle<BreakpointRemove>(tuple<bint> &aTuple)
1885+{
1886+ theWaitFor = theClient->breakpoint_remove(get<0>(aTuple).second);
1887+}
1888+
1889+template<>
1890+void
1891+CommandLineHandler::handle<BreakpointList>(tuple<> &aTuple)
1892+{
1893+ theWaitFor = theClient->breakpoint_list();
1894+}
1895+
1896+template<>
1897+void
1898+CommandLineHandler::handle<StackDepth>(tuple<> &aTuple)
1899+{
1900+ theWaitFor = theClient->stack_depth();
1901+}
1902+
1903+template<>
1904+void
1905+CommandLineHandler::handle<StackGet>(tuple<bint> &aTuple)
1906+{
1907+ if (get<0>(aTuple).first) {
1908+ theWaitFor = theClient->stack_get(get<0>(aTuple).second);
1909+ } else {
1910+ theWaitFor = theClient->stack_get();
1911+ }
1912+}
1913+
1914+template<>
1915+void
1916+CommandLineHandler::handle<ContextNames>(tuple<>& aTuple)
1917+{
1918+ theWaitFor = theClient->context_names();
1919+}
1920+
1921+template<>
1922+void CommandLineHandler::handle<ContextGet>(tuple<bint, bint> &aTuple)
1923+{
1924+ int lDepth = -1;
1925+ int lContext = -1;
1926+
1927+ if (get<0>(aTuple).first) {
1928+ lDepth = get<0>(aTuple).second;
1929+ }
1930+ if (get<1>(aTuple).first) {
1931+ lContext = get<1>(aTuple).second;
1932+ }
1933+ theWaitFor = theClient->context_get(lDepth, lContext);
1934+}
1935+
1936+template<>
1937+void CommandLineHandler::handle<Source>(tuple<bint, bint, bstring> &aTuple)
1938+{
1939+ theWaitFor = theClient->source(
1940+ get<2>(aTuple).second,
1941+ get<0>(aTuple).second,
1942+ get<1>(aTuple).second);
1943+}
1944+
1945+template<>
1946+void CommandLineHandler::handle<Eval>(tuple<bstring>& aTuple)
1947+{
1948+ theWaitFor = theClient->eval(get<0>(aTuple).second);
1949+}
1950+
1951+template<>
1952+void
1953+CommandLineHandler::handle<StepIn>(ZORBA_TR1_NS::tuple<> &t)
1954+{
1955+ theTerminated = false;
1956+ theWaitFor = theClient->step_into();
1957+}
1958+
1959+template<>
1960+void
1961+CommandLineHandler::handle<StepOut>(ZORBA_TR1_NS::tuple<> &t)
1962+{
1963+ theWaitFor = theClient->step_out();
1964+}
1965+
1966+template<>
1967+void
1968+CommandLineHandler::handle<StepOver>(ZORBA_TR1_NS::tuple<> &t)
1969+{
1970+ theTerminated = false;
1971+ theWaitFor = theClient->step_over();
1972+}
1973+
1974+void
1975+CommandLineHandler::addCommands()
1976+{
1977+ typedef tuple<> TUPLE;
1978+ typedef tuple<bint> TUPLE_INT;
1979+ typedef tuple<bstring> TUPLE_STR;
1980+ typedef tuple<bint, bint> TUPLE_INT_INT;
1981+ typedef tuple<bstring, bstring, bint> TUPLE_STR_STR_INT;
1982+ typedef tuple<bint, bint, bstring> TUPLE_INT_INT_STR;
1983+
1984+ // DBGP: status
1985+ *theCommandLine << createCommand<Status>(TUPLE(), "status", *this, "Gets the status of the server");
1986+
1987+ // ALIAS: variables (context_get -c -1)
1988+ {
1989+ std::set<std::string> lAliases;
1990+ lAliases.insert("vars");
1991+ *theCommandLine << createCommand<Variables>(TUPLE(), "variables", lAliases, *this, "Gets the variables visible in the current scope");
1992+ }
1993+
1994+ // META: quit
1995+ *theCommandLine << createCommand<Quit>(TUPLE(), "quit", *this, "Stops debugging and quits the client");
1996+
1997+ // DBGP: run
1998+ *theCommandLine << createCommand<Run>(TUPLE(), "run", *this, "Run the query");
1999+
2000+ // DBGP: stop
2001+ *theCommandLine << createCommand<Stop>(TUPLE(), "stop", *this, "Stop the query");
2002+
2003+ // DBGP: breakpoint_set
2004+ {
2005+ std::set<std::string> lAliases;
2006+ lAliases.insert("break");
2007+ Command<CommandLineHandler, TUPLE_STR_STR_INT, BreakpointSet>* lCommand =
2008+ createCommand<BreakpointSet>(TUPLE_STR_STR_INT(), "bset", lAliases, *this, "Set a breakpoint");
2009+
2010+ lCommand->addArgument(0, "s", createArgType<TUPLE_STR_STR_INT, std::string, 0>(TUPLE_STR_STR_INT()), "breakpoint state (optional, 'enabled' or 'disabled', default: enabled)", false);
2011+ lCommand->addArgument(1, "f", createArgType<TUPLE_STR_STR_INT, std::string, 1>(TUPLE_STR_STR_INT()), "name of the file where to stop", true);
2012+ lCommand->addArgument(2, "l", createArgType<TUPLE_STR_STR_INT, int, 2>(TUPLE_STR_STR_INT()), "line number", true);
2013+
2014+ *theCommandLine << lCommand;
2015+ }
2016+
2017+ // DBGP: breakpoint_get
2018+ {
2019+ Command<CommandLineHandler, TUPLE_INT, BreakpointGet>* lCommand =
2020+ createCommand<BreakpointGet>(TUPLE_INT(), "bget", *this, "Get information about a given breakpoint");
2021+
2022+ lCommand->addArgument(0, "d", createArgType<TUPLE_INT, int, 0>(TUPLE_INT()), "breakpoint ID", true);
2023+
2024+ *theCommandLine << lCommand;
2025+ }
2026+
2027+ // DBGP: breakpoint_remove
2028+ {
2029+ std::set<std::string> lAliases;
2030+ lAliases.insert("clear");
2031+ lAliases.insert("delete");
2032+ Command<CommandLineHandler, TUPLE_INT, BreakpointRemove>* lCommand =
2033+ createCommand<BreakpointRemove>(TUPLE_INT(), "bremove", lAliases, *this, "Delete a breakpoint");
2034+
2035+ lCommand->addArgument(0, "d", createArgType<TUPLE_INT, int, 0>(TUPLE_INT()), "breakpoint ID", true);
2036+
2037+ *theCommandLine << lCommand;
2038+ }
2039+
2040+ // DBGP: breakpoint_list
2041+ *theCommandLine << createCommand<BreakpointList>(TUPLE(), "blist", *this, "List all set breakpoints");
2042+
2043+ // DBGP: stack_depth
2044+ *theCommandLine << createCommand<StackDepth>(TUPLE(), "sdepth", *this, "Get the depth of the stack");
2045+
2046+ // DBGP: stack_get
2047+ {
2048+ Command<CommandLineHandler, TUPLE_INT, StackGet>* lCommand =
2049+ createCommand<StackGet>(TUPLE_INT(), "sget", *this, "Get information about one or all stack frames");
2050+
2051+ lCommand->addArgument(0, "d", createArgType<TUPLE_INT, int, 0>(TUPLE_INT()), "stack frame to show: 0 for current stack frame, N for the main module (optional, all frames are shown if not provided)", false);
2052+
2053+ *theCommandLine << lCommand;
2054+ }
2055+
2056+ // DBGP: context_names
2057+ *theCommandLine << createCommand<ContextNames>(tuple<>(), "cnames", *this, "Get the names of the avilable contexts");
2058+ // the DBGP -d arguments for this command is omitted since we always have/return: 0 - Local, 1 - Global
2059+
2060+ // DBGP: context_get
2061+ {
2062+ Command<CommandLineHandler, TUPLE_INT_INT, ContextGet>* lCommand =
2063+ createCommand<ContextGet>(TUPLE_INT_INT(), "cget", *this, "Get a context (list variables in this context)");
2064+
2065+ lCommand->addArgument(0, "d", createArgType<TUPLE_INT_INT, int, 0>(TUPLE_INT_INT()), "stack depth (optional, default: 0)", false);
2066+ lCommand->addArgument(0, "c", createArgType<TUPLE_INT_INT, int, 1>(TUPLE_INT_INT()), "context ID: 0 for Local, 1 for Global (optional, default: 0)", false);
2067+
2068+ *theCommandLine << lCommand;
2069+ }
2070+
2071+ // DBGP: source
2072+ {
2073+ std::set<std::string> lAliases;
2074+ lAliases.insert("list");
2075+ Command<CommandLineHandler, TUPLE_INT_INT_STR, Source>* lCommand =
2076+ createCommand<Source>(TUPLE_INT_INT_STR(), "source", lAliases, *this, "List source code");
2077+
2078+ lCommand->addArgument(0, "b", createArgType<TUPLE_INT_INT_STR, int, 0>(TUPLE_INT_INT_STR()), "begin line (optional, default: first line)", false);
2079+ lCommand->addArgument(1, "e", createArgType<TUPLE_INT_INT_STR, int, 1>(TUPLE_INT_INT_STR()), "end line (optional, default: last line)", false);
2080+ lCommand->addArgument(2, "f", createArgType<TUPLE_INT_INT_STR, std::string, 2>(TUPLE_INT_INT_STR()), "file URI (optional, default: the file in the top-most stack frame during execution, main module otherwise)", false);
2081+
2082+ *theCommandLine << lCommand;
2083+ }
2084+
2085+ // DBGP: eval
2086+ {
2087+ std::set<std::string> lAliases;
2088+ lAliases.insert("print");
2089+ Command<CommandLineHandler, TUPLE_STR, Eval>* lCommand =
2090+ createCommand<Eval>(TUPLE_STR(), "eval", lAliases, *this, "Evaluate an expression");
2091+
2092+ // TODO: this argument should not be here at all. Eval has the form: eval -i transaction_id -- {DATA}
2093+ // Eval should be called with a command like: eval 1 + 3
2094+ // - no need for an argument name
2095+ // - everything following the fist contiguous set of whitespaces are sent as string
2096+ lCommand->addArgument(0, "c", createArgType<TUPLE_STR, std::string, 0>(TUPLE_STR()), "expression to evaluate", true);
2097+
2098+ *theCommandLine << lCommand;
2099+ }
2100+
2101+ // DBGP: step_in
2102+ {
2103+ std::set<std::string> lAliases;
2104+ lAliases.insert("step");
2105+ lAliases.insert("s");
2106+ *theCommandLine << createCommand<StepIn>(TUPLE(), "in", lAliases, *this, "Step in");
2107+ }
2108+
2109+ // DBGP: step_out
2110+ {
2111+ std::set<std::string> lAliases;
2112+ lAliases.insert("finish");
2113+ *theCommandLine << createCommand<StepOut>(TUPLE(), "out", lAliases, *this, "Step out");
2114+ }
2115+
2116+ // DBGP: step_over
2117+ {
2118+ std::set<std::string> lAliases;
2119+ lAliases.insert("next");
2120+ lAliases.insert("n");
2121+ *theCommandLine << createCommand<StepOver>(TUPLE(), "over", lAliases, *this, "Step over");
2122+ }
2123+}
2124+
2125+} // namespace zorba
2126+} // namespace debugger
2127
2128=== modified file 'bin/debugger/command_line_handler.h'
2129--- bin/debug_client/command_line_handler.h 2011-07-01 01:53:24 +0000
2130+++ bin/debugger/command_line_handler.h 2012-03-23 17:30:28 +0000
2131@@ -14,46 +14,71 @@
2132 * limitations under the License.
2133 */
2134 #pragma once
2135+#ifndef ZORBA_DEBUGGER_COMMAND_LINE_HANDLER_H
2136+#define ZORBA_DEBUGGER_COMMAND_LINE_HANDLER_H
2137
2138 #include <set>
2139 #include <cassert>
2140+
2141 #include <zorba/debugger_client.h>
2142-#include "debug_command.h"
2143+
2144+#include "command.h"
2145 #include "event_handler.h"
2146
2147-namespace zorba { namespace debugclient {
2148-
2149+
2150+namespace zorba { namespace debugger {
2151+
2152+ class CommandPrompt;
2153+
2154 enum Commands {
2155 Status,
2156+ Variables,
2157+ Quit,
2158 Run,
2159+ Stop,
2160 BreakpointSet,
2161 BreakpointGet,
2162- BreakpointDel,
2163+ BreakpointRemove,
2164 BreakpointList,
2165 StackDepth,
2166 StackGet,
2167 ContextNames,
2168 ContextGet,
2169+ Source,
2170 Eval,
2171- Quit
2172+ StepIn,
2173+ StepOut,
2174+ StepOver
2175 };
2176
2177- class CommandLineHandler {
2178+class CommandLineHandler
2179+{
2180 private:
2181+
2182 typedef std::pair<bool, std::string> bstring;
2183 typedef std::pair<bool, int> bint;
2184+
2185 public:
2186- CommandLineHandler(unsigned short port,
2187- LockFreeConsumer<std::size_t>& aConsumer,
2188- LockFreeConsumer<bool>& aContinueQueue,
2189- EventHandler& aHandler,
2190- CommandLine& aCommandLine);
2191+
2192+ CommandLineHandler(
2193+ unsigned short port,
2194+ LockFreeConsumer<std::size_t>& aConsumer,
2195+ LockFreeConsumer<bool>& aContinueQueue,
2196+ EventHandler* aHandler,
2197+ CommandPrompt* aCommandPrompt);
2198+
2199 ~CommandLineHandler();
2200+
2201 public:
2202 void execute();
2203+
2204 public: // Handlers
2205+
2206 template<int>
2207- void handle(ZORBA_TR1_NS::tuple<>& aTuple) { assert(false); }
2208+ void handle(ZORBA_TR1_NS::tuple<>& aTuple)
2209+ {
2210+ assert(false);
2211+ }
2212
2213 template<int>
2214 void handle(ZORBA_TR1_NS::tuple<bstring, bstring, bint>& t)
2215@@ -62,63 +87,96 @@
2216 }
2217
2218 template<int>
2219+ void handle(ZORBA_TR1_NS::tuple<bint, bint, bstring>& t)
2220+ {
2221+ assert(false);
2222+ }
2223+
2224+ template<int>
2225 void handle(ZORBA_TR1_NS::tuple<bint>& aTuple)
2226 {
2227 assert(false);
2228 }
2229
2230 template<int>
2231+ void handle(ZORBA_TR1_NS::tuple<bint, bint>& aTuple)
2232+ {
2233+ assert(false);
2234+ }
2235+
2236+ template<int>
2237 void handle(ZORBA_TR1_NS::tuple<bstring>& aTuple)
2238 {
2239 assert(false);
2240 }
2241+
2242 private:
2243- LockFreeConsumer<std::size_t>& theConsumer;
2244- LockFreeConsumer<bool>& theContinueQueue;
2245- DebuggerClient* theClient;
2246- CommandLine& theCommandLine;
2247- bool theQuit;
2248- bool theContinue;
2249- std::size_t theWaitFor;
2250+ LockFreeConsumer<std::size_t>& theConsumer;
2251+ LockFreeConsumer<bool>& theContinueQueue;
2252+ DebuggerClient* theClient;
2253+ CommandPrompt* theCommandLine;
2254+ bool theQuit;
2255+ bool theTerminated;
2256+ bool theContinue;
2257+ std::size_t theWaitFor;
2258+
2259 private:
2260 void getNextId(std::set<std::size_t>& aIdList);
2261 void addCommands();
2262- };
2263-
2264- template<>
2265- void CommandLineHandler::handle<Status> (ZORBA_TR1_NS::tuple<>& t);
2266-
2267- template<>
2268- void CommandLineHandler::handle<Quit> (ZORBA_TR1_NS::tuple<>& t);
2269-
2270- template<>
2271- void CommandLineHandler::handle<Run> (ZORBA_TR1_NS::tuple<> &t);
2272-
2273- template<>
2274- void CommandLineHandler::handle<StackDepth> (ZORBA_TR1_NS::tuple<>& t);
2275-
2276- template<>
2277- void CommandLineHandler::handle<BreakpointList> (ZORBA_TR1_NS::tuple<>& aTuple);
2278-
2279- template<>
2280- void CommandLineHandler::handle<BreakpointSet> (ZORBA_TR1_NS::tuple<bstring, bstring, bint> &t);
2281-
2282- template<>
2283- void CommandLineHandler::handle<BreakpointGet> (ZORBA_TR1_NS::tuple<bint>& aTuple);
2284-
2285- template<>
2286- void CommandLineHandler::handle<BreakpointDel>(ZORBA_TR1_NS::tuple<bint> &aTuple);
2287-
2288- template<>
2289- void CommandLineHandler::handle<StackGet> (ZORBA_TR1_NS::tuple<bint>& aTuple);
2290-
2291- template<>
2292- void CommandLineHandler::handle<ContextNames>(ZORBA_TR1_NS::tuple<> &aTuple);
2293-
2294- template<>
2295- void CommandLineHandler::handle<ContextGet>(ZORBA_TR1_NS::tuple<bint> &aTuple);
2296-
2297- template<>
2298- void CommandLineHandler::handle<Eval>(ZORBA_TR1_NS::tuple<bstring>& aTuple);
2299-
2300-}} // close namespaces zorba::debugclient
2301+};
2302+
2303+template<>
2304+void CommandLineHandler::handle<Status> (ZORBA_TR1_NS::tuple<>& t);
2305+
2306+template<>
2307+void CommandLineHandler::handle<Quit> (ZORBA_TR1_NS::tuple<>& t);
2308+
2309+template<>
2310+void CommandLineHandler::handle<Run> (ZORBA_TR1_NS::tuple<> &t);
2311+
2312+template<>
2313+void CommandLineHandler::handle<Stop> (ZORBA_TR1_NS::tuple<> &t);
2314+
2315+template<>
2316+void CommandLineHandler::handle<StackDepth> (ZORBA_TR1_NS::tuple<>& t);
2317+
2318+template<>
2319+void CommandLineHandler::handle<BreakpointList> (ZORBA_TR1_NS::tuple<>& aTuple);
2320+
2321+template<>
2322+void CommandLineHandler::handle<BreakpointSet> (ZORBA_TR1_NS::tuple<bstring, bstring, bint> &t);
2323+
2324+template<>
2325+void CommandLineHandler::handle<BreakpointGet> (ZORBA_TR1_NS::tuple<bint>& aTuple);
2326+
2327+template<>
2328+void CommandLineHandler::handle<BreakpointRemove>(ZORBA_TR1_NS::tuple<bint> &aTuple);
2329+
2330+template<>
2331+void CommandLineHandler::handle<StackGet> (ZORBA_TR1_NS::tuple<bint>& aTuple);
2332+
2333+template<>
2334+void CommandLineHandler::handle<ContextNames>(ZORBA_TR1_NS::tuple<> &aTuple);
2335+
2336+template<>
2337+void CommandLineHandler::handle<ContextGet>(ZORBA_TR1_NS::tuple<bint, bint> &aTuple);
2338+
2339+template<>
2340+void CommandLineHandler::handle<Source>(ZORBA_TR1_NS::tuple<bint, bint, bstring> &aTuple);
2341+
2342+template<>
2343+void CommandLineHandler::handle<Eval>(ZORBA_TR1_NS::tuple<bstring>& aTuple);
2344+
2345+template<>
2346+void CommandLineHandler::handle<StepIn> (ZORBA_TR1_NS::tuple<> &t);
2347+
2348+template<>
2349+void CommandLineHandler::handle<StepOut> (ZORBA_TR1_NS::tuple<> &t);
2350+
2351+template<>
2352+void CommandLineHandler::handle<StepOver> (ZORBA_TR1_NS::tuple<> &t);
2353+
2354+} // namespace zorba
2355+} // namespace debugger
2356+
2357+#endif // ZORBA_DEBUGGER_COMMAND_LINE_HANDLER_H
2358
2359=== added file 'bin/debugger/command_prompt.cpp'
2360--- bin/debugger/command_prompt.cpp 1970-01-01 00:00:00 +0000
2361+++ bin/debugger/command_prompt.cpp 2012-03-23 17:30:28 +0000
2362@@ -0,0 +1,287 @@
2363+/*
2364+ * Copyright 2006-2008 The FLWOR Foundation.
2365+ *
2366+ * Licensed under the Apache License, Version 2.0 (the "License");
2367+ * you may not use this file except in compliance with the License.
2368+ * You may obtain a copy of the License at
2369+ *
2370+ * http://www.apache.org/licenses/LICENSE-2.0
2371+ *
2372+ * Unless required by applicable law or agreed to in writing, software
2373+ * distributed under the License is distributed on an "AS IS" BASIS,
2374+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2375+ * See the License for the specific language governing permissions and
2376+ * limitations under the License.
2377+ */
2378+#include "command_prompt.h"
2379+
2380+#include <string>
2381+#include <vector>
2382+#include <map>
2383+#include <iostream>
2384+
2385+#include "command.h"
2386+
2387+
2388+namespace zorba { namespace debugger {
2389+
2390+#ifdef ZORBA_HAVE_LIBEDIT_H
2391+const char*
2392+prompt(EditLine* aEl) {
2393+ return "(xqdb) ";
2394+}
2395+#endif
2396+
2397+CommandPrompt::CommandPrompt()
2398+{
2399+#ifdef ZORBA_HAVE_LIBEDIT_H
2400+ theEditLine = el_init("xqdb", stdin, stdout, stderr);
2401+ theHistory = history_init();
2402+ HistEvent lHistoryEvent;
2403+ history(theHistory, &lHistoryEvent, H_SETSIZE, 100);
2404+
2405+ el_set(theEditLine, EL_PROMPT, prompt);
2406+
2407+ el_set(theEditLine, EL_HIST, history, theHistory);
2408+ el_set(theEditLine, EL_EDITOR, "emacs");
2409+#endif
2410+}
2411+
2412+CommandPrompt::~CommandPrompt()
2413+{
2414+#ifdef ZORBA_HAVE_LIBEDIT_H
2415+ history_end(theHistory);
2416+ el_end(theEditLine);
2417+#endif
2418+
2419+ std::map<std::string, UntypedCommand*>::iterator lIter;
2420+ for (lIter = theCommands.begin(); lIter != theCommands.end(); ++lIter) {
2421+ delete lIter->second;
2422+ }
2423+}
2424+
2425+void
2426+CommandPrompt::printHelp(UntypedCommand* aCommand)
2427+{
2428+ // if no command is provided, print all the available commands
2429+ if (!aCommand) {
2430+ std::cout << "Available commands:" << std::endl;
2431+
2432+ // print the names of all commands
2433+ std::map<std::string, UntypedCommand*>::iterator lIter = theCommands.begin();
2434+ while (lIter != theCommands.end()) {
2435+ std::cout << " " << (*lIter).first;
2436+ std::set<std::string> lAliases = (*lIter).second->getAliases();
2437+ std::set<std::string>::const_iterator lAliasIter = lAliases.begin();
2438+ while (lAliasIter != lAliases.end()) {
2439+ std::cout << ", " << *lAliasIter;
2440+ lAliasIter++;
2441+ }
2442+ std::cout << std::endl;
2443+ lIter++;
2444+ }
2445+
2446+ // some hints for detailed help
2447+ std::cout << std::endl;
2448+ std::cout << "Type help <command> to get more information about one command." << std::endl;
2449+ std::cout << std::endl;
2450+ } else {
2451+ // ok, so we have a command; then print the help
2452+ aCommand->printHelp();
2453+ }
2454+}
2455+
2456+void
2457+CommandPrompt::execute()
2458+{
2459+ bool lWithOutput = true;
2460+
2461+ for (;;) {
2462+#ifdef ZORBA_HAVE_LIBEDIT_H
2463+ const char* lBuf;
2464+ int lCharsRead = -1;
2465+ lBuf = el_gets(theEditLine, &lCharsRead);
2466+ std::string lCommandLine(lBuf, lCharsRead - 1);
2467+#else
2468+ if (lWithOutput) {
2469+ std::cout << "(xqdb) ";
2470+ }
2471+ lWithOutput = true;
2472+ std::string lCommandLine;
2473+ std::getline(std::cin, lCommandLine);
2474+ if (std::cin.fail()) {
2475+ lWithOutput = false;
2476+ std::cin.clear();
2477+ continue;
2478+ }
2479+#endif
2480+
2481+ std::vector<std::string> lArgs;
2482+
2483+ // split the command into arguments
2484+ parseLine(lCommandLine, lArgs);
2485+ std::string::size_type lSize = lArgs.size();
2486+
2487+ // empty command? do nothing!
2488+ if (lSize == 0) {
2489+ lArgs = theLastArgs;
2490+ if (lArgs.size() == 0) {
2491+ continue;
2492+ }
2493+ }
2494+#ifdef ZORBA_HAVE_LIBEDIT_H
2495+ else {
2496+ HistEvent lHistoryEvent;
2497+ history(theHistory, &lHistoryEvent, H_ENTER, lCommandLine.c_str());
2498+ }
2499+#endif
2500+ theLastArgs = lArgs;
2501+
2502+ UntypedCommand* lCommand = NULL;
2503+
2504+ // help is not a command but a hook here
2505+ if (lArgs.at(0) == "h" || lArgs.at(0) == "help") {
2506+ std::string lCmd = "";
2507+
2508+ // if the user needs the help for a specific command
2509+ if (lSize > 1) {
2510+ // do nothing if we don't have a command starting with this prefix?
2511+ // findCommand will print the appropriate errors
2512+ if (!findCommand(lArgs[1], lCommand)) {
2513+ continue;
2514+ }
2515+ }
2516+ printHelp(lCommand);
2517+ continue;
2518+ }
2519+ if (findCommand(lArgs[0], lCommand) && lCommand->execute(lArgs)) {
2520+ return;
2521+ }
2522+ continue;
2523+ }
2524+}
2525+
2526+CommandPrompt&
2527+CommandPrompt::operator<<(UntypedCommand *aCommand)
2528+{
2529+ theCommands.insert(std::make_pair(aCommand->getName(), aCommand));
2530+ return *this;
2531+}
2532+
2533+bool
2534+CommandPrompt::findCommand(const std::string& aPrefix, UntypedCommand*& aCommand)
2535+{
2536+ std::vector<UntypedCommand*> lFoundCommands;
2537+
2538+ std::map<std::string, UntypedCommand*>::iterator lIter = theCommands.begin();
2539+ while (lIter != theCommands.end()) {
2540+ // if a command name is equal with the prefix, this is the command we want
2541+ if ((*lIter).first == aPrefix) {
2542+ aCommand = (*lIter).second;
2543+ return true;
2544+ }
2545+
2546+ bool lIsCandidate = false;
2547+
2548+ // add this command to candidate commands if the prefix matches
2549+ if ((*lIter).first.find(aPrefix) == 0) {
2550+ lFoundCommands.push_back((*lIter).second);
2551+ lIsCandidate = true;
2552+ }
2553+
2554+ // now process the aliases
2555+ std::set<std::string> lAliases = (*lIter).second->getAliases();
2556+ std::set<std::string>::const_iterator lAliasIter = lAliases.begin();
2557+ while (lAliasIter != lAliases.end()) {
2558+ // if a command alias is equal with the prefix, this is the command we want
2559+ if (*lAliasIter == aPrefix) {
2560+ aCommand = (*lIter).second;
2561+ return true;
2562+ }
2563+
2564+ // add this command to candidate commands if the prefix matches one alias
2565+ // and if the command is not already added
2566+ if (!lIsCandidate && (*lAliasIter).find(aPrefix) == 0) {
2567+ lFoundCommands.push_back((*lIter).second);
2568+ break;
2569+ }
2570+ lAliasIter++;
2571+ }
2572+
2573+ lIter++;
2574+ }
2575+
2576+ if (lFoundCommands.empty()) {
2577+ std::cout << "Command not found: " << aPrefix << std::endl;
2578+ return false;
2579+ }
2580+
2581+ if (lFoundCommands.size() > 1) {
2582+ std::cout << "Ambigous command: " << aPrefix << std::endl;
2583+ // show all possible commands that start with this prefix
2584+ for (std::string::size_type i = 0; i < lFoundCommands.size(); i++) {
2585+ UntypedCommand* lCommand = lFoundCommands.at(i);
2586+
2587+ // commands
2588+ if (lCommand->getName().find(aPrefix) == 0) {
2589+ std::cout << " " << lCommand->getName() << std::endl;
2590+ }
2591+
2592+ // and aliases
2593+ std::set<std::string> lAliases = lCommand->getAliases();
2594+ std::set<std::string>::const_iterator lAliasIter = lAliases.begin();
2595+ while (lAliasIter != lAliases.end()) {
2596+ if ((*lAliasIter).find(aPrefix) == 0) {
2597+ std::cout << " " << *lAliasIter << std::endl;
2598+ }
2599+ lAliasIter++;
2600+ }
2601+ }
2602+ return false;
2603+ }
2604+
2605+ aCommand = lFoundCommands[0];
2606+ return true;
2607+}
2608+
2609+void
2610+CommandPrompt::parseLine(const std::string& aLine, std::vector<std::string>& aVector)
2611+{
2612+ std::string::size_type lBefore = 0;
2613+ std::string::size_type lPos = aLine.find_first_of(" \t", 0);
2614+
2615+ while (lPos != aLine.npos) {
2616+ std::string lSub = aLine.substr(lBefore, lPos - lBefore);
2617+
2618+ // if two consecutive spaces, you get an empty string here
2619+ if (lSub != "") {
2620+ if (lSub[0] == '"') {
2621+ std::string::size_type lBeforeCopy = lBefore;
2622+ do {
2623+ lBeforeCopy = aLine.find("\"", lBeforeCopy + 1);
2624+ } while (lPos != aLine.npos && aLine.size() > lPos + 1 && aLine[lPos + 1] == '\\');
2625+ lPos = lBeforeCopy;
2626+ lSub = aLine.substr(lBefore + 1, lPos - lBefore - 1);
2627+ }
2628+ aVector.push_back(lSub);
2629+ }
2630+
2631+ lBefore = lPos + 1;
2632+ lPos = aLine.find_first_of(" \t", lBefore);
2633+ }
2634+ std::string lSub = aLine.substr(lBefore);
2635+
2636+ // catching the case when the command ends with a space
2637+ if (lSub == "") {
2638+ return;
2639+ }
2640+
2641+ if (lSub[0] == '"') {
2642+ lPos = aLine.find("\"", lBefore + 1);
2643+ lSub = aLine.substr(lBefore + 1, lPos - lBefore - 1);
2644+ }
2645+ aVector.push_back(lSub);
2646+}
2647+
2648+} // namespace zorba
2649+} // namespace debugger
2650
2651=== added file 'bin/debugger/command_prompt.h'
2652--- bin/debugger/command_prompt.h 1970-01-01 00:00:00 +0000
2653+++ bin/debugger/command_prompt.h 2012-03-23 17:30:28 +0000
2654@@ -0,0 +1,72 @@
2655+/*
2656+ * Copyright 2006-2008 The FLWOR Foundation.
2657+ *
2658+ * Licensed under the Apache License, Version 2.0 (the "License");
2659+ * you may not use this file except in compliance with the License.
2660+ * You may obtain a copy of the License at
2661+ *
2662+ * http://www.apache.org/licenses/LICENSE-2.0
2663+ *
2664+ * Unless required by applicable law or agreed to in writing, software
2665+ * distributed under the License is distributed on an "AS IS" BASIS,
2666+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2667+ * See the License for the specific language governing permissions and
2668+ * limitations under the License.
2669+ */
2670+#pragma once
2671+#ifndef ZORBA_DEBUGGER_COMMAND_PROMPT_H
2672+#define ZORBA_DEBUGGER_COMMAND_PROMPT_H
2673+
2674+#include <string>
2675+#include <map>
2676+#include <vector>
2677+
2678+#include "config.h"
2679+
2680+#ifdef ZORBA_HAVE_LIBEDIT_H
2681+# include <histedit.h>
2682+#endif
2683+
2684+
2685+namespace zorba { namespace debugger {
2686+
2687+class UntypedCommand;
2688+
2689+class CommandPrompt
2690+{
2691+ public:
2692+ CommandPrompt();
2693+ ~CommandPrompt();
2694+
2695+ public:
2696+
2697+ void execute();
2698+
2699+ CommandPrompt& operator<< (UntypedCommand* command);
2700+
2701+ private:
2702+
2703+ void
2704+ printHelp(UntypedCommand* command);
2705+
2706+ bool
2707+ findCommand(const std::string& prefix, UntypedCommand*& command);
2708+
2709+ void
2710+ parseLine(const std::string& line, std::vector<std::string>& vector);
2711+
2712+ private:
2713+ std::map<std::string, UntypedCommand*> theCommands;
2714+ std::vector<std::string> theLastArgs;
2715+
2716+#ifdef ZORBA_HAVE_LIBEDIT_H
2717+ EditLine* theEditLine;
2718+ History* theHistory;
2719+#endif
2720+};
2721+
2722+
2723+} // namespace zorba
2724+} // namespace debugger
2725+
2726+#endif // ZORBA_DEBUGGER_COMMAND_PROMPT_H
2727
2728=== added file 'bin/debugger/config.h.cmake'
2729--- bin/debugger/config.h.cmake 1970-01-01 00:00:00 +0000
2730+++ bin/debugger/config.h.cmake 2012-03-23 17:30:28 +0000
2731@@ -0,0 +1,24 @@
2732+/*
2733+ * Copyright 2006-2008 The FLWOR Foundation.
2734+ *
2735+ * Licensed under the Apache License, Version 2.0 (the "License");
2736+ * you may not use this file except in compliance with the License.
2737+ * You may obtain a copy of the License at
2738+ *
2739+ * http://www.apache.org/licenses/LICENSE-2.0
2740+ *
2741+ * Unless required by applicable law or agreed to in writing, software
2742+ * distributed under the License is distributed on an "AS IS" BASIS,
2743+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2744+ * See the License for the specific language governing permissions and
2745+ * limitations under the License.
2746+ */
2747+
2748+// This header is configured by Zorba's build process -- DO NOT EDIT!
2749+
2750+#ifndef ZORBA_DEBUGGER_CONFIG_H
2751+#define ZORBA_DEBUGGER_CONFIG_H
2752+
2753+#cmakedefine ZORBA_HAVE_LIBEDIT_H
2754+
2755+#endif /* ZORBA_DEBUGGER_CONFIG_H */
2756
2757=== modified file 'bin/debugger/event_handler.cpp'
2758--- bin/debug_client/event_handler.cpp 2011-07-01 01:53:24 +0000
2759+++ bin/debugger/event_handler.cpp 2012-03-23 17:30:28 +0000
2760@@ -13,88 +13,93 @@
2761 * See the License for the specific language governing permissions and
2762 * limitations under the License.
2763 */
2764+
2765+#include "event_handler.h"
2766+
2767+#include <sstream>
2768+
2769 #include <zorba/zorba.h>
2770 #include <zorba/store_manager.h>
2771 #include <zorba/iterator.h>
2772-#include <sstream>
2773-#include "debug_client/event_handler.h"
2774
2775-namespace zorba { namespace debugclient {
2776+namespace zorba { namespace debugger {
2777
2778- EventHandler::EventHandler(LockFreeProducer<std::size_t>& aQueue, LockFreeProducer<bool>& aContProducer)
2779+EventHandler::EventHandler(LockFreeProducer<std::size_t>& aQueue, LockFreeProducer<bool>& aContProducer)
2780 : theIdQueue(aQueue), theContinueProducer(aContProducer),
2781 theStore(StoreManager::getStore()),
2782 theZorbaInstance(Zorba::getInstance(theStore)),
2783 theStaticContext(theZorbaInstance->createStaticContext())
2784-
2785- {
2786- try {
2787- Zorba_CompilerHints_t lHints;
2788- lHints.opt_level = ZORBA_OPT_LEVEL_O1;
2789- std::auto_ptr<std::istream> stream(getCurrentDirectory());
2790- zorba::String query;
2791- char buffer[1024];
2792- std::string::size_type s;
2793- while ((s = stream->readsome(buffer, 1024))) {
2794- query.append(std::string(buffer, s));
2795- }
2796- theStaticContext->loadProlog(query, lHints);
2797- } catch (zorba::ZorbaException& e) {
2798- std::cerr << "Exception: I was not able to load the query file:" << std::endl;
2799- std::cerr << e.what() << std::endl;
2800- throw;
2801- }
2802- }
2803-
2804- EventHandler::~EventHandler()
2805- {
2806- theStaticContext = 0;
2807- theZorbaInstance->shutdown();
2808- StoreManager::shutdownStore(theStore);
2809- }
2810-
2811- void EventHandler::parseMessage(const std::string &aMessage)
2812- {
2813- try {
2814- zorba::String queryString = "local:main(";
2815- queryString += aMessage + ")";
2816- XQuery_t query = theZorbaInstance->compileQuery(queryString, theStaticContext);
2817- Iterator_t lIter = query->iterator();
2818- Item item;
2819- lIter->open();
2820- bool doContinue = false;
2821- lIter->next(item);
2822- {
2823- const std::string& continueString = item.getStringValue().str();
2824- if (continueString == "true") {
2825- doContinue = true;
2826- } else if (continueString == "false") {
2827- doContinue = false;
2828- } else {
2829- std::stringstream stream(continueString);
2830- stream >> doContinue;
2831- }
2832- }
2833- lIter->next(item);
2834- std::size_t lId;
2835- {
2836- std::stringstream stream(item.getStringValue().c_str());
2837- stream >> lId;
2838- }
2839- lIter->next(item);
2840- std::cout << item.getStringValue() << std::endl;
2841- theContinueProducer.produce(doContinue);
2842- theIdQueue.produce(lId);
2843- } catch (ZorbaException& e) {
2844- std::cerr << "FATAL: could not execute query: " << std::endl;
2845- std::cerr << e << std::endl;
2846- std::cerr << "This is a bug, please report to zorba-users@lists.sourceforge.net" << std::endl;
2847- theContinueProducer.produce(false);
2848- }
2849- }
2850-
2851- void EventHandler::error(unsigned int errcode, const std::string &msg)
2852- {
2853- std::cerr << "Error " << errcode << ": " << msg << std::endl;
2854- }
2855-}}
2856+{
2857+}
2858+
2859+EventHandler::~EventHandler()
2860+{
2861+ theStaticContext = 0;
2862+ theZorbaInstance->shutdown();
2863+ StoreManager::shutdownStore(theStore);
2864+}
2865+
2866+void
2867+EventHandler::init()
2868+{
2869+ try {
2870+ Zorba_CompilerHints_t lHints;
2871+ lHints.opt_level = ZORBA_OPT_LEVEL_O1;
2872+ zorba::String lProlog("import module namespace dmh = 'http://www.zorba-xquery.com/modules/debugger/dbgp-message-handler';");
2873+ theStaticContext->loadProlog(lProlog, lHints);
2874+ } catch (zorba::ZorbaException& e) {
2875+ std::cerr << "Exception: I was not able to load the query file:" << std::endl;
2876+ std::cerr << e.what() << std::endl;
2877+ throw;
2878+ }
2879+}
2880+
2881+void
2882+EventHandler::parseMessage(const std::string &aMessage)
2883+{
2884+ try {
2885+#ifndef NDEBUG
2886+ // uncomment this to see the raw messages received by the event handler
2887+ //std::cout << "Processing response: " << aMessage << std::endl;
2888+#endif
2889+ // the query to process the response
2890+ std::stringstream lQueryStream;
2891+ lQueryStream << "dmh:process(" << aMessage << ")";
2892+ XQuery_t lQuery = theZorbaInstance->compileQuery(lQueryStream.str(), theStaticContext);
2893+
2894+ // get the query result sequrence:
2895+ // 1. a message
2896+ Iterator_t lIter = lQuery->iterator();
2897+ Item lItem;
2898+ lIter->open();
2899+ lIter->next(lItem);
2900+ std::size_t lId;
2901+ std::stringstream lStream(lItem.getStringValue().c_str());
2902+ lStream >> lId;
2903+
2904+ // 2. an "idle" flag (to disable quit confirmation)
2905+ bool lCanQuit = false;
2906+ if (lIter->next(lItem)) {
2907+ String lMessage = lItem.getStringValue();
2908+ lCanQuit = lMessage == "idle";
2909+ std::cout << std::endl << lItem.getStringValue() << std::endl;
2910+ }
2911+ theContinueProducer.produce(lCanQuit);
2912+
2913+ // go and solve the event with this id
2914+ theIdQueue.produce(lId);
2915+ } catch (ZorbaException& e) {
2916+ std::cerr << "FATAL: could not execute query: " << std::endl;
2917+ std::cerr << e << std::endl;
2918+ std::cerr << "This is a bug, please report it at http://bugs.launchpad.net/zorba" << std::endl;
2919+ }
2920+}
2921+
2922+void
2923+EventHandler::error(unsigned int errcode, const std::string &msg)
2924+{
2925+ std::cerr << "Error " << errcode << ": " << msg << std::endl;
2926+}
2927+
2928+} // namespace zorba
2929+} // namespace debugger
2930
2931=== modified file 'bin/debugger/event_handler.h'
2932--- bin/debug_client/event_handler.h 2011-07-01 01:53:24 +0000
2933+++ bin/debugger/event_handler.h 2012-03-23 17:30:28 +0000
2934@@ -14,33 +14,46 @@
2935 * limitations under the License.
2936 */
2937 #pragma once
2938+#ifndef ZORBA_DEBUGGER_EVENT_HANDLER_H
2939+#define ZORBA_DEBUGGER_EVENT_HANDLER_H
2940+
2941 #include <string>
2942 #include <iostream>
2943+
2944 #include <zorba/debugger_event_handler.h>
2945 #include <zorba/static_context.h>
2946+
2947 #include "lock_free_queue.h"
2948
2949-namespace zorba {
2950- class Zorba;
2951-}
2952-
2953-namespace zorba { namespace debugclient {
2954-
2955- class EventHandler : public zorba::DebuggerEventHandler
2956- {
2957+
2958+namespace zorba { namespace debugger {
2959+
2960+class EventHandler : public zorba::DebuggerEventHandler
2961+{
2962 public:
2963- EventHandler(LockFreeProducer<std::size_t>& aQueue, LockFreeProducer<bool>& aContQueue);
2964+ EventHandler(
2965+ LockFreeProducer<std::size_t>& aQueue,
2966+ LockFreeProducer<bool>& aContQueue);
2967+
2968 ~EventHandler();
2969+
2970 public:
2971 virtual void parseMessage(const std::string& aMessage);
2972+
2973 virtual void error(unsigned int errcode, const std::string& msg);
2974+
2975+ virtual void init();
2976+
2977 private:
2978- static std::istream* getCurrentDirectory();
2979 LockFreeProducer<std::size_t>& theIdQueue;
2980 LockFreeProducer<bool>& theContinueProducer;
2981 void* theStore;
2982 Zorba* theZorbaInstance;
2983 StaticContext_t theStaticContext;
2984- };
2985+
2986+};
2987
2988-}} // end of namespace zorba::debugclient
2989+} // namespace zorba
2990+} // namespace debugger
2991+
2992+#endif // ZORBA_DEBUGGER_EVENT_HANDLER_H
2993
2994=== modified file 'bin/debugger/lock_free_queue.h'
2995--- bin/debug_client/lock_free_queue.h 2011-07-01 01:53:24 +0000
2996+++ bin/debugger/lock_free_queue.h 2012-03-23 17:30:28 +0000
2997@@ -14,10 +14,14 @@
2998 * limitations under the License.
2999 */
3000 #pragma once
3001+#ifndef ZORBA_DEBUGGER_LOCK_FREE_QUEUE_H
3002+#define ZORBA_DEBUGGER_LOCK_FREE_QUEUE_H
3003+
3004 #include <iostream>
3005 #include <list>
3006
3007-namespace zorba { namespace debugclient {
3008+
3009+namespace zorba { namespace debugger {
3010
3011 template<typename T>
3012 class LockFreeProducer
3013@@ -80,4 +84,8 @@
3014 }
3015 return false;
3016 }
3017-}} // namespace zorba::debugclient
3018+
3019+} // namespace zorba
3020+} // namespace debugger
3021+
3022+#endif // ZORBA_DEBUGGER_LOCK_FREE_QUEUE_H
3023
3024=== modified file 'bin/debugger/main.cpp'
3025--- bin/debug_client/main.cpp 2011-07-01 01:53:24 +0000
3026+++ bin/debugger/main.cpp 2012-03-23 17:30:28 +0000
3027@@ -13,12 +13,286 @@
3028 * See the License for the specific language governing permissions and
3029 * limitations under the License.
3030 */
3031+
3032+#ifdef WIN32
3033+# include <windows.h>
3034+# include <string.h>
3035+# include <strsafe.h>
3036+#endif
3037+
3038+#include <vector>
3039+
3040 #include <zorba/config.h>
3041-#include "debug_command.h"
3042-#include "command_line_handler.h"
3043+
3044+#include "xqdb_client.h"
3045+#include "process_listener.h"
3046+
3047
3048 using namespace zorba;
3049-using namespace zorba::debugclient;
3050+using namespace zorba::debugger;
3051+
3052+
3053+std::auto_ptr<XqdbClient> theClient;
3054+
3055+// this will make sure the xqdb process will not quit when Ctrl-C is pressed
3056+#ifdef WIN32
3057+BOOL WINAPI
3058+ctrlC_Handler(DWORD aCtrlType)
3059+{
3060+ if (CTRL_C_EVENT == aCtrlType) {
3061+ return true;
3062+ }
3063+ return false;
3064+}
3065+#else
3066+void
3067+ctrlC_Handler(int lParam)
3068+{
3069+ // an empty sugnal handler on Linux should do the job
3070+}
3071+#endif
3072+
3073+
3074+// this handler function is passed the the zorba process listener and will
3075+// the client if the zorba process terminates
3076+void
3077+onExitProcess(ExitCode aExitCode) {
3078+ std::cout << std::endl << "Terminating debugger client." << std::endl;
3079+
3080+#ifndef WIN32
3081+ XqdbClient* lClient = theClient.release();
3082+ if (lClient) {
3083+ delete lClient;
3084+ }
3085+#endif
3086+
3087+ exit(aExitCode);
3088+}
3089+
3090+
3091+int
3092+startZorba(std::string& aExec, std::vector<std::string>& aArgs, std::auto_ptr<ProcessListener>& aProcessListener)
3093+{
3094+#ifdef WIN32
3095+ // **************************
3096+ // start a process on Windows
3097+
3098+ DWORD iReturnVal = 0;
3099+
3100+ std::wstring lExec;
3101+ std::wstring lArgs;
3102+
3103+ lExec.assign(aExec.begin(), aExec.end());
3104+
3105+ // the executable must be the first in the list of arguments
3106+ lArgs.append(L"\"");
3107+ lArgs.append(lExec);
3108+ lArgs.append(L"\"");
3109+
3110+ for (std::vector<std::string>::size_type j = 0; j < aArgs.size(); j++) {
3111+ std::string lArg(aArgs.at(j));
3112+ std::wstring lArgW;
3113+ lArgW.assign(lArg.begin(), lArg.end());
3114+ lArgs.append(L" ");
3115+ lArgs.append(lArgW);
3116+ }
3117+
3118+ // CreateProcessW can modify Parameters thus we allocate needed memory
3119+ wchar_t * pwszParam = new wchar_t[lArgs.size() + 1];
3120+ if (pwszParam == 0) {
3121+ return 1;
3122+ }
3123+ const wchar_t* pchrTemp = lArgs.c_str();
3124+ wcscpy_s(pwszParam, lArgs.size() + 1, pchrTemp);
3125+
3126+ // CreateProcess API initialization
3127+ STARTUPINFOW siStartupInfo;
3128+ PROCESS_INFORMATION piProcessInfo;
3129+ memset(&siStartupInfo, 0, sizeof(siStartupInfo));
3130+ memset(&piProcessInfo, 0, sizeof(piProcessInfo));
3131+ siStartupInfo.cb = sizeof(siStartupInfo);
3132+
3133+ BOOL lResult = CreateProcessW(
3134+ const_cast<LPCWSTR>(lExec.c_str()),
3135+ pwszParam, 0, 0, false,
3136+ CREATE_DEFAULT_ERROR_MODE, 0, 0,
3137+ &siStartupInfo, &piProcessInfo);
3138+
3139+ if (lResult) {
3140+ // Watch the process
3141+ aProcessListener.reset(new ProcessListener(piProcessInfo.dwProcessId, &onExitProcess));
3142+ }
3143+ else {
3144+ // CreateProcess failed
3145+ iReturnVal = GetLastError();
3146+ LPVOID lpMsgBuf;
3147+ LPVOID lpDisplayBuf;
3148+
3149+ FormatMessage(
3150+ FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
3151+ NULL,
3152+ iReturnVal,
3153+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
3154+ (LPTSTR) &lpMsgBuf,
3155+ 0, NULL);
3156+
3157+ // Display the error message and exit the process
3158+
3159+ lpDisplayBuf = (LPVOID)LocalAlloc(
3160+ LMEM_ZEROINIT,
3161+ (lstrlen((LPCTSTR)lpMsgBuf) + 40) * sizeof(TCHAR));
3162+
3163+ StringCchPrintf(
3164+ (LPTSTR)lpDisplayBuf,
3165+ LocalSize(lpDisplayBuf) / sizeof(TCHAR),
3166+ TEXT("Error (%d) when starting zorba: %s"),
3167+ iReturnVal,
3168+ lpMsgBuf);
3169+
3170+ std::wstring lErrorW((wchar_t*)lpDisplayBuf);
3171+ std::string lError;
3172+ lError.assign(lErrorW.begin(), lErrorW.end());
3173+ std::cout << lError << std::endl;
3174+
3175+ LocalFree(lpMsgBuf);
3176+ LocalFree(lpDisplayBuf);
3177+ }
3178+
3179+ // Free memory
3180+ delete[]pwszParam;
3181+ pwszParam = 0;
3182+
3183+ // Release handles
3184+ CloseHandle(piProcessInfo.hProcess);
3185+ CloseHandle(piProcessInfo.hThread);
3186+
3187+ return iReturnVal;
3188+
3189+#else
3190+ // ************************
3191+ // start a process on Linux
3192+
3193+ pid_t pID = fork();
3194+ if (pID == 0) {
3195+ // Code only executed by child process
3196+ std::stringstream lCommand;
3197+ lCommand << aExec;
3198+ for (std::vector<std::string>::size_type j = 0; j < aArgs.size(); j++) {
3199+ lCommand << " " << aArgs.at(j);
3200+ }
3201+
3202+ int lRes = system(lCommand.str().c_str());
3203+ exit(lRes);
3204+ }
3205+ else {
3206+ // Code only executed by parent process
3207+ if (pID < 0) {
3208+ std::cerr << "Failed to fork Zorba" << std::endl;
3209+ return pID;
3210+ }
3211+
3212+ // Watch the process
3213+ aProcessListener.reset(new ProcessListener(pID, &onExitProcess));
3214+
3215+ return 0;
3216+ }
3217+#endif
3218+}
3219+
3220+void printUsage(std::string& aProgram)
3221+{
3222+ std::cerr << "Usage:" << std::endl
3223+ << " " << aProgram << " <zorba_arguments>" << std::endl
3224+ << " this will start a debugger command line and a zorba process with the given arguments" << std::endl;
3225+}
3226+
3227+bool
3228+processArguments(
3229+ int argc,
3230+ char* argv[],
3231+ std::string& aProgram,
3232+ bool& aStandalone,
3233+ std::string& aZorba,
3234+ unsigned int& aPort,
3235+ std::vector<std::string>& aZorbaArgs)
3236+{
3237+ aPort = 28028;
3238+
3239+ // find the path to Zorba and this executable name
3240+ aProgram = argv[0];
3241+
3242+#ifdef WIN32
3243+ char lSep = '\\';
3244+#else
3245+ char lSep = '/';
3246+#endif
3247+ std::string::size_type lPos = aProgram.find_last_of(lSep);
3248+
3249+ std::stringstream lZs;
3250+
3251+ if (lPos == aProgram.npos) {
3252+ lZs << "." << lSep;
3253+ } else {
3254+ lZs << aProgram.substr(0, lPos + 1);
3255+ aProgram = aProgram.substr(lPos + 1);
3256+ }
3257+ lZs << "zorba";
3258+#ifdef WIN32
3259+ lZs << ".exe";
3260+#endif
3261+ aZorba = lZs.str();
3262+
3263+
3264+ bool lHasFileArg = false;
3265+ bool lHasQueryArg = false;
3266+ bool lHasQueryVal = false;
3267+
3268+ // find if the user asked for help or specified a specific port
3269+ for (int i = 1; i < argc; i++) {
3270+ std::string lArg = argv[i];
3271+ if (lArg == "-h" || lArg == "--help") {
3272+ return false;
3273+ }
3274+ else if (lArg == "-p" || lArg == "--debug-port") {
3275+ // if there is one more argument
3276+ if (i < argc - 1) {
3277+ // get the port value
3278+ int lPort;
3279+ std::stringstream lStream(argv[i + 1]);
3280+ lStream >> lPort;
3281+ if (!lStream.fail()) {
3282+ aPort = lPort;
3283+ }
3284+ }
3285+ }
3286+ else if (lArg == "-f") {
3287+ lHasFileArg = true;
3288+ }
3289+ else if (lArg == "-q") {
3290+ lHasQueryArg = true;
3291+ if (++i < argc) {
3292+ lHasQueryVal = true;
3293+ }
3294+ }
3295+ }
3296+
3297+ if (!lHasFileArg || !lHasQueryArg || !lHasQueryVal) {
3298+ std::cout << "Not enough arguments to start Zorba." << std::endl;
3299+ std::cout << "Running the standalone XQuery debugger client on port: " << aPort << std::endl;
3300+ return true;
3301+ }
3302+
3303+ // zorba will need the -d flag
3304+ aZorbaArgs.push_back("-d");
3305+
3306+ // gather all arguments (excepting the program name)
3307+ for (int i = 1; i < argc; i++) {
3308+ aZorbaArgs.push_back(argv[i]);
3309+ }
3310+
3311+ aStandalone = false;
3312+ return true;
3313+}
3314
3315 #ifndef _WIN32_WCE
3316 int
3317@@ -28,24 +302,72 @@
3318 _tmain(int argc, _TCHAR* argv[])
3319 #endif
3320 {
3321- int port = 28028;
3322- if (argv[1]) {
3323- std::stringstream stream(argv[1]);
3324- stream >> port;
3325- if (stream.fail() || argv[2]) {
3326- std::cerr << "Unknown argument. USAGE: " << argv[0] << " [PORT]" << std::endl;
3327- return 2;
3328+#ifdef WIN32
3329+ SetConsoleCtrlHandler(ctrlC_Handler, TRUE);
3330+#else
3331+ signal(SIGINT, ctrlC_Handler);
3332+#endif
3333+
3334+ // **************************************************************************
3335+ // processing arguments
3336+
3337+ std::string lProgram, lZorbaExec;
3338+ unsigned int lPort = 28028;
3339+ std::vector<std::string> lZorbaArgs;
3340+
3341+ bool lStandalone = true;
3342+ if (!processArguments(argc, argv, lProgram, lStandalone, lZorbaExec, lPort, lZorbaArgs)) {
3343+ printUsage(lProgram);
3344+ return 1;
3345+ }
3346+
3347+#ifndef NDEBUG
3348+ // **************************************************************************
3349+ // debug reporting
3350+
3351+ if (!lStandalone) {
3352+ std::cout << "Communication port: " << lPort << std::endl;
3353+ std::cout << "Zorba executable: " << lZorbaExec << std::endl;
3354+ std::cout << "Zorba arguments: ";
3355+ for (std::vector<std::string>::size_type j = 0; j < lZorbaArgs.size(); j++) {
3356+ std::cout << lZorbaArgs.at(j) << " ";
3357 }
3358+ std::cout << std::endl;
3359 }
3360+#endif
3361+
3362 try {
3363- LockFreeQueue<std::size_t> lQueue;
3364- LockFreeQueue<bool> lContEvent;
3365- EventHandler lHandler(lQueue, lContEvent);
3366- CommandLine cli;
3367- CommandLineHandler handler(port, lQueue, lContEvent, lHandler, cli);
3368- handler.execute();
3369+ // **************************************************************************
3370+ // start a zorba
3371+
3372+ // This is a process listener used to watch the Zorba process termination.
3373+ std::auto_ptr<ProcessListener> lProcessListener;
3374+
3375+ if (!lStandalone) {
3376+ int lResult = startZorba(lZorbaExec, lZorbaArgs, lProcessListener);
3377+ if (lResult) {
3378+ return lResult;
3379+ }
3380+ } else {
3381+ std::cout << "Listening for an incomming Zorba connection on port " << lPort << "..." << std::endl;
3382+ }
3383+
3384+ // **************************************************************************
3385+ // start the debugger command line
3386+
3387+ theClient.reset(new XqdbClient(lPort));
3388+ theClient->start();
3389+
3390 } catch (...) {
3391- return 4;
3392- }
3393+ return -1;
3394+ }
3395+
3396+#ifndef WIN32
3397+ XqdbClient* lClient = theClient.release();
3398+ if (lClient) {
3399+ delete lClient;
3400+ }
3401+#endif
3402+
3403 return 0;
3404 }
3405
3406=== added file 'bin/debugger/process_listener.cpp'
3407--- bin/debugger/process_listener.cpp 1970-01-01 00:00:00 +0000
3408+++ bin/debugger/process_listener.cpp 2012-03-23 17:30:28 +0000
3409@@ -0,0 +1,105 @@
3410+/*
3411+ * Copyright 2006-2008 The FLWOR Foundation.
3412+ *
3413+ * Licensed under the Apache License, Version 2.0 (the "License");
3414+ * you may not use this file except in compliance with the License.
3415+ * You may obtain a copy of the License at
3416+ *
3417+ * http://www.apache.org/licenses/LICENSE-2.0
3418+ *
3419+ * Unless required by applicable law or agreed to in writing, software
3420+ * distributed under the License is distributed on an "AS IS" BASIS,
3421+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3422+ * See the License for the specific language governing permissions and
3423+ * limitations under the License.
3424+ */
3425+
3426+#include "process_listener.h"
3427+
3428+#include <iostream>
3429+
3430+#ifdef ZORBA_HAVE_PTHREAD_H
3431+# include <cassert>
3432+#endif
3433+
3434+
3435+namespace zorba { namespace debugger {
3436+
3437+ProcessListener::ProcessListener(ProcessId aProcessID, ExitCallbackType aCallback)
3438+ : theProcessID(aProcessID), theCallback(aCallback)
3439+{
3440+#ifdef WIN32
3441+ theThread = CreateThread(NULL, 0, &run, (void*) this, 0, &theThreadId);
3442+#else
3443+ if (pthread_create(&theThread, NULL, &run, (void*) this)) {
3444+ assert(false);
3445+ }
3446+#endif
3447+}
3448+
3449+ProcessListener::~ProcessListener()
3450+{
3451+}
3452+
3453+ProcessId
3454+ProcessListener::getProcessID()
3455+{
3456+ return theProcessID;
3457+}
3458+
3459+ExitCallbackType
3460+ProcessListener::getCallback()
3461+{
3462+ return theCallback;
3463+}
3464+
3465+
3466+ZORBA_THREAD_RETURN
3467+ProcessListener::run(void* params)
3468+{
3469+ ProcessListener* lThis = static_cast<ProcessListener*>(params);
3470+ ExitCode lExitCode = -1;
3471+ ProcessId lPid = lThis->getProcessID();
3472+
3473+#ifdef WIN32
3474+ HANDLE lProcessHandle = OpenProcess(SYNCHRONIZE, false, lPid);
3475+ if (lProcessHandle != NULL) {
3476+ // wait for the process to exit
3477+ DWORD lResult = WaitForSingleObject(lProcessHandle, INFINITE);
3478+
3479+ // find out the process exit code if possible
3480+ if (!GetExitCodeProcess(lProcessHandle, &lExitCode)) {
3481+ lExitCode = -1;
3482+ }
3483+ DWORD dw = GetLastError();
3484+
3485+ // wait a little for zorba to dump the garbage
3486+ Sleep(1000);
3487+ }
3488+#else
3489+ int lChildExitStatus;
3490+
3491+ // wait for the process to exit
3492+ waitpid(lPid, &lChildExitStatus, 0);
3493+
3494+ // find out the process exit code if possible
3495+ if (WIFEXITED(lChildExitStatus)) {
3496+ lExitCode = WEXITSTATUS(lChildExitStatus);
3497+ }
3498+
3499+ // wait a little for zorba to dump the garbage
3500+ sleep(1);
3501+#endif
3502+
3503+ // and call the callback when this happened
3504+ ExitCallbackType lCallback = lThis->getCallback();
3505+ lCallback(lExitCode);
3506+
3507+ for (int i = 0; i < 10; i++) {
3508+ std::cout << i << std::endl;
3509+ }
3510+ return NULL;
3511+}
3512+
3513+} // namespace zorba
3514+} // namespace debugger
3515
3516=== added file 'bin/debugger/process_listener.h'
3517--- bin/debugger/process_listener.h 1970-01-01 00:00:00 +0000
3518+++ bin/debugger/process_listener.h 2012-03-23 17:30:28 +0000
3519@@ -0,0 +1,75 @@
3520+/*
3521+ * Copyright 2006-2008 The FLWOR Foundation.
3522+ *
3523+ * Licensed under the Apache License, Version 2.0 (the "License");
3524+ * you may not use this file except in compliance with the License.
3525+ * You may obtain a copy of the License at
3526+ *
3527+ * http://www.apache.org/licenses/LICENSE-2.0
3528+ *
3529+ * Unless required by applicable law or agreed to in writing, software
3530+ * distributed under the License is distributed on an "AS IS" BASIS,
3531+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3532+ * See the License for the specific language governing permissions and
3533+ * limitations under the License.
3534+ */
3535+#pragma once
3536+#ifndef ZORBA_DEBUGGER_PROCESS_LISTENER_H
3537+#define ZORBA_DEBUGGER_PROCESS_LISTENER_H
3538+
3539+#include <zorba/config.h>
3540+
3541+#ifdef ZORBA_HAVE_PTHREAD_H
3542+# include <pthread.h>
3543+# include <sys/wait.h>
3544+ typedef pthread_t ThreadId;
3545+ typedef pid_t ProcessId;
3546+ typedef int ExitCode;
3547+# define ZORBA_THREAD_RETURN void *
3548+#else
3549+# include <windows.h>
3550+ typedef DWORD ThreadId;
3551+ typedef DWORD ProcessId;
3552+ typedef DWORD ExitCode;
3553+# define ZORBA_THREAD_RETURN DWORD WINAPI
3554+#endif
3555+
3556+typedef void (*ExitCallbackType)(ExitCode);
3557+
3558+
3559+namespace zorba { namespace debugger {
3560+
3561+class ProcessListener
3562+{
3563+ public:
3564+ ProcessListener(ProcessId processID, ExitCallbackType callback);
3565+
3566+ ~ProcessListener();
3567+
3568+ ProcessId
3569+ getProcessID();
3570+
3571+ ExitCallbackType
3572+ getCallback();
3573+
3574+ private:
3575+
3576+ static ZORBA_THREAD_RETURN run(void* params);
3577+
3578+ private:
3579+
3580+#ifdef ZORBA_HAVE_PTHREAD_H
3581+ pthread_t theThread;
3582+#else
3583+ ThreadId theThreadId;
3584+ HANDLE theThread;
3585+#endif
3586+
3587+ ProcessId theProcessID;
3588+ ExitCallbackType theCallback;
3589+};
3590+
3591+} // namespace zorba
3592+} // namespace debugger
3593+
3594+#endif // ZORBA_DEBUGGER_PROCESS_LISTENER_H
3595
3596=== modified file 'bin/debugger/tuple.h'
3597--- bin/debug_client/tuple.h 2011-07-04 08:05:46 +0000
3598+++ bin/debugger/tuple.h 2012-03-23 17:30:28 +0000
3599@@ -14,9 +14,15 @@
3600 * limitations under the License.
3601 */
3602 #pragma once
3603+#ifndef ZORBA_DEBUGGER_TUPLE_H
3604+#define ZORBA_DEBUGGER_TUPLE_H
3605+
3606 #include <zorba/config.h>
3607+
3608 #if ZORBA_TR1_IN_TR1_SUBDIRECTORY
3609 # include <tr1/tuple>
3610 #else
3611 # include <tuple>
3612 #endif
3613+
3614+#endif // ZORBA_DEBUGGER_TUPLE_H
3615
3616=== added file 'bin/debugger/xqdb_client.cpp'
3617--- bin/debugger/xqdb_client.cpp 1970-01-01 00:00:00 +0000
3618+++ bin/debugger/xqdb_client.cpp 2012-03-23 17:30:28 +0000
3619@@ -0,0 +1,63 @@
3620+/*
3621+ * Copyright 2006-2008 The FLWOR Foundation.
3622+ *
3623+ * Licensed under the Apache License, Version 2.0 (the "License");
3624+ * you may not use this file except in compliance with the License.
3625+ * You may obtain a copy of the License at
3626+ *
3627+ * http://www.apache.org/licenses/LICENSE-2.0
3628+ *
3629+ * Unless required by applicable law or agreed to in writing, software
3630+ * distributed under the License is distributed on an "AS IS" BASIS,
3631+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3632+ * See the License for the specific language governing permissions and
3633+ * limitations under the License.
3634+ */
3635+
3636+#include "xqdb_client.h"
3637+
3638+#include <iostream>
3639+
3640+#ifdef ZORBA_HAVE_PTHREAD_H
3641+# include <cassert>
3642+#endif
3643+
3644+
3645+namespace zorba { namespace debugger {
3646+
3647+XqdbClient::XqdbClient(unsigned int aPort)
3648+{
3649+ theIdQueue = new LockFreeQueue<std::size_t>();
3650+ theQuitQueue = new LockFreeQueue<bool>();
3651+ theEventHandler = new EventHandler(*theIdQueue, *theQuitQueue);
3652+ theEventHandler->init();
3653+
3654+ theCommandPrompt = new CommandPrompt();
3655+ theCommandLineHandler = new CommandLineHandler(aPort, *theIdQueue, *theQuitQueue, theEventHandler, theCommandPrompt);
3656+}
3657+
3658+XqdbClient::~XqdbClient()
3659+{
3660+ if (theCommandLineHandler) {
3661+ delete theCommandLineHandler;
3662+ }
3663+ if (theCommandPrompt) {
3664+ delete theCommandPrompt;
3665+ }
3666+ if (theEventHandler) {
3667+ delete theEventHandler;
3668+ }
3669+
3670+ delete theIdQueue;
3671+ delete theQuitQueue;
3672+}
3673+
3674+void
3675+XqdbClient::start()
3676+{
3677+ theCommandLineHandler->execute();
3678+}
3679+
3680+
3681+} // namespace zorba
3682+} // namespace debugger
3683
3684=== added file 'bin/debugger/xqdb_client.h'
3685--- bin/debugger/xqdb_client.h 1970-01-01 00:00:00 +0000
3686+++ bin/debugger/xqdb_client.h 2012-03-23 17:30:28 +0000
3687@@ -0,0 +1,51 @@
3688+/*
3689+ * Copyright 2006-2008 The FLWOR Foundation.
3690+ *
3691+ * Licensed under the Apache License, Version 2.0 (the "License");
3692+ * you may not use this file except in compliance with the License.
3693+ * You may obtain a copy of the License at
3694+ *
3695+ * http://www.apache.org/licenses/LICENSE-2.0
3696+ *
3697+ * Unless required by applicable law or agreed to in writing, software
3698+ * distributed under the License is distributed on an "AS IS" BASIS,
3699+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3700+ * See the License for the specific language governing permissions and
3701+ * limitations under the License.
3702+ */
3703+#pragma once
3704+#ifndef ZORBA_DEBUGGER_XQDB_CLIENT_H
3705+#define ZORBA_DEBUGGER_XQDB_CLIENT_H
3706+
3707+#include "command_prompt.h"
3708+#include "command_line_handler.h"
3709+
3710+
3711+namespace zorba { namespace debugger {
3712+
3713+class XqdbClient {
3714+
3715+ public:
3716+
3717+ XqdbClient(unsigned int aPort);
3718+
3719+ ~XqdbClient();
3720+
3721+ void
3722+ start();
3723+
3724+ private:
3725+
3726+ LockFreeQueue<std::size_t>* theIdQueue;
3727+ LockFreeQueue<bool>* theQuitQueue;
3728+
3729+ EventHandler* theEventHandler;
3730+ CommandPrompt* theCommandPrompt;
3731+ CommandLineHandler* theCommandLineHandler;
3732+};
3733+
3734+
3735+} // namespace zorba
3736+} // namespace debugger
3737+
3738+#endif // ZORBA_DEBUGGER_XQDB_CLIENT_H
3739
3740=== renamed file 'bin/module_path.cpp' => 'bin/path_util.cpp'
3741--- bin/module_path.cpp 2011-05-25 16:40:26 +0000
3742+++ bin/path_util.cpp 2012-03-23 17:30:28 +0000
3743@@ -14,85 +14,100 @@
3744 * limitations under the License.
3745 */
3746
3747-#include "module_path.h"
3748+#include "path_util.h"
3749
3750 #include <stdlib.h>
3751-#include "zorba/zorba_string.h"
3752+//#include "zorba/zorba_string.h"
3753 #include "zorba/util/path.h"
3754
3755 #include "util.h"
3756 #include "zorbacmdproperties.h"
3757+#include <zorba/static_context.h>
3758
3759 namespace zorba {
3760
3761-std::string
3762-ModulePath::getEnvironmentModulePath()
3763+namespace PathUtil {
3764+
3765+static std::string
3766+getPathFromEnvironment(std::string const& aEnvVar)
3767 {
3768- std::string lEnvName("ZORBA_MODULE_PATH");
3769 #ifdef WIN32
3770 char* lBuffer;
3771 size_t lLen=0;
3772- errno_t lErr = getenv_s(&lLen, NULL, 0, lEnvName.c_str());
3773+ errno_t lErr = getenv_s(&lLen, NULL, 0, aEnvVar.c_str());
3774 if (lErr || !lLen) return "";
3775 lBuffer = (char*)malloc(lLen * sizeof(char));
3776 if (!lBuffer) return "";
3777- getenv_s(&lLen, lBuffer, lLen, lEnvName.c_str());
3778+ getenv_s(&lLen, lBuffer, lLen, aEnvVar.c_str());
3779 std::string lRes(lBuffer);
3780 free(lBuffer);
3781 return lRes;
3782 #else
3783- const char* lEnvValue = getenv(lEnvName.c_str());
3784- return lEnvValue!=0?lEnvValue:"";
3785+ const char* lEnvValue = getenv(aEnvVar.c_str());
3786+ return lEnvValue != 0 ? lEnvValue : "";
3787 #endif
3788 }
3789
3790-void
3791-ModulePath::convertVector(
3792- const std::vector<std::string>& aSource,
3793- std::vector<String>& aDest)
3794-{
3795- for (std::vector<std::string>::const_iterator lIter = aSource.begin();
3796- lIter != aSource.end(); ++lIter) {
3797- aDest.push_back(*lIter);
3798- }
3799-}
3800
3801-void
3802-ModulePath::tokenizeModulePath(
3803- const std::string& aModulePath,
3804- std::vector<std::string>& aResult)
3805+static void
3806+tokenizePath(
3807+ const std::string& aPathStr,
3808+ std::vector<String>& aResult)
3809 {
3810+ std::vector<std::string> lPath;
3811 #ifdef WIN32
3812- Util::tokenize(aModulePath, ";", aResult);
3813+ Util::tokenize(aPathStr, ";", lPath);
3814 #else
3815- Util::tokenize(aModulePath, ":", aResult);
3816+ Util::tokenize(aPathStr, ":", lPath);
3817 #endif
3818+ for (std::vector<std::string>::iterator lIter = lPath.begin();
3819+ lIter != lPath.end(); ++lIter) {
3820+ aResult.push_back(*lIter);
3821+ }
3822 }
3823
3824 void
3825-ModulePath::getModulePaths(
3826+setPathsOnContext(
3827 const ZorbaCMDProperties& aProperties,
3828- std::vector<String>& aModulePaths)
3829+ StaticContext_t& aStaticCtx)
3830 {
3831- std::vector<std::string> lModulePaths; // result vector
3832- std::string lModulePath; // temporary variable for collections paths
3833-
3834- // 1. add the module paths from the command line properties
3835- aProperties.getModulePaths(lModulePath);
3836-
3837- tokenizeModulePath(lModulePath, lModulePaths);
3838-
3839- // 2. add the module paths from the environment
3840- lModulePath = ModulePath::getEnvironmentModulePath();
3841-
3842- tokenizeModulePath(lModulePath, lModulePaths);
3843-
3844- // 3. add the current working directory as module path
3845+ std::vector<String> lPath;
3846+ std::string lPathStr, lEnvStr;
3847+
3848+ // Compute the current working directory to append to all paths.
3849 filesystem_path lCWD;
3850- lModulePaths.push_back(lCWD.get_path());
3851-
3852- // convert std::string to zorba::String
3853- convertVector(lModulePaths, aModulePaths);
3854+
3855+ // setModulePaths() *overwrites* the URI path and lib path, so there's no
3856+ // sense in calling both. So if either --module-path or ZORBA_MODULE_PATH
3857+ // exists, just use those.
3858+ aProperties.getModulePath(lPathStr);
3859+ lEnvStr = getPathFromEnvironment("ZORBA_MODULE_PATH");
3860+ if (lPathStr.length() > 0 || lEnvStr.length() > 0) {
3861+ tokenizePath(lPathStr, lPath);
3862+ tokenizePath(lEnvStr, lPath);
3863+ lPath.push_back(lCWD.get_path());
3864+ aStaticCtx->setModulePaths(lPath);
3865+ }
3866+ else {
3867+ // Compute and set URI path
3868+ aProperties.getURIPath(lPathStr);
3869+ tokenizePath(lPathStr, lPath);
3870+ lEnvStr = getPathFromEnvironment("ZORBA_URI_PATH");
3871+ tokenizePath(lEnvStr, lPath);
3872+ lPath.push_back(lCWD.get_path());
3873+ aStaticCtx->setURIPath(lPath);
3874+ lPath.clear();
3875+
3876+ // Compute and set lib path
3877+ aProperties.getLibPath(lPathStr);
3878+ tokenizePath(lPathStr, lPath);
3879+ lEnvStr = getPathFromEnvironment("ZORBA_LIB_PATH");
3880+ lPath.push_back(lCWD.get_path());
3881+ tokenizePath(lEnvStr, lPath);
3882+ aStaticCtx->setLibPath(lPath);
3883+ }
3884 }
3885
3886+} /* namespace ModulePath */
3887+
3888 } /* namespace zorba */
3889
3890=== renamed file 'bin/module_path.h' => 'bin/path_util.h'
3891--- bin/module_path.h 2010-02-12 08:57:04 +0000
3892+++ bin/path_util.h 2012-03-23 17:30:28 +0000
3893@@ -18,6 +18,7 @@
3894
3895 #include <vector>
3896 #include <string>
3897+#include <zorba/api_shared_types.h>
3898
3899 class ZorbaCMDProperties;
3900
3901@@ -25,30 +26,14 @@
3902
3903 class String;
3904
3905- class ModulePath {
3906- protected:
3907- static std::string
3908- getEnvironmentModulePath();
3909-
3910- static void
3911- convertVector(const std::vector<std::string>& aSource,
3912- std::vector<String>& aDest);
3913-
3914- static void
3915- tokenizeModulePath(const std::string& aModulePath,
3916- std::vector<std::string>& aResult);
3917-
3918- static void
3919- getInstalledModulePath(const std::string& aModulePath,
3920- std::vector<std::string>& aResult);
3921-
3922- public:
3923- static void
3924- getModulePaths(const ZorbaCMDProperties& aProperties,
3925- std::vector<String>& aModulePaths);
3926-
3927-
3928- };
3929+ namespace PathUtil {
3930+
3931+ void
3932+ setPathsOnContext(const ZorbaCMDProperties& aProperties,
3933+ zorba::StaticContext_t& aStaticCtx);
3934+
3935+
3936+ }
3937 } /* namespace zorba */
3938
3939 #endif
3940
3941=== modified file 'bin/zorbacmd.cpp'
3942--- bin/zorbacmd.cpp 2011-07-11 11:12:23 +0000
3943+++ bin/zorbacmd.cpp 2012-03-23 17:30:28 +0000
3944@@ -38,12 +38,13 @@
3945 #include <zorba/iterator.h>
3946 #include <zorba/xquery_functions.h>
3947 #include <zorba/uri_resolvers.h>
3948+#include <zorba/serialization_callback.h>
3949
3950 #include <zorba/store_manager.h>
3951
3952 #include "error_printer.h"
3953 #include "util.h"
3954-#include "module_path.h"
3955+#include "path_util.h"
3956
3957 // For setting the base URI from the current directory
3958 #include <zorba/util/path.h>
3959@@ -70,8 +71,26 @@
3960
3961 #ifndef ZORBA_NO_FULL_TEXT
3962 OneToOneURIMapper theStopWordsMapper(EntityData::STOP_WORDS);
3963-OneToOneURIMapper theThesaurusMapper(EntityData::THESAURUS, URIMapper::COMPONENT);
3964+OneToOneURIMapper theThesaurusMapper(EntityData::THESAURUS);
3965 #endif
3966+class URIMapperSerializationCallback : public SerializationCallback
3967+{
3968+ private:
3969+ std::vector<URIMapper*> theURIMappers;
3970+
3971+ public:
3972+ void addURIMapper(URIMapper* lURIMapper)
3973+ {
3974+ theURIMappers.push_back(lURIMapper);
3975+ }
3976+
3977+ virtual URIMapper*
3978+ getURIMapper(size_t i) const
3979+ {
3980+ return theURIMappers[i];
3981+ }
3982+};
3983+URIMapperSerializationCallback theSerializationCallback;
3984
3985 bool
3986 populateStaticContext(
3987@@ -85,10 +104,8 @@
3988 // 2. environment ZORBA_MODULE_PATH
3989 // 3. current working directory
3990 {
3991- std::vector<String> lModulePaths;
3992- ModulePath::getModulePaths(aProperties, lModulePaths);
3993-
3994- aStaticContext->setModulePaths(lModulePaths);
3995+ std::vector<String> lModulePath;
3996+ PathUtil::setPathsOnContext(aProperties, aStaticContext);
3997 }
3998
3999 if (aProperties.boundarySpace().size() != 0 )
4000@@ -151,7 +168,11 @@
4001 for (; lIter != end; ++lIter) {
4002 theStopWordsMapper.addMapping(lIter->uri, lIter->value);
4003 }
4004- aStaticContext->registerURIMapper(&theStopWordsMapper);
4005+ if(aProperties.executePlan()) {
4006+ theSerializationCallback.addURIMapper(&theStopWordsMapper);
4007+ } else {
4008+ aStaticContext->registerURIMapper(&theStopWordsMapper);
4009+ }
4010 }
4011 {
4012 ZorbaCMDProperties::FullText_t::const_iterator lIter = aProperties.thesaurusBegin();
4013@@ -159,7 +180,11 @@
4014 for (; lIter != end; ++lIter) {
4015 theThesaurusMapper.addMapping(lIter->uri, lIter->value);
4016 }
4017- aStaticContext->registerURIMapper(&theThesaurusMapper);
4018+ if(aProperties.executePlan()) {
4019+ theSerializationCallback.addURIMapper(&theStopWordsMapper);
4020+ } else {
4021+ aStaticContext->registerURIMapper(&theThesaurusMapper);
4022+ }
4023 }
4024 #endif
4025 return true;
4026@@ -172,8 +197,8 @@
4027 zorba::DynamicContext* aDynamicContext,
4028 const ZorbaCMDProperties& aProperties)
4029 {
4030- XmlDataManager* lXmlMgr = zorba->getXmlDataManager();
4031 if ( aProperties.contextItem().size() != 0 ) {
4032+ XmlDataManager* lXmlMgr = zorba->getXmlDataManager();
4033 std::ifstream lInStream(aProperties.contextItem().c_str());
4034 Item lDoc = lXmlMgr->parseXML(lInStream);
4035 aDynamicContext->setContextItem(lDoc);
4036@@ -189,6 +214,7 @@
4037 {
4038 if ((*lIter).inline_file)
4039 {
4040+ XmlDataManager* lXmlMgr = zorba->getXmlDataManager();
4041 std::ifstream lInStream((*lIter).var_value.c_str());
4042 Item lDoc = lXmlMgr->parseXML(lInStream);
4043 aDynamicContext->setVariable((*lIter).var_name, lDoc);
4044@@ -505,16 +531,30 @@
4045 unsigned long lNumExecutions = properties.multiple();
4046 bool lIndent = properties.indent();
4047 bool doTiming = properties.timing();
4048-
4049+ bool compilePlan = properties.compilePlan();
4050+ bool executePlan = properties.executePlan();
4051+ std::ostringstream lOut;
4052 Zorba_CompilerHints lHints;
4053
4054 // default is O1 in the Zorba_CompilerHints constructor
4055- if (properties.optimizationLevel() == "O0") {
4056+ if (properties.optimizationLevel() == "O0")
4057+ {
4058 lHints.opt_level = ZORBA_OPT_LEVEL_O0;
4059- } else if (properties.optimizationLevel() == "O2") {
4060+ }
4061+ else if (properties.optimizationLevel() == "O2")
4062+ {
4063 lHints.opt_level = ZORBA_OPT_LEVEL_O2;
4064 }
4065
4066+ lHints.for_serialization_only = true;
4067+
4068+#if ZORBACMD_LOAD_SYSTEM_PROPERTIES
4069+ if (Properties::instance()->serializeOnlyQuery() == 0)
4070+ {
4071+ lHints.for_serialization_only = false;
4072+ }
4073+#endif
4074+
4075 // default is false
4076 if (properties.libModule())
4077 {
4078@@ -558,7 +598,11 @@
4079 query->registerDiagnosticHandler(&diagnosticHandler);
4080 query->setFileName(qfilepath);
4081
4082- query->compile(qfile, staticContext, lHints);
4083+ if(executePlan) {
4084+ query->loadExecutionPlan(qfile, &theSerializationCallback);
4085+ } else {
4086+ query->compile(qfile, staticContext, lHints);
4087+ }
4088
4089 if (doTiming)
4090 {
4091@@ -577,8 +621,6 @@
4092 return 12;
4093 }
4094
4095- // if (diagnosticHandler.
4096-
4097 //
4098 // Create and populate the dynamic context
4099 //
4100@@ -623,7 +665,11 @@
4101 }
4102 else
4103 {
4104- query->execute(outputStream, &lSerOptions);
4105+ if (compilePlan) {
4106+ query->saveExecutionPlan(outputStream, ZORBA_USE_BINARY_ARCHIVE, SAVE_UNUSED_FUNCTIONS);
4107+ } else {
4108+ query->execute(outputStream, &lSerOptions);
4109+ }
4110 if (properties.trailingNl()) {
4111 outputStream << std::endl;
4112 }
4113@@ -661,19 +707,22 @@
4114 XmlDataManager* store = zorbaInstance->getXmlDataManager();
4115
4116 timing.startTimer(TimingInfo::UNLOAD_TIMER, i);
4117+
4118 DocumentManager* lMgr = store->getDocumentManager();
4119 ItemSequence_t lSeq = lMgr->availableDocuments();
4120 Iterator_t lIter = lSeq->getIterator();
4121 lIter->open();
4122 Item lURI;
4123- while (lIter->next(lURI)) {
4124+ while (lIter->next(lURI))
4125+ {
4126 lMgr->remove(lURI.getStringValue());
4127 }
4128+
4129 timing.stopTimer(TimingInfo::UNLOAD_TIMER, i);
4130
4131 timing.stopTimer(TimingInfo::TOTAL_TIMER, i);
4132 }
4133- }
4134+ } // for each execution
4135
4136 return 0;
4137 }
4138@@ -704,7 +753,7 @@
4139 return 1;
4140 }
4141
4142- TimingInfo timing(lProperties.multiple());
4143+ TimingInfo engineTiming(lProperties.multiple());
4144
4145 bool doTiming = lProperties.timing();
4146 bool debug = false;
4147@@ -741,14 +790,14 @@
4148
4149 // Start the engine
4150
4151- timing.startTimer(TimingInfo::INIT_TIMER, 2);
4152+ engineTiming.startTimer(TimingInfo::INIT_TIMER, 2);
4153
4154 void* store = zorba::StoreManager::getStore();
4155
4156 zorba::Zorba* lZorbaInstance = zorba::Zorba::getInstance(store);
4157
4158 {
4159- timing.stopTimer(TimingInfo::INIT_TIMER, 2);
4160+ engineTiming.stopTimer(TimingInfo::INIT_TIMER, 2);
4161
4162 // For each query ...
4163
4164@@ -770,14 +819,14 @@
4165 if (asFile)
4166 {
4167 path.resolve_relative ();
4168- qfile.reset (new std::ifstream (path.c_str ()));
4169+ qfile.reset(new std::ifstream (path.c_str ()));
4170 }
4171 else
4172 {
4173- qfile.reset (new std::istringstream(fURI));
4174+ qfile.reset(new std::istringstream(fURI));
4175 }
4176
4177- if ( asFile && (!qfile->good() || qfile->eof()) )
4178+ if (asFile && (!qfile->good() || qfile->eof()))
4179 {
4180 std::cerr << "file {" << fname << "} not found or not readable." << std::endl;
4181 lProperties.printHelp(std::cout);
4182@@ -793,7 +842,8 @@
4183 //
4184 // Print the query if requested
4185 //
4186- if (lProperties.printQuery()) {
4187+ if (lProperties.printQuery())
4188+ {
4189 *lOutputStream << "\nQuery number " << queryNo << " :\n";
4190 std::copy (std::istreambuf_iterator<char> (*qfile),
4191 std::istreambuf_iterator<char> (),
4192@@ -836,8 +886,10 @@
4193 }
4194
4195 // Parse the query
4196- if (lProperties.parseOnly()) {
4197- try {
4198+ if (lProperties.parseOnly())
4199+ {
4200+ try
4201+ {
4202 zorba::XQuery_t lQuery = lZorbaInstance->createQuery();
4203 if (asFile) {
4204 lQuery->setFileName(path.get_path());
4205@@ -845,7 +897,8 @@
4206
4207 lQuery->parse (*qfile);
4208 }
4209- catch (zorba::ZorbaException const& ze) {
4210+ catch (zorba::ZorbaException const& ze)
4211+ {
4212 std::cerr << ze << std::endl;
4213 return 6;
4214 }
4215@@ -853,30 +906,44 @@
4216
4217 // Compile and run it if necessary.
4218 // Print timing information if requested.
4219- else if (!debug) {
4220- if (compileOnly) {
4221- try {
4222+ else if (!debug)
4223+ {
4224+ if (compileOnly)
4225+ {
4226+ try
4227+ {
4228 zorba::XQuery_t aQuery = lZorbaInstance->createQuery();
4229- if (asFile) {
4230+ if (asFile)
4231+ {
4232 aQuery->setFileName(path.get_path());
4233 }
4234+
4235 aQuery->parse(*qfile);
4236+
4237 qfile->clear();
4238 qfile->seekg(0); // go back to the beginning
4239- } catch (zorba::XQueryException const& qe) {
4240- ErrorPrinter::print(qe, std::cerr, lProperties.printErrorsAsXml(), lProperties.indent());
4241+ }
4242+ catch (zorba::XQueryException const& qe)
4243+ {
4244+ ErrorPrinter::print(qe,
4245+ std::cerr,
4246+ lProperties.printErrorsAsXml(),
4247+ lProperties.indent());
4248 return 6;
4249 }
4250 }
4251
4252+ TimingInfo queryTiming(lProperties.multiple());
4253+
4254 int status = compileAndExecute(lZorbaInstance,
4255 lProperties,
4256 lStaticContext,
4257 path.get_path(),
4258 *qfile,
4259 *lOutputStream,
4260- timing);
4261- if (status != 0) {
4262+ queryTiming);
4263+ if (status != 0)
4264+ {
4265 // reset the file handler (in case output option was provided)
4266 // in order to delete the created output file
4267 lFileStream.reset();
4268@@ -884,21 +951,25 @@
4269 return status;
4270 }
4271
4272- if (doTiming) {
4273- timing.print(std::cout);
4274+ if (doTiming)
4275+ {
4276+ queryTiming.print(std::cout);
4277 }
4278 }
4279
4280 #ifdef ZORBA_WITH_DEBUGGER
4281 // Debug the query. Do not allow "compileOnly" flags and inline queries
4282- else if (debug) {
4283- if (compileOnly) {
4284+ else if (debug)
4285+ {
4286+ if (compileOnly)
4287+ {
4288 std::cerr << "cannot debug a query if the compileOnly option is specified"
4289 << std::endl;
4290 return 7;
4291 }
4292
4293- if (!asFile) {
4294+ if (!asFile)
4295+ {
4296 std::cerr << "Cannot debug inline queries." << std::endl;
4297 return 8;
4298 }
4299@@ -908,7 +979,8 @@
4300
4301 zorba::XQuery_t lQuery;
4302
4303- try {
4304+ try
4305+ {
4306 lQuery = lZorbaInstance->createQuery();
4307 lQuery->setFileName(lFileName);
4308 lQuery->setDebugMode(true);
4309@@ -927,21 +999,24 @@
4310 lHost = "127.0.0.1";
4311 }
4312
4313- if (lProperties.debug()) {
4314- Zorba_SerializerOptions lSerOptions =
4315- Zorba_SerializerOptions::SerializerOptionsFromStringParams(
4316- lProperties.getSerializerParameters());
4317- createSerializerOptions(lSerOptions, lProperties);
4318+ Zorba_SerializerOptions lSerOptions =
4319+ Zorba_SerializerOptions::SerializerOptionsFromStringParams(
4320+ lProperties.getSerializerParameters());
4321+ createSerializerOptions(lSerOptions, lProperties);
4322
4323- if (!lProperties.hasNoLogo() && !lProperties.debug()) {
4324- std::cout << "Zorba XQuery Debugger Server\n" << copyright_str << std::endl;
4325- }
4326- lQuery->debug(*lOutputStream, lSerOptions, lHost, lProperties.getDebugPort());
4327+ if (!lProperties.hasNoLogo())
4328+ {
4329+ std::cout << "Zorba XQuery Debugger Server\n" << copyright_str << std::endl;
4330 }
4331+
4332+ lQuery->debug(*lOutputStream, lSerOptions, lHost, lProperties.getDebugPort());
4333 }
4334 catch (zorba::XQueryException const& qe)
4335 {
4336- ErrorPrinter::print(qe, std::cerr, lProperties.printErrorsAsXml(), lProperties.indent());
4337+ ErrorPrinter::print(qe,
4338+ std::cerr,
4339+ lProperties.printErrorsAsXml(),
4340+ lProperties.indent());
4341 return 5;
4342 }
4343 catch (zorba::ZorbaException const& ze)
4344@@ -958,7 +1033,7 @@
4345
4346 if (doTiming)
4347 {
4348- timing.startTimer(TimingInfo::DEINIT_TIMER, 2);
4349+ engineTiming.startTimer(TimingInfo::DEINIT_TIMER, 2);
4350 }
4351
4352 lZorbaInstance->shutdown();
4353@@ -966,11 +1041,11 @@
4354
4355 if (doTiming)
4356 {
4357- timing.stopTimer(TimingInfo::DEINIT_TIMER, 2);
4358+ engineTiming.stopTimer(TimingInfo::DEINIT_TIMER, 2);
4359
4360 std::cout << std::endl << "Engine Shutdown Time : "
4361- << timing.elapsedDeinitWalltime
4362- << " (user: " << timing.elapsedDeinitCputime << ")"
4363+ << engineTiming.elapsedDeinitWalltime
4364+ << " (user: " << engineTiming.elapsedDeinitCputime << ")"
4365 << " milliseconds" << std::endl;
4366 }
4367 return 0;
4368
4369=== modified file 'bin/zorbacmdproperties.cpp'
4370--- bin/zorbacmdproperties.cpp 2011-07-21 19:21:25 +0000
4371+++ bin/zorbacmdproperties.cpp 2012-03-23 17:30:28 +0000
4372@@ -166,11 +166,20 @@
4373 }
4374
4375
4376-void ZorbaCMDProperties::getModulePaths(std::string& aPaths) const
4377-{
4378- aPaths = theModulePath;
4379-}
4380-
4381+void ZorbaCMDProperties::getModulePath(std::string& aPath) const
4382+{
4383+ aPath = theModulePath;
4384+}
4385+
4386+void ZorbaCMDProperties::getURIPath(std::string& aPath) const
4387+{
4388+ aPath = theUriPath;
4389+}
4390+
4391+void ZorbaCMDProperties::getLibPath(std::string& aPath) const
4392+{
4393+ aPath = theLibPath;
4394+}
4395
4396 std::vector<std::pair<std::string,std::string> > ZorbaCMDProperties::getSerializerParameters() const
4397 {
4398
4399=== modified file 'bin/zorbacmdproperties.h'
4400--- bin/zorbacmdproperties.h 2011-06-29 17:25:50 +0000
4401+++ bin/zorbacmdproperties.h 2012-03-23 17:30:28 +0000
4402@@ -84,8 +84,14 @@
4403 getSerializerParameters() const;
4404
4405 void
4406- getModulePaths(std::string&) const;
4407+ getModulePath(std::string&) const;
4408
4409+ void
4410+ getURIPath(std::string&) const;
4411+
4412+ void
4413+ getLibPath(std::string&) const;
4414+
4415 bool isDebug(){ return theDebug; }
4416
4417 bool hasNoLogo(){ return theNoLogo; }
4418
4419=== modified file 'bin/zorbacmdproperties.txt'
4420--- bin/zorbacmdproperties.txt 2011-07-04 08:31:01 +0000
4421+++ bin/zorbacmdproperties.txt 2012-03-23 17:30:28 +0000
4422@@ -28,8 +28,12 @@
4423 ("debug-port,p", po::value<unsigned int>()->default_value (28028), "The port on which the DBGP-enabled debugger client listens for connections. Defaults to: 28028")
4424 ("no-logo", "Print no logo when starting.")
4425 ("timeout", po::value<long>()->default_value(-1), "Specify a timeout in seconds. After the specified time, the execution of the query will be aborted.")
4426-("module-path", po::value<std::string>(), "Module paths added to the built-in resolver, i.e. where module imports are looking for modules.")
4427+("uri-path", po::value<std::string>(), "URI path (list of directories) added to the built-in URI resolver, i.e. where to find modules/schemas to import.")
4428+("lib-path", po::value<std::string>(), "Library path (list of directories) where Zorba will look for dynamic libraries (e.g., module external function implementations.")
4429+("module-path", po::value<std::string>(), "Path (list of directories) to add to both the URI and Library paths.")
4430 ("option", po::value<std::vector<std::string> >(), "Set an XQuery option in the static context. The QName of the option is passed as a string in the notation by James Clark (i.e. {namespace}localname). For example, --option {http://www.zorba-xquery.com}option=value").
4431 ("trailing-nl", "Output a trailing newline after the result of the query.")
4432 ("stop-words", po::value<std::vector<std::string> >(), "Mapping specifying a stop-words URI to another.")
4433 ("thesaurus", po::value<std::vector<std::string> >(), "Mapping specifying a thesaurus URI to another.")
4434+("compile-plan,c", "Output the query plan as binary.")
4435+("execute-plan", "Take a query plan as binary and execute it. Binary query plans can be generated using the --compile-plan option.")
4436
4437=== modified file 'bin/zorbacmdproperties_base.h'
4438--- bin/zorbacmdproperties_base.h 2011-07-04 08:31:01 +0000
4439+++ bin/zorbacmdproperties_base.h 2012-03-23 17:30:28 +0000
4440@@ -34,7 +34,7 @@
4441 class ZorbaCMDPropertiesBase : public ::zorba::PropertiesBase {
4442 protected:
4443 const char **get_all_options () const {
4444- static const char *result [] = { "--timing", "--output-file", "--serialization-parameter", "--serialize-html", "--serialize-text", "--indent", "--print-query", "--print-errors-as-xml", "--byte-order-mark", "--omit-xml-declaration", "--base-uri", "--boundary-space", "--default-collation", "--construction-mode", "--ordering-mode", "--multiple", "--query", "--as-files", "--external-variable", "--context-item", "--optimization-level", "--lib-module", "--parse-only", "--compile-only", "--no-serializer", "--debug", "--debug-host", "--debug-port", "--no-logo", "--timeout", "--module-path", "--option", "--trailing-nl", "--stop-words", "--thesaurus", NULL };
4445+ static const char *result [] = { "--timing", "--output-file", "--serialization-parameter", "--serialize-html", "--serialize-text", "--indent", "--print-query", "--print-errors-as-xml", "--byte-order-mark", "--omit-xml-declaration", "--base-uri", "--boundary-space", "--default-collation", "--construction-mode", "--ordering-mode", "--multiple", "--query", "--as-files", "--external-variable", "--context-item", "--optimization-level", "--lib-module", "--parse-only", "--compile-only", "--no-serializer", "--debug", "--debug-host", "--debug-port", "--no-logo", "--timeout", "--uri-path", "--lib-path", "--module-path", "--option", "--trailing-nl", "--stop-words", "--thesaurus", "--compile-plan", "--execute-plan", NULL };
4446 return result;
4447 }
4448 bool theTiming;
4449@@ -67,11 +67,15 @@
4450 unsigned int theDebugPort;
4451 bool theNoLogo;
4452 long theTimeout;
4453+ std::string theUriPath;
4454+ std::string theLibPath;
4455 std::string theModulePath;
4456 std::vector<std::string> theOption;
4457 bool theTrailingNl;
4458 std::vector<std::string> theStopWords;
4459 std::vector<std::string> theThesaurus;
4460+ bool theCompilePlan;
4461+ bool theExecutePlan;
4462
4463 void initialize () {
4464 theTiming = false;
4465@@ -95,6 +99,8 @@
4466 theNoLogo = false;
4467 theTimeout = -1;
4468 theTrailingNl = false;
4469+ theCompilePlan = false;
4470+ theExecutePlan = false;
4471 }
4472 public:
4473 const bool &timing () const { return theTiming; }
4474@@ -127,11 +133,15 @@
4475 const unsigned int &debugPort () const { return theDebugPort; }
4476 const bool &noLogo () const { return theNoLogo; }
4477 const long &timeout () const { return theTimeout; }
4478+ const std::string &uriPath () const { return theUriPath; }
4479+ const std::string &libPath () const { return theLibPath; }
4480 const std::string &modulePath () const { return theModulePath; }
4481 const std::vector<std::string> &option () const { return theOption; }
4482 const bool &trailingNl () const { return theTrailingNl; }
4483 const std::vector<std::string> &stopWords () const { return theStopWords; }
4484 const std::vector<std::string> &thesaurus () const { return theThesaurus; }
4485+ const bool &compilePlan () const { return theCompilePlan; }
4486+ const bool &executePlan () const { return theExecutePlan; }
4487
4488 std::string load_argv (int argc, const char **argv) {
4489 if (argv == NULL) return "";
4490@@ -262,6 +272,16 @@
4491 if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; }
4492 if (*argv == NULL) { result = "No value given for --timeout option"; break; } init_val (*argv, theTimeout, d);
4493 }
4494+ else if (strcmp (*argv, "--uri-path") == 0) {
4495+ int d = 2;
4496+ if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; }
4497+ if (*argv == NULL) { result = "No value given for --uri-path option"; break; } init_val (*argv, theUriPath, d);
4498+ }
4499+ else if (strcmp (*argv, "--lib-path") == 0) {
4500+ int d = 2;
4501+ if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; }
4502+ if (*argv == NULL) { result = "No value given for --lib-path option"; break; } init_val (*argv, theLibPath, d);
4503+ }
4504 else if (strcmp (*argv, "--module-path") == 0) {
4505 int d = 2;
4506 if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; }
4507@@ -285,6 +305,12 @@
4508 if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; }
4509 if (*argv == NULL) { result = "No value given for --thesaurus option"; break; } init_val (*argv, theThesaurus, d);
4510 }
4511+ else if (strcmp (*argv, "--compile-plan") == 0 || strncmp (*argv, "-c", 2) == 0) {
4512+ theCompilePlan = true;
4513+ }
4514+ else if (strcmp (*argv, "--execute-plan") == 0) {
4515+ theExecutePlan = true;
4516+ }
4517 else if (strcmp (*argv, "--") == 0) {
4518 copy_args (++argv);
4519 break;
4520@@ -327,15 +353,19 @@
4521 "--compile-only\nOnly compile (don't execute)\n\n"
4522 "--no-serializer\nDo not serialize (discard) result.\n\n"
4523 "--debug, -d\nLaunch the Zorba debugger server and connect to a DBGP-enabled debugger client.\n\n"
4524-"--debug-host, -p\nThe host where the DBGP-enabled debugger client listens for connections. Defaults to: 127.0.0.1\n\n"
4525+"--debug-host, -h\nThe host where the DBGP-enabled debugger client listens for connections. Defaults to: 127.0.0.1\n\n"
4526 "--debug-port, -p\nThe port on which the DBGP-enabled debugger client listens for connections. Defaults to: 28028\n\n"
4527 "--no-logo\nPrint no logo when starting.\n\n"
4528 "--timeout\nSpecify a timeout in seconds. After the specified time, the execution of the query will be aborted.\n\n"
4529-"--module-path\nModule paths added to the built-in resolver, i.e. where module imports are looking for modules.\n\n"
4530+"--uri-path\nURI path (list of directories) added to the built-in URI resolver, i.e. where to find modules/schemas to import.\n\n"
4531+"--lib-path\nLibrary path (list of directories) where Zorba will look for dynamic libraries (e.g., module external function implementations.\n\n"
4532+"--module-path\nPath (list of directories) to add to both the URI and Library paths.\n\n"
4533 "--option\nSet an XQuery option in the static context. The QName of the option is passed as a string in the notation by James Clark (i.e. {namespace}localname). For example, --option {http://www.zorba-xquery.com}option=value\n\n"
4534 "--trailing-nl\nOutput a trailing newline after the result of the query.\n\n"
4535 "--stop-words\nMapping specifying a stop-words URI to another.\n\n"
4536 "--thesaurus\nMapping specifying a thesaurus URI to another.\n\n"
4537+"--compile-plan, -c\nOutput the query plan as binary.\n\n"
4538+"--execute-plan\nTake a query plan as binary and execute it. Binary query plans can be generated using the --compile-plan option.\n\n"
4539 ;
4540 }
4541
4542
4543=== added file 'cmake_modules/FindLibedit.cmake'
4544--- cmake_modules/FindLibedit.cmake 1970-01-01 00:00:00 +0000
4545+++ cmake_modules/FindLibedit.cmake 2012-03-23 17:30:28 +0000
4546@@ -0,0 +1,46 @@
4547+# Copyright 2011 The FLWOR Foundation.
4548+#
4549+# Licensed under the Apache License, Version 2.0 (the "License");
4550+# you may not use this file except in compliance with the License.
4551+# You may obtain a copy of the License at
4552+#
4553+# http://www.apache.org/licenses/LICENSE-2.0
4554+#
4555+# Unless required by applicable law or agreed to in writing, software
4556+# distributed under the License is distributed on an "AS IS" BASIS,
4557+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4558+# See the License for the specific language governing permissions and
4559+# limitations under the License.
4560+#
4561+# - Try to find the libedit library
4562+#
4563+# Once done this will define
4564+#
4565+# LIBEDIT_FOUND - True if libedit library is found
4566+# LIBEDIT_INCLUDE_DIRS - Directory to include to get libedit headers
4567+# LIBEDIT_LIBRARIES - Libraries to link against for the libedit library
4568+#
4569+
4570+FIND_PATH (
4571+ LIBEDIT_INCLUDE
4572+ editline/readline.h
4573+ PATHS ${LIBEDIT_INCLUDE_DIR} /usr/include /usr/local/include
4574+)
4575+MESSAGE(STATUS ${LIBEDIT_INCLUDE})
4576+
4577+FIND_LIBRARY (
4578+ LIBEDIT_LIBRARY
4579+ NAMES edit
4580+ PATHS ${LIBEDIT_LIBRARY_DIR} /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64
4581+)
4582+MESSAGE(STATUS ${LIBEDIT_LIBRARY})
4583+
4584+SET (LIBEDIT_INCLUDE_DIRS ${LIBEDIT_INCLUDE})
4585+SET (LIBEDIT_LIBRARIES ${LIBEDIT_LIBRARY})
4586+
4587+FIND_PACKAGE_HANDLE_STANDARD_ARGS (
4588+ Libedit
4589+ DEFAULT_MSG
4590+ LIBEDIT_INCLUDE LIBEDIT_LIBRARY
4591+)
4592+
4593
4594=== modified file 'cmake_modules/FindPHP5.cmake'
4595--- cmake_modules/FindPHP5.cmake 2011-08-19 00:03:31 +0000
4596+++ cmake_modules/FindPHP5.cmake 2012-03-23 17:30:28 +0000
4597@@ -97,6 +97,11 @@
4598 _zend_rsrc_list_get_rsrc_type
4599 _zend_wrong_param_count
4600 _zval_used_for_init
4601+ _zval_is_true
4602+ _zend_lookup_class
4603+ __object_init
4604+ __zend_hash_add_or_update
4605+ _php_strtolower
4606 )
4607 SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS
4608 "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS},-U,${symbol}")
4609
4610=== modified file 'cmake_modules/Windows/ProxyFindModule.cmake'
4611--- cmake_modules/Windows/ProxyFindModule.cmake 2011-10-08 16:34:42 +0000
4612+++ cmake_modules/Windows/ProxyFindModule.cmake 2012-03-23 17:30:28 +0000
4613@@ -32,6 +32,15 @@
4614 ENDMACRO (PRINT_FIND_END_TITLE)
4615
4616
4617+MACRO (PRINT_FIND_END_TITLE_SYSTEM MODULE_NAME FOUND)
4618+ IF (${FOUND})
4619+ MESSAGE (STATUS "************* DONE (found) *************")
4620+ ELSE (${FOUND})
4621+ MESSAGE (STATUS "*********** DONE (not found) ***********")
4622+ ENDIF (${FOUND})
4623+ENDMACRO (PRINT_FIND_END_TITLE_SYSTEM)
4624+
4625+
4626 MACRO (INSTALL_DLL DLL_PATH)
4627 IF (${PROJECT_NAME} STREQUAL "zorba")
4628 # for zorba core requirements, install this DLL
4629@@ -213,6 +222,34 @@
4630 ENDMACRO (FIND_PACKAGE_WIN32)
4631
4632
4633+# This macro will just perform a normal library search without trying to guess
4634+# locations. This should be used for searching libraries that can be found on
4635+# Windows using other means like registry entries (ImageMagick) or special
4636+# environment variables (Java or JNI)
4637+MACRO (FIND_PACKAGE_WIN32_NO_PROXY MODULE_NAME FOUND_VAR)
4638+
4639+ PRINT_FIND_TITLE (${MODULE_NAME})
4640+
4641+ # remove the Windows module path (both from Zorba or the external modules)
4642+ # to avoid an infinite recursion
4643+ FOREACH (PATH ${CMAKE_MODULE_PATH})
4644+ IF ("${PATH}" MATCHES ".*/cmake_modules/Windows")
4645+ LIST (REMOVE_ITEM CMAKE_MODULE_PATH "${PATH}")
4646+ ENDIF ("${PATH}" MATCHES ".*/cmake_modules/Windows")
4647+ ENDFOREACH (PATH)
4648+
4649+ FIND_PACKAGE (${MODULE_NAME})
4650+
4651+ # restore the module path
4652+ SET (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake_modules/Windows ${CMAKE_MODULE_PATH})
4653+ # restore the prefix path
4654+ SET (CMAKE_PREFIX_PATH ${OLD_CMAKE_PREFIX_PATH})
4655+
4656+ PRINT_FIND_END_TITLE_SYSTEM (${MODULE_NAME} ${FOUND_VAR})
4657+
4658+ENDMACRO (FIND_PACKAGE_WIN32_NO_PROXY)
4659+
4660+
4661 # This macro will search for a DLL in the given library location using extra
4662 # arguments as alternative names of the DLL. The first DLL found with that name
4663 # is considered. This is useful for some libraries that come with different DLL
4664
4665=== modified file 'cmake_modules/ZorbaModule.cmake'
4666--- cmake_modules/ZorbaModule.cmake 2011-10-09 01:15:10 +0000
4667+++ cmake_modules/ZorbaModule.cmake 2012-03-23 17:30:28 +0000
4668@@ -66,7 +66,8 @@
4669 #
4670 # Parameters:
4671 # URI - URI to mangle
4672-# EXT - extension to ensure URI ends with
4673+# EXT - extension to ensure URI ends with (may be empty; if set, must
4674+# include leading "."
4675 # DIR_VAR - variable to set with the directory part of the mangled path
4676 # FILE_VAR - variable to set with the file part of the mangled path
4677 MACRO (MANGLE_URI URI EXT DIR_VAR FILE_VAR)
4678@@ -89,13 +90,14 @@
4679
4680 # Convert final component into proper filename
4681 IF (NOT final_comp)
4682- SET (${FILE_VAR} "index.${EXT}")
4683+ SET (${FILE_VAR} "index${EXT}")
4684 ELSE (NOT final_comp)
4685- IF ("${final_comp}" MATCHES "\\.${EXT}$")
4686+ # \\ necessary to escape the leading . in EXT
4687+ IF ("${final_comp}" MATCHES "\\${EXT}$")
4688 SET (${FILE_VAR} "${final_comp}")
4689- ELSE ("${final_comp}" MATCHES "\\.${EXT}$")
4690- SET (${FILE_VAR} "${final_comp}.${EXT}")
4691- ENDIF ("${final_comp}" MATCHES "\\.${EXT}$")
4692+ ELSE ("${final_comp}" MATCHES "\\${EXT}$")
4693+ SET (${FILE_VAR} "${final_comp}${EXT}")
4694+ ENDIF ("${final_comp}" MATCHES "\\${EXT}$")
4695 ENDIF (NOT final_comp)
4696
4697 # Stick the reversed authority back on the front of the path: done!
4698@@ -139,7 +141,7 @@
4699 GET_FILENAME_COMPONENT (module_name "${MODULE_FILE}" NAME)
4700
4701
4702- MANGLE_URI (${MODULE_URI} "xq" module_path module_filename)
4703+ MANGLE_URI (${MODULE_URI} ".xq" module_path module_filename)
4704
4705 # Compute a CMake-symbol-safe version of the target URI, for storing
4706 # things in CMake properties.
4707@@ -159,41 +161,51 @@
4708 MATH (EXPR num_zorba_modules "${num_zorba_modules} + 1")
4709 SET_PROPERTY (GLOBAL PROPERTY ZORBA_MODULE_COUNT ${num_zorba_modules})
4710
4711- # Compute the version numbers, if any provided.
4712- IF (MODULE_VERSION)
4713- STRING (REPLACE "." ";" version "${MODULE_VERSION}")
4714- LIST (LENGTH version version_len)
4715- IF (NOT (version_len EQUAL 2) OR (version_len EQUAL 3))
4716- MESSAGE (FATAL_ERROR
4717- "Version ${MODULE_VERSION} not of form 'major.minor[.patch]'")
4718- ENDIF (NOT (version_len EQUAL 2) OR (version_len EQUAL 3))
4719- LIST (GET version 0 major_ver)
4720- LIST (GET version 1 minor_ver)
4721- IF (version_len EQUAL 3)
4722- LIST (GET version 2 patch_ver)
4723- MATH (EXPR version_int
4724- "${major_ver} * 100000000 + ${minor_ver} * 100000 + ${patch_ver}")
4725- ELSE (version_len EQUAL 3)
4726- SET (patch_ver)
4727- MATH (EXPR version_int "${major_ver} * 100000000 + ${minor_ver} * 100000")
4728- ENDIF (version_len EQUAL 3)
4729-
4730- # We maintain a global CMake property named after the target URI
4731- # which remembers all versions of this URI which have been
4732- # declared. If a *lower* version has already been declared, the
4733- # output file rules will be messed up, so die.
4734- GET_PROPERTY (target_versions GLOBAL PROPERTY "${uri_sym}-versions")
4735- FOREACH (known_ver ${target_versions})
4736- IF (known_ver LESS version_int)
4737- MESSAGE (FATAL_ERROR
4738- "The module ${MODULE_URI} has already been declared with a "
4739- "lower version number than ${MODULE_VERSION}. "
4740- "Please call DECLARE_ZORBA_MODULE() for higher versions of the same "
4741- "module first.")
4742- ENDIF (known_ver LESS version_int)
4743- ENDFOREACH (known_ver)
4744- SET_PROPERTY (GLOBAL APPEND PROPERTY "${uri_sym}-versions" ${version_int})
4745- ENDIF (MODULE_VERSION)
4746+ # If no version specified, it is effectively treated as 0.0.0.
4747+ IF (NOT MODULE_VERSION)
4748+ SET (MODULE_VERSION "0.0.0")
4749+ ENDIF (NOT MODULE_VERSION)
4750+
4751+ # Compute a unique integer, version_int, based on the version
4752+ # number, so we can more easily compare with other versions later.
4753+ STRING (REPLACE "." ";" version "${MODULE_VERSION}")
4754+ LIST (LENGTH version version_len)
4755+ IF (NOT ( (version_len EQUAL 2) OR (version_len EQUAL 3) ) )
4756+ MESSAGE (FATAL_ERROR
4757+ "Version ${version_len} ${MODULE_VERSION} not of form 'major.minor[.patch]'")
4758+ ENDIF (NOT ( (version_len EQUAL 2) OR (version_len EQUAL 3) ) )
4759+ LIST (GET version 0 major_ver)
4760+ LIST (GET version 1 minor_ver)
4761+ IF (version_len EQUAL 3)
4762+ LIST (GET version 2 patch_ver)
4763+ MATH (EXPR version_int
4764+ "${major_ver} * 100000000 + ${minor_ver} * 100000 + ${patch_ver}")
4765+ ELSE (version_len EQUAL 3)
4766+ SET (patch_ver)
4767+ MATH (EXPR version_int "${major_ver} * 100000000 + ${minor_ver} * 100000")
4768+ ENDIF (version_len EQUAL 3)
4769+
4770+ # We maintain a global CMake property named after the target URI
4771+ # which remembers all versions of this URI which have been
4772+ # declared. If a *lower* version has already been declared, the
4773+ # output file rules will be messed up, so die. If the *same* version
4774+ # has already been declare, XQdoc will be messed up, so die.
4775+ GET_PROPERTY (target_versions GLOBAL PROPERTY "${uri_sym}-versions")
4776+ FOREACH (known_ver ${target_versions})
4777+ IF (known_ver LESS version_int)
4778+ MESSAGE (FATAL_ERROR
4779+ "The module ${MODULE_URI} has already been declared with a "
4780+ "lower version number than ${MODULE_VERSION}. "
4781+ "Please call DECLARE_ZORBA_MODULE() for higher versions of the same "
4782+ "module first.")
4783+ ElSEIF (known_ver EQUAL version_int)
4784+ MESSAGE (FATAL_ERROR
4785+ "The module ${MODULE_URI} has already been declared with the "
4786+ "version number ${MODULE_VERSION}. You cannot declare the same "
4787+ "module twice.")
4788+ ENDIF (known_ver LESS version_int)
4789+ ENDFOREACH (known_ver)
4790+ SET_PROPERTY (GLOBAL APPEND PROPERTY "${uri_sym}-versions" ${version_int})
4791
4792 # Add to module manifest (except test modules).
4793 IF (NOT MODULE_TEST_ONLY)
4794@@ -250,6 +262,11 @@
4795 SET(module_lib_target "modlib${num_zorba_modules}_${module_name}")
4796 ADD_LIBRARY(${module_lib_target} SHARED ${SRC_FILES})
4797 GET_FILENAME_COMPONENT(module_filewe "${module_filename}" NAME_WE)
4798+ IF (MODULE_VERSION)
4799+ # If there's a version, insert it into the module library name
4800+ SET (module_filewe "${module_filewe}_${MODULE_VERSION}")
4801+ ENDIF (MODULE_VERSION)
4802+
4803 # It seems like it would be nice to set the VERSION and/or
4804 # SOVERSION target properties here. However: On Windows, it
4805 # doesn't seem to do anything (the .rc file configured above
4806@@ -260,7 +277,7 @@
4807 # target property isn't desirable.
4808 # FOLDER is to group IDE projects into folders.
4809 SET_TARGET_PROPERTIES (${module_lib_target} PROPERTIES
4810- OUTPUT_NAME "${module_filewe}_${MODULE_VERSION}${SUFFIX}"
4811+ OUTPUT_NAME "${module_filewe}${SUFFIX}"
4812 ${target_type}_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${module_name}.src"
4813 FOLDER "Modules"
4814 )
4815@@ -272,12 +289,12 @@
4816 IF(NOT ${PROJECT_NAME} STREQUAL "zorba")
4817 STRING(REPLACE "-" "_" component_name ${PROJECT_NAME})
4818 INSTALL(TARGETS ${module_lib_target}
4819- ${target_type} DESTINATION ${ZORBA_MODULES_INSTALL_DIR}/${module_path}
4820+ ${target_type} DESTINATION ${ZORBA_NONCORE_LIB_DIR}/${module_path}
4821 COMPONENT ${component_name})
4822
4823 ELSE(NOT ${PROJECT_NAME} STREQUAL "zorba")
4824 INSTALL(TARGETS ${module_lib_target}
4825- ${target_type} DESTINATION ${ZORBA_MODULES_INSTALL_DIR}/${module_path})
4826+ ${target_type} DESTINATION ${ZORBA_CORE_LIB_DIR}/${module_path})
4827 ENDIF(NOT ${PROJECT_NAME} STREQUAL "zorba")
4828 ENDIF (NOT MODULE_TEST_ONLY)
4829
4830@@ -296,7 +313,7 @@
4831 ENDIF (patch_ver)
4832 ENDIF (MODULE_VERSION)
4833 FOREACH (version_infix "" ${version_infixes})
4834- ADD_COPY_RULE ("${SOURCE_FILE}" "${module_path}/${module_filename}"
4835+ ADD_COPY_RULE ("URI" "${SOURCE_FILE}" "${module_path}/${module_filename}"
4836 "${version_infix}" "" "${MODULE_TEST_ONLY}")
4837 ENDFOREACH (version_infix)
4838
4839@@ -304,7 +321,7 @@
4840 IF (module_lib_target)
4841 GET_TARGET_PROPERTY (lib_location "${module_lib_target}" LOCATION)
4842 GET_FILENAME_COMPONENT (lib_filename "${lib_location}" NAME)
4843- ADD_COPY_RULE ("${lib_location}" "${module_path}/${lib_filename}"
4844+ ADD_COPY_RULE ("LIB" "${lib_location}" "${module_path}/${lib_filename}"
4845 "" "${module_lib_target}" "${MODULE_TEST_ONLY}")
4846 ENDIF (module_lib_target)
4847
4848@@ -350,34 +367,70 @@
4849 SET (SOURCE_FILE "${SCHEMA_FILE}")
4850 ENDIF (NOT IS_ABSOLUTE "${SCHEMA_FILE}")
4851 GET_FILENAME_COMPONENT (schema_name "${SCHEMA_FILE}" NAME)
4852- MANGLE_URI (${SCHEMA_URI} "xsd" schema_path schema_filename)
4853+ MANGLE_URI (${SCHEMA_URI} ".xsd" schema_path schema_filename)
4854
4855 # Add to schema manifest (except test schema).
4856 IF (NOT SCHEMA_TEST_ONLY)
4857 ADD_ZORBA_MANIFEST_ENTRY("schema" ${SCHEMA_URI} "")
4858 ENDIF (NOT SCHEMA_TEST_ONLY)
4859
4860- ADD_COPY_RULE ("${SOURCE_FILE}" "${schema_path}/${schema_filename}"
4861+ ADD_COPY_RULE ("URI" "${SOURCE_FILE}" "${schema_path}/${schema_filename}"
4862 "" "" "${SCHEMA_TEST_ONLY}")
4863
4864 ENDMACRO (DECLARE_ZORBA_SCHEMA)
4865
4866+# Macro which declares a file to be loaded by URI. This sets up the
4867+# installation of the file into the URI_PATH folder so it will be
4868+# found at runtime.
4869+#
4870+# Args: URI - the URI of the file
4871+# FILE - path to file (if not absolute, will be resolved
4872+# relative to CMAKE_CURRENT_SOURCE_DIR)
4873+# TEST_ONLY - (optional) File is for testcases only and should not
4874+# be installed
4875+MACRO (DECLARE_ZORBA_URI_FILE)
4876+ # QQQ Refactor - this macro is basically identical to DECLARE_ZORBA_SCHEMA
4877+ PARSE_ARGUMENTS(URI_FILE "" "URI;FILE" "TEST_ONLY" ${ARGN})
4878+ IF (NOT URI_FILE_FILE)
4879+ MESSAGE (FATAL_ERROR "'FILE' argument is required for ZORBA_DECLARE_URI_FILE()")
4880+ ENDIF (NOT URI_FILE_FILE)
4881+ IF (NOT URI_FILE_URI)
4882+ MESSAGE (FATAL_ERROR "'URI' argument is required for ZORBA_DECLARE_URI_FILE()")
4883+ ENDIF (NOT URI_FILE_URI)
4884+ IF (NOT IS_ABSOLUTE "${URI_FILE_FILE}")
4885+ SET (SOURCE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${URI_FILE_FILE}")
4886+ ELSE (NOT IS_ABSOLUTE "${URI_FILE_FILE}")
4887+ SET (SOURCE_FILE "${URI_FILE_FILE}")
4888+ ENDIF (NOT IS_ABSOLUTE "${URI_FILE_FILE}")
4889+ GET_FILENAME_COMPONENT (uri_file_name "${URI_FILE_FILE}" NAME)
4890+ # Don't enforce any extension on general files
4891+ MANGLE_URI (${URI_FILE_URI} "" uri_file_path uri_file_filename)
4892+
4893+ ADD_COPY_RULE ("URI" "${SOURCE_FILE}" "${uri_file_path}/${uri_file_filename}"
4894+ "" "" "${URI_FILE_TEST_ONLY}")
4895+
4896+ENDMACRO (DECLARE_ZORBA_URI_FILE)
4897+
4898 # Utility macro for setting up a build rule to copy a file to a
4899-# particular (possible versioned) file in URI_PATH if such a file has
4900+# particular (possibly versioned) file in a shared directory if such a file has
4901 # not already been output.
4902+# FILE_TYPE: Either "URI" or "LIB"; will be used to determine which shared
4903+# directory to place output in (URI_PATH or LIB_PATH). Also, "URI" files
4904+# will have an INSTALL() directive to put them in the install image.
4905 # INPUT_FILE: Absolute path to file to copy.
4906 # OUTPUT_FILE: Relative path to output file (relative to URI_PATH).
4907 # VERSION_ARG: Version; may be "" for non-versioned files.
4908 # DEPEND_TARGET: A CMake target name upon which the copy rule should depend;
4909 # may be "".
4910 # TEST_ONLY: If 1, file is for testcases only; will be copied into
4911-# TEST_URI_PATH and will not be installed
4912-MACRO (ADD_COPY_RULE INPUT_FILE OUTPUT_FILE VERSION_ARG DEPEND_TARGET TEST_ONLY)
4913+# TEST_URI_PATH/TEST_LIB_PATH and will not be installed
4914+MACRO (ADD_COPY_RULE FILE_TYPE INPUT_FILE OUTPUT_FILE VERSION_ARG
4915+ DEPEND_TARGET TEST_ONLY)
4916 # Choose output base directory
4917 IF (${TEST_ONLY} EQUAL 1)
4918- SET (_output_basedir "${CMAKE_BINARY_DIR}/TEST_URI_PATH")
4919+ SET (_output_basedir "${CMAKE_BINARY_DIR}/TEST_${FILE_TYPE}_PATH")
4920 ELSE (${TEST_ONLY} EQUAL 1)
4921- SET (_output_basedir "${CMAKE_BINARY_DIR}/URI_PATH")
4922+ SET (_output_basedir "${CMAKE_BINARY_DIR}/${FILE_TYPE}_PATH")
4923 ENDIF (${TEST_ONLY} EQUAL 1)
4924
4925 # Compute the modified output filename by inserting VERSION_ARG (if
4926@@ -404,46 +457,50 @@
4927 IF (file_found EQUAL -1)
4928 SET_PROPERTY (GLOBAL APPEND PROPERTY "${_dir_sym}-output-files"
4929 "${_output_file}")
4930- # Save the input file, output file, and any library dependency
4931- # target for this rule in a global property
4932+ # Detect whether this is a core URI or not
4933+ IF (PROJECT_NAME STREQUAL "zorba")
4934+ SET (_is_core 1)
4935+ ELSE (PROJECT_NAME STREQUAL "zorba")
4936+ SET (_is_core 0)
4937+ ENDIF (PROJECT_NAME STREQUAL "zorba")
4938+
4939+ # Save the (input file, output file, any library dependency
4940+ # target, and whether this is a core or non-core file) for this
4941+ # rule in a global property
4942 SET_PROPERTY (GLOBAL APPEND PROPERTY ZORBA_URI_FILES
4943- "${INPUT_FILE}" "${_output_file}" "${DEPEND_TARGET}")
4944+ "${INPUT_FILE}" "${_output_file}" "${DEPEND_TARGET}" "${_is_core}")
4945
4946- # For .xq and .xsd files, also set up an INSTALL rule (if not TEST_ONLY).
4947- IF (NOT ${TEST_ONLY} EQUAL 1)
4948- IF (${_output_ext} STREQUAL ".xq" OR ${_output_ext} STREQUAL ".xsd")
4949+ # Also set up an INSTALL rule (unless TEST_ONLY or LIB).
4950+ IF ( (NOT "${FILE_TYPE}" STREQUAL "LIB") AND (NOT ${TEST_ONLY} EQUAL 1) )
4951
4952- IF(NOT PROJECT_NAME STREQUAL "zorba")
4953- STRING(REPLACE "-" "_" component_name ${PROJECT_NAME})
4954- INSTALL (FILES "${INPUT_FILE}"
4955- DESTINATION "${ZORBA_MODULES_INSTALL_DIR}/${_output_path}"
4956- RENAME "${_output_filename}"
4957- COMPONENT "${component_name}")
4958+ IF(NOT _is_core)
4959+ STRING(REPLACE "-" "_" component_name ${PROJECT_NAME})
4960+ INSTALL (FILES "${INPUT_FILE}"
4961+ DESTINATION "${ZORBA_NONCORE_URI_DIR}/${_output_path}"
4962+ RENAME "${_output_filename}"
4963+ COMPONENT "${component_name}")
4964
4965- IF (NOT ${component_name}_cpack)
4966- SET (${component_name}_cpack 1)
4967+ IF (NOT ${component_name}_cpack)
4968+ SET (${component_name}_cpack 1)
4969
4970- STRING(TOUPPER ${component_name} component_name2)
4971- FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeCPackModules.cmake "SET(CPACK_COMPONENT_${component_name2}_GROUP \"external_modules\")\n")
4972-
4973- STRING(REPLACE "zorba_" "" component_display_name ${component_name})
4974- STRING(REPLACE "_" " " component_display_name ${component_display_name})
4975- FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeCPackModules.cmake "SET(CPACK_COMPONENT_${component_name2}_DISPLAY_NAME \"${component_display_name}\")\n")
4976-
4977- FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeCPackModules.cmake "SET(CPACK_COMPONENT_${component_name2}_DESCRIPTION \"Install the functionalities of the ${component_display_name}.\")\n")
4978- FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeCPackModules.cmake "SET(CPACK_COMPONENT_${component_name2}_INSTALL_TYPES Full)\n")
4979- ENDIF (NOT ${component_name}_cpack)
4980-
4981- ELSE(NOT PROJECT_NAME STREQUAL "zorba")
4982- INSTALL (FILES "${INPUT_FILE}"
4983- DESTINATION "${ZORBA_MODULES_INSTALL_DIR}/${_output_path}"
4984+ STRING(TOUPPER ${component_name} component_name2)
4985+ FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeCPackModules.cmake "SET(CPACK_COMPONENT_${component_name2}_GROUP \"external_modules\")\n")
4986+
4987+ STRING(REPLACE "zorba_" "" component_display_name ${component_name})
4988+ STRING(REPLACE "_" " " component_display_name ${component_display_name})
4989+ FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeCPackModules.cmake "SET(CPACK_COMPONENT_${component_name2}_DISPLAY_NAME \"${component_display_name}\")\n")
4990+
4991+ FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeCPackModules.cmake "SET(CPACK_COMPONENT_${component_name2}_DESCRIPTION \"Install the functionalities of the ${component_display_name}.\")\n")
4992+ FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeCPackModules.cmake "SET(CPACK_COMPONENT_${component_name2}_INSTALL_TYPES Full)\n")
4993+ ENDIF (NOT ${component_name}_cpack)
4994+
4995+ ELSE(NOT _is_core)
4996+ INSTALL (FILES "${INPUT_FILE}"
4997+ DESTINATION "${ZORBA_CORE_URI_DIR}/${_output_path}"
4998 RENAME "${_output_filename}")
4999- ENDIF(NOT PROJECT_NAME STREQUAL "zorba")
5000-
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: