Merge lp:~zorba-coders/zorba/module-schema-tools into lp:~zorba-coders/zorba/zorba-experimental

Proposed by Cezar Andrei
Status: Superseded
Proposed branch: lp:~zorba-coders/zorba/module-schema-tools
Merge into: lp:~zorba-coders/zorba/zorba-experimental
Diff against target: 259433 lines (+126126/-68954)
1738 files modified
CMakeConfiguration.txt (+0/-4)
CMakeLists.txt (+52/-20)
CPackSourceConfig.cmake.in (+1/-1)
ChangeLog (+146/-13)
NOTICE.txt (+19/-1)
NOTICE.xml (+16/-0)
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 (+77/-45)
bin/path_util.h (+15/-24)
bin/zorbacmd.cpp (+139/-56)
bin/zorbacmdproperties.cpp (+19/-5)
bin/zorbacmdproperties.h (+10/-1)
bin/zorbacmdproperties.txt (+6/-1)
bin/zorbacmdproperties_base.h (+157/-66)
cmake_modules/FindLibedit.cmake (+46/-0)
cmake_modules/FindPHP5.cmake (+5/-0)
cmake_modules/Windows/ProxyFindModule.cmake (+37/-0)
cmake_modules/ZorbaModule.cmake (+244/-101)
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/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/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/options.h (+19/-4)
include/zorba/pregenerated/diagnostic_list.h (+60/-4)
include/zorba/properties_base.h (+37/-1)
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/thesaurus.h (+24/-28)
include/zorba/transcode_stream.h (+213/-0)
include/zorba/typeident.h (+34/-1)
include/zorba/uri_resolvers.h (+18/-3)
include/zorba/util/file.h (+2/-0)
include/zorba/xquery.h (+24/-7)
include/zorba/zorba.h (+16/-5)
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 (+21/-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/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_request_handler.cpp (+3/-0)
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 (+113/-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 (+47/-24)
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 (+258/-75)
src/api/staticcontextimpl.h (+36/-23)
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 (+11/-1)
src/api/zorbaimpl.h (+2/-0)
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 (+121/-85)
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 (+442/-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 (+49/-43)
src/context/dynamic_loader.h (+12/-8)
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 (+534/-419)
src/context/static_context.h (+126/-127)
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 (+220/-56)
src/diagnostics/dict_XX_cpp.xq (+1/-0)
src/diagnostics/pregenerated/diagnostic_list.cpp (+90/-6)
src/diagnostics/pregenerated/dict_en.cpp (+54/-12)
src/diagnostics/qname.cpp (+6/-0)
src/functions/CMakeLists.txt (+1/-0)
src/functions/external_function.cpp (+86/-6)
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_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 (+57/-18)
src/functions/function.h (+16/-15)
src/functions/function_consts.h (+5/-6)
src/functions/function_impl.h (+10/-10)
src/functions/library.cpp (+6/-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_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 (+33/-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 (+3/-1)
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/apply.cpp (+20/-12)
src/runtime/full_text/ft_match.cpp (+2/-3)
src/runtime/full_text/ft_stop_words_set.cpp (+4/-4)
src/runtime/full_text/icu_tokenizer.cpp (+51/-24)
src/runtime/full_text/icu_tokenizer.h (+2/-2)
src/runtime/full_text/thesauri/wn_synset.cpp (+4/-2)
src/runtime/full_text/thesaurus.cpp (+22/-27)
src/runtime/full_text/thesaurus.h (+2/-27)
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 (+1/-1)
src/runtime/spec/codegen-h.xq (+36/-12)
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/json/json.xml (+52/-0)
src/runtime/spec/mappings.xml (+13/-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 (+61/-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 (+89/-0)
src/runtime/strings/strings_impl.cpp (+429/-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 (+151/-1)
src/runtime/visitors/pregenerated/printer_visitor.cpp (+423/-0)
src/runtime/visitors/pregenerated/printer_visitor.h (+90/-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 (+1398/-322)
src/store/naive/atomic_items.h (+659/-224)
src/store/naive/collection.cpp (+108/-0)
src/store/naive/collection.h (+117/-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 (+784/-298)
src/store/naive/node_items.h (+283/-133)
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 (+366/-565)
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/properties.h (+21/-0)
src/system/zorba_properties.h (+114/-33)
src/system/zorba_properties.txt (+5/-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 (+9/-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 (+9/-1)
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/file.cpp (+12/-0)
src/util/fs_util.cpp (+24/-0)
src/util/fs_util.h (+28/-0)
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/win32/dirent.h (+372/-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/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)
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 (+89/-8)
swig/Zorba.i (+28/-1)
swig/java/CMakeLists.txt (+4/-1)
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/various.i (+184/-0)
swig/zorba_api.i (+12/-2)
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-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/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-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/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/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 (+9/-3)
test/rbkt/modules/bad-ver.xq (+1/-1)
test/rbkt/modules/java/CMakeLists.txt (+39/-0)
test/rbkt/modules/java/Test.java (+7/-0)
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/module-schema-tools
Reviewer Review Type Date Requested Status
Cezar Andrei Approve
Review via email: mp+97468@code.launchpad.net

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

Commit message

Testing schema-tools which includes xmlbeans. Take 6.
Enable schema-tools module. Cleanup doc.

Description of the change

Testing schema-tools which includes xmlbeans. Take 6.
Enable schema-tools module. Cleanup doc.

To post a comment you must log in.
Revision history for this message
Cezar Andrei (cezar-andrei) wrote : Posted in a previous version of this proposal

go

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
Cezar Andrei (cezar-andrei) : 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
Cezar Andrei (cezar-andrei) wrote : Posted in a previous version of this proposal

g

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
Cezar Andrei (cezar-andrei) : 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
Cezar Andrei (cezar-andrei) : 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
Cezar Andrei (cezar-andrei) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
10631. By Cezar Andrei <email address hidden>

Merge from trunk.

10632. By Cezar Andrei <email address hidden>

Refactor DymanicLoader::loadModule.
Remove commented macro.

10633. By Cezar Andrei <email address hidden>

Revert store_properties.h to trunk version.

10634. By Cezar Andrei <email address hidden>

Added dirent.h entry in NOTICE.xml.

10635. By Cezar Andrei <email address hidden>

Update NOTICE.txt

10636. By Cezar Andrei <email address hidden>

Remove java version output and comment.

10637. By Cezar Andrei <email address hidden>

Ficx spelling.

10638. By Cezar Andrei <email address hidden>

Rename getProperties to getPropertiesGlobal.

10639. By Cezar Andrei <email address hidden>

Remove schema-tools module from ExternalModules.conf

10640. By Cezar Andrei <email address hidden>

Fix ExternalModule.conf to the latest in trunk.

10641. By Cezar Andrei <email address hidden>

Fix wrong merge of options.

10642. By Cezar Andrei <email address hidden>

Merge from trunk.

10643. By Cezar Andrei <email address hidden>

Removed the top comment about this file beeing generated.
Fix some indentation.

10644. By Cezar Andrei <email address hidden>

Fix indentation src/system/zorba_properties.h.

10645. By Cezar Andrei <email address hidden>

Include schema-tools as external module for experimental.

10646. By Cezar Andrei <email address hidden>

Comment out reference to schema-tools module.
Removed swig IStream class and references.

10647. By Chris Hillery

Merge from trunk.

10648. By Chris Hillery

Significantly enhance modules/CMakeLists.txt to automatically figure
out in what order to add non-core module projects to Zorba. This was
necessary to extend the functionality of the automatically-created
moduleConfig.cmake files used in inter-module dependencies. These
files can now reference a "use file" to enable information such as
include directories to be shared to dependent modules.

10649. By Chris Hillery

Tweak DAG-formation algorithm to skip dependencies that aren't on other
module projects.

10650. By Chris Hillery

Move auto-creation of module package Config.cmake file to
DONE_DECLARING_ZORBA_URIS(), and extended it to support _INCLUDE_DIRS
and _LIBRARIES. The latter is automatically populated with all dynamic
libs created by DECLARE_ZORBA_MODULE().

10651. By Chris Hillery

Fix build dependencies for .jar files and inter-dependent modules.

10652. By Chris Hillery

Work around CMake bug with LIST(REMOVE_DUPLICATES).

10653. By Chris Hillery

Add util-jvm module.

10654. By Cezar Andrei <email address hidden>

Merge from trunk.

10655. By Cezar Andrei <email address hidden>

Add entries in ChangeLog.

10656. By Chris Hillery

Removing orphaned JVM classpath fields from static_context.

10657. By Chris Hillery

Merge from trunk.

10658. By Chris Hillery

Yet another crack at making the build dependencies for modules and zorba
completely consistent and correct.

10659. By Chris Hillery

Merge from trunk; remove erroneous swig merge.

10660. By Chris Hillery

Merge from trunk.

10661. By Chris Hillery

Merge from trunk.

10662. By Chris Hillery

Merge from trunk.

10663. By Chris Hillery

Unwanted file.

Unmerged revisions

10663. By Chris Hillery

Unwanted file.

10662. By Chris Hillery

Merge from trunk.

10661. By Chris Hillery

Merge from trunk.

10660. By Chris Hillery

Merge from trunk.

10659. By Chris Hillery

Merge from trunk; remove erroneous swig merge.

10658. By Chris Hillery

Yet another crack at making the build dependencies for modules and zorba
completely consistent and correct.

10657. By Chris Hillery

Merge from trunk.

10656. By Chris Hillery

Removing orphaned JVM classpath fields from static_context.

10655. By Cezar Andrei <email address hidden>

Add entries in ChangeLog.

10654. By Cezar Andrei <email address hidden>

Merge from trunk.

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

Subscribers

People subscribed via source and target branches

to all changes: