Merge lp:~zorba-coders/zorba/jsoniq-plan_serialization into lp:~zorba-coders/zorba/jsoniq
- jsoniq-plan_serialization
- Merge into jsoniq
Status: | Merged |
---|---|
Merged at revision: | 10692 |
Proposed branch: | lp:~zorba-coders/zorba/jsoniq-plan_serialization |
Merge into: | lp:~zorba-coders/zorba/jsoniq |
Diff against target: |
55003 lines (+21705/-11550) 514 files modified
CMakeCompiler.txt (+3/-0) CMakeConfiguration.txt (+5/-5) CMakeLists.txt (+6/-2) ChangeLog (+21/-0) KNOWN_ISSUES.txt (+1/-1) NOTICE.txt (+18/-0) NOTICE.xml (+16/-0) bin/path_util.cpp (+19/-2) bin/path_util.h (+6/-0) bin/zorbacmd.cpp (+8/-0) bin/zorbacmdproperties.cpp (+5/-0) bin/zorbacmdproperties.h (+3/-0) bin/zorbacmdproperties.txt (+1/-0) bin/zorbacmdproperties_base.h (+133/-72) cmake_modules/ZorbaModule.cmake (+213/-65) config/ExternalModuleConfig.cmake.in (+26/-9) config/ZorbaUse.cmake (+0/-4) doc/cxx/examples/context.cpp (+4/-0) include/zorba/config.h.cmake (+3/-1) include/zorba/pregenerated/diagnostic_list.h (+11/-5) include/zorba/properties_base.h (+37/-1) include/zorba/static_context.h (+36/-0) include/zorba/util/file.h (+2/-0) include/zorba/util/time.h (+1/-1) include/zorba/xmldatamanager.h (+2/-0) include/zorba/zorba.h (+15/-5) modules/CMakeLists.txt (+113/-30) modules/ExternalModules.conf (+3/-1) modules/com/zorba-xquery/www/modules/converters/json.xq (+2/-2) modules/com/zorba-xquery/www/modules/datetime.xq (+5/-5) modules/com/zorba-xquery/www/modules/fetch.xq (+5/-5) modules/com/zorba-xquery/www/modules/http-client.xq (+15/-15) modules/com/zorba-xquery/www/modules/pregenerated/errors.xq (+12/-8) modules/com/zorba-xquery/www/modules/project_xqdoc.xq (+5/-5) modules/com/zorba-xquery/www/modules/random.xq (+6/-6) modules/com/zorba-xquery/www/modules/reflection.xq (+9/-9) modules/com/zorba-xquery/www/modules/store/data-structures/unordered-map.xq (+6/-6) modules/com/zorba-xquery/www/modules/store/dynamic/collections/dml.xq (+36/-10) modules/com/zorba-xquery/www/modules/store/dynamic/collections/w3c/dml.xq (+5/-5) modules/com/zorba-xquery/www/modules/store/static/collections/dml.xq (+48/-17) modules/com/zorba-xquery/www/modules/store/static/indexes/dml.xq (+3/-3) modules/com/zorba-xquery/www/modules/xqdoc.xq (+2/-2) modules/com/zorba-xquery/www/modules/xqdoc.xsd (+1/-0) modules/com/zorba-xquery/www/modules/xqdoc2xhtml/index.xq (+35/-35) modules/org/expath/ns/file.xq (+32/-36) modules/org/expath/ns/file.xq.src/file.cpp (+118/-0) modules/org/expath/ns/file.xq.src/file.h (+64/-0) modules/org/expath/ns/file.xq.src/file_module.cpp (+2/-0) modules/org/jsoniq/www/functions.xq (+22/-1) modules/org/jsoniq/www/pregenerated/errors.xq (+1/-0) modules/w3c/pregenerated/xqt-errors.xq (+18/-0) modules/w3c/xpath_functions.xq (+46/-1) schemas/CMakeLists.txt (+12/-0) schemas/XQueryX.xsd (+1962/-0) schemas/complete-pul.xsd (+136/-0) schemas/pul.xsd (+237/-0) schemas/xdm.xsd (+283/-0) scripts/CMakeLists.txt (+4/-2) src/CMakeLists.txt (+4/-0) src/annotations/annotations.h (+1/-1) src/api/serialization/serializer.cpp (+40/-31) src/api/serialization/serializer.h (+2/-4) src/api/staticcollectionmanagerimpl.cpp (+1/-0) src/api/staticcontextimpl.cpp (+46/-0) src/api/staticcontextimpl.h (+6/-0) src/api/zorbaimpl.cpp (+10/-0) src/api/zorbaimpl.h (+2/-0) src/compiler/expression/expr.cpp (+0/-10) src/compiler/expression/expr_utils.h (+1/-1) src/compiler/expression/flwor_expr.cpp (+0/-4) src/compiler/expression/ftnode.cpp (+0/-10) src/compiler/expression/update_exprs.cpp (+0/-2) src/compiler/parser/xquery_parser.cpp (+3897/-3845) src/compiler/parser/xquery_parser.hpp (+8/-8) src/compiler/parser/xquery_scanner.cpp (+3121/-3106) src/compiler/parsetree/parsenode_print_xqdoc_visitor.cpp (+11/-1) src/compiler/rewriter/rules/flwor_rules.cpp (+1/-1) src/compiler/rewriter/rules/fold_rules.cpp (+3/-3) src/compiler/rewriter/tools/dataflow_annotations.cpp (+7/-4) src/compiler/translator/translator.cpp (+3/-3) src/context/dynamic_context.cpp (+153/-3) src/context/dynamic_context.h (+11/-0) src/context/dynamic_loader.cpp (+41/-26) src/context/dynamic_loader.h (+10/-5) src/diagnostics/assert.cpp (+8/-2) src/diagnostics/assert.h (+23/-1) src/diagnostics/diagnostic_en.xml (+148/-39) src/diagnostics/pregenerated/diagnostic_list.cpp (+16/-7) src/diagnostics/pregenerated/dict_en.cpp (+108/-21) src/functions/func_collections_impl.cpp (+41/-124) src/functions/func_strings_impl.cpp (+38/-0) src/functions/func_strings_impl.h (+38/-0) src/functions/function.cpp (+0/-2) src/functions/library.cpp (+2/-0) src/functions/pregenerated/func_access.cpp (+111/-0) src/functions/pregenerated/func_access.h (+79/-0) src/functions/pregenerated/func_collections.cpp (+33/-0) src/functions/pregenerated/func_collections.h (+15/-0) src/functions/pregenerated/func_sequences.cpp (+148/-0) src/functions/pregenerated/func_sequences.h (+75/-0) src/functions/pregenerated/func_strings.cpp (+0/-27) src/functions/pregenerated/function_enum.h (+10/-0) src/precompiled/stdafx.h (+74/-356) src/runtime/api/plan_wrapper.cpp (+2/-1) src/runtime/base/binarybase.h (+1/-1) src/runtime/base/narybase.h (+4/-4) src/runtime/base/noarybase.h (+1/-1) src/runtime/base/plan_iterator.cpp (+0/-3) src/runtime/base/plan_iterator.h (+1/-1) src/runtime/base/unarybase.h (+1/-1) src/runtime/booleans/BooleanImpl.cpp (+2/-0) src/runtime/collections/collections_base.cpp (+41/-29) src/runtime/collections/collections_impl.cpp (+137/-9) src/runtime/collections/pregenerated/collections.cpp (+24/-0) src/runtime/collections/pregenerated/collections.h (+51/-0) src/runtime/core/gflwor/window_iterator.cpp (+21/-15) src/runtime/core/internal_operators.cpp (+8/-2) src/runtime/core/internal_operators.h (+9/-5) src/runtime/core/path_iterators.cpp (+63/-16) src/runtime/core/trycatch.cpp (+13/-7) src/runtime/eval/eval.cpp (+7/-0) src/runtime/eval/eval.h (+1/-0) src/runtime/full_text/CMakeLists.txt (+3/-3) src/runtime/full_text/default_tokenizer.cpp (+4/-4) src/runtime/full_text/latin_tokenizer.cpp (+3/-2) src/runtime/full_text/latin_tokenizer.h (+9/-8) src/runtime/json/json_constructors.cpp (+3/-3) src/runtime/json/jsoniq_functions_impl.cpp (+1/-1) src/runtime/maths/maths_impl.cpp (+1/-1) src/runtime/numerics/format_integer_impl.cpp (+10/-10) src/runtime/numerics/numerics_impl.cpp (+1/-1) src/runtime/random/random_impl.cpp (+2/-2) src/runtime/sequences/pregenerated/sequences.cpp (+116/-0) src/runtime/sequences/pregenerated/sequences.h (+219/-0) src/runtime/sequences/sequences_impl.cpp (+275/-3) src/runtime/spec/collections/collections.xml (+33/-0) src/runtime/spec/sequences/sequences.xml (+171/-0) src/runtime/spec/strings/strings.xml (+1/-1) src/runtime/store/maps_impl.cpp (+1/-1) src/runtime/strings/strings_impl.cpp (+58/-20) src/runtime/visitors/pregenerated/planiter_visitor.h (+30/-0) src/runtime/visitors/pregenerated/printer_visitor.cpp (+84/-0) src/runtime/visitors/pregenerated/printer_visitor.h (+18/-0) src/store/api/store.h (+1/-1) src/store/naive/atomic_items.cpp (+2/-2) src/store/naive/collection.h (+1/-1) src/store/naive/json_items.cpp (+2/-2) src/store/naive/json_items.h (+6/-6) src/store/naive/node_items.cpp (+1/-1) src/store/naive/ordpath.cpp (+16/-2) src/store/naive/pul_primitives.cpp (+18/-14) src/store/naive/simple_collection.cpp (+29/-21) src/store/naive/simple_collection.h (+2/-2) src/store/naive/simple_index_general.cpp (+9/-9) src/store/naive/simple_lazy_temp_seq.cpp (+4/-4) src/store/naive/simple_pul.cpp (+3/-1) src/store/naive/simple_store.h (+7/-3) src/store/naive/simple_temp_seq.cpp (+1/-1) src/store/naive/store.h (+12/-11) src/system/globalenv.cpp (+7/-9) src/system/properties.h (+21/-0) src/system/zorba_properties.h (+67/-17) src/system/zorba_properties.txt (+1/-0) src/types/root_typemanager.h (+2/-0) src/types/typeimpl.cpp (+0/-2) src/types/typemanagerimpl.cpp (+0/-2) src/unit_tests/CMakeLists.txt (+2/-2) src/unit_tests/string.cpp (+8/-0) src/unit_tests/unit_test_list.h (+2/-2) src/unit_tests/unit_tests.cpp (+2/-2) src/util/CMakeLists.txt (+4/-4) src/util/file.cpp (+12/-0) src/util/fs_util.cpp (+24/-0) src/util/fs_util.h (+28/-0) src/util/icu_streambuf.h (+1/-0) src/util/passthru_streambuf.cpp (+2/-2) src/util/passthru_streambuf.h (+10/-2) src/util/regex.cpp (+96/-82) src/util/regex.h (+22/-34) src/util/regex_xquery.cpp (+1860/-489) src/util/regex_xquery.h (+359/-123) src/util/transcode_streambuf.h (+5/-5) src/util/unicode_categories.cpp (+3/-3) src/util/unicode_categories.h (+44/-37) src/util/unicode_util.cpp (+20/-2) src/util/unicode_util.h (+47/-15) src/util/utf8_util.cpp (+6/-6) src/util/utf8_util.h (+29/-13) src/util/utf8_util.tcc (+10/-2) src/util/win32/dirent.h (+372/-0) src/zorbaserialization/archiver.cpp (+293/-482) src/zorbaserialization/archiver.h (+178/-131) src/zorbaserialization/bin_archiver.cpp (+33/-21) src/zorbaserialization/class_serializer.h (+74/-98) src/zorbaserialization/serialize_basic_types.cpp (+3/-2) src/zorbaserialization/serialize_basic_types.h (+29/-1) src/zorbaserialization/serialize_template_types.h (+483/-306) src/zorbaserialization/serialize_zorba_types.cpp (+248/-65) src/zorbaserialization/serialize_zorba_types.h (+87/-131) src/zorbaserialization/xml_archiver.cpp (+2/-2) src/zorbaserialization/xml_archiver.h (+45/-36) src/zorbaserialization/zorba_class_versions.cpp (+0/-6) src/zorbatypes/collation_manager.cpp (+17/-17) src/zorbatypes/collation_manager.h (+3/-3) src/zorbatypes/decimal.cpp (+22/-22) src/zorbatypes/decimal.h (+121/-169) src/zorbatypes/floatimpl.cpp (+57/-15) src/zorbatypes/floatimpl.h (+672/-468) src/zorbatypes/integer.cpp (+121/-9) src/zorbatypes/integer.h (+738/-259) src/zorbatypes/libicu.h (+0/-32) src/zorbatypes/transcoder.cpp (+8/-4) src/zorbatypes/transcoder.h (+9/-9) src/zorbautils/hashmap.h (+9/-0) src/zorbautils/hashmap_itemh.h (+36/-12) src/zorbautils/string_util.cpp (+19/-18) src/zorbautils/string_util.h (+15/-1) swig/DiagnosticHandler.i (+5/-3) swig/Exceptions.i (+3/-3) swig/Zorba.h (+50/-0) swig/Zorba.i (+48/-76) swig/java/CMakeLists.txt (+2/-0) swig/php/CMakeLists.txt (+1/-0) swig/php/zorba_api.i (+7/-0) swig/python/CMakeLists.txt (+1/-0) swig/python/tests/CMakeLists.txt (+3/-3) swig/python/tests/test03.py.in (+1/-0) swig/ruby/CMakeLists.txt (+1/-0) swig/various.i (+184/-0) swig/zorba_api.i (+12/-4) test/rbkt/ExpQueryResults/zorba/collections/uri-collection_1.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/eval/eval_reset.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/file/file_read_text_lines.xml.res (+32/-0) test/rbkt/ExpQueryResults/zorba/introspection/introsp-fn-7.xml.res (+1/-1) test/rbkt/ExpQueryResults/zorba/paths/path28.xml.res (+2/-0) test/rbkt/ExpQueryResults/zorba/pul-schema/create-collection.xml.res (+14/-0) test/rbkt/ExpQueryResults/zorba/pul-schema/empty-pul.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/pul-schema/insert-into-collection.xml.res (+8/-0) test/rbkt/ExpQueryResults/zorba/sequences/available-environment-variables.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/sequences/environment-variable_1.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/sequences/environment-variable_2.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/sequences/unparsed-text-available.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/sequences/unparsed-text-lines_1.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/sequences/unparsed-text-lines_2.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/sequences/unparsed-text_1.xml.res (+3/-0) test/rbkt/ExpQueryResults/zorba/sequences/unparsed-text_2.xml.res (+3/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_a1.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_a10.xml.res (+242/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_a11.xml.res (+6/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_a2.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_a3.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_a5.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_a6.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_a7.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_a8.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_a9.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m1.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m10.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m11.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m12.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m13.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m14.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m15.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m16.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m17.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m18.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m19.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m2.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m20.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m21.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m22.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m23.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m24.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m25.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m26.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m27.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m28.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m29.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m3.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m30.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m31.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m32.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m33.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m34.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m35.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m36.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m37.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m38.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m39.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m4.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m40.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m41.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m42.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m43.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m44.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m45.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m46.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m47.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m48.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m49.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m5.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m50.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m51.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m52.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m53.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m6.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m7.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m8.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_m9.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_prime1.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_r1.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_r10.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_r11.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_r12.xml.res (+5/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_r2.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_r3.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_r4.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_r5.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_r6.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_r9.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_t1.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_t4.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/string/Regex/regex_t5.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/testdriver/bom_bug.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/xdm-schema/1-to-5.xml.res (+7/-0) test/rbkt/ExpQueryResults/zorba/xdm-schema/empty-sequence.xml.res (+1/-0) test/rbkt/ExpQueryResults/zorba/xdm-schema/nodes.xml.res (+7/-0) test/rbkt/ExpQueryResults/zorba/xqddf/daniel/ric6.xml.res (+2/-2) test/rbkt/ExpQueryResults/zorba/xqddf/ic-foreignKey.xml.res (+1/-1) test/rbkt/ExpQueryResults/zorba/xqdoc/local.xml.res (+1/-1) test/rbkt/ExpQueryResults/zorba/xqdoc/no_global_var.xml.res (+1/-1) test/rbkt/Queries/CMakeLists.txt (+16/-1) test/rbkt/Queries/zorba/collections/modifier_3.xq (+1/-1) test/rbkt/Queries/zorba/collections/uri-collection.xml (+6/-0) test/rbkt/Queries/zorba/collections/uri-collection_1.xq (+16/-0) test/rbkt/Queries/zorba/collections/uri-collection_2.spec (+1/-0) test/rbkt/Queries/zorba/collections/uri-collection_2.xq (+16/-0) test/rbkt/Queries/zorba/eval/eval_reset.xq (+15/-0) test/rbkt/Queries/zorba/file/file_read_text_lines.xq (+4/-0) test/rbkt/Queries/zorba/no-copy/q21.xq (+86/-0) test/rbkt/Queries/zorba/paths/path28.xq (+2/-0) test/rbkt/Queries/zorba/pul-schema/create-collection.xq (+18/-0) test/rbkt/Queries/zorba/pul-schema/empty-pul.xq (+5/-0) test/rbkt/Queries/zorba/pul-schema/insert-into-collection.xq (+12/-0) test/rbkt/Queries/zorba/sequences/available-environment-variables.xq (+3/-0) test/rbkt/Queries/zorba/sequences/environment-variable_1.xq (+4/-0) test/rbkt/Queries/zorba/sequences/environment-variable_2.xq (+2/-0) test/rbkt/Queries/zorba/sequences/unparsed-text-available.xq (+1/-0) test/rbkt/Queries/zorba/sequences/unparsed-text-lines_1.xq (+1/-0) test/rbkt/Queries/zorba/sequences/unparsed-text-lines_2.xq (+1/-0) test/rbkt/Queries/zorba/sequences/unparsed-text-lines_3.spec (+1/-0) test/rbkt/Queries/zorba/sequences/unparsed-text-lines_3.xq (+1/-0) test/rbkt/Queries/zorba/sequences/unparsed-text-lines_4.spec (+1/-0) test/rbkt/Queries/zorba/sequences/unparsed-text-lines_4.xq (+1/-0) test/rbkt/Queries/zorba/sequences/unparsed-text_1.xq (+1/-0) test/rbkt/Queries/zorba/sequences/unparsed-text_2.xq (+1/-0) test/rbkt/Queries/zorba/sequences/unparsed-text_3.spec (+1/-0) test/rbkt/Queries/zorba/sequences/unparsed-text_3.xq (+1/-0) test/rbkt/Queries/zorba/sequences/unparsed-text_4.spec (+1/-0) test/rbkt/Queries/zorba/sequences/unparsed-text_4.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_a1.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_a10.xq (+11/-0) test/rbkt/Queries/zorba/string/Regex/regex_a11.xq (+9/-0) test/rbkt/Queries/zorba/string/Regex/regex_a2.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_a3.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_a5.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_a6.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_a7.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_a8.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_a9.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err1.spec (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err1.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err10.spec (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err10.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err11.spec (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err11.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err12.spec (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err12.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err13.spec (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err13.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err14.spec (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err14.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err15.spec (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err15.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err16.spec (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err16.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err17.spec (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err17.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err18.spec (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err18.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err19.spec (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err19.xq (+3/-0) test/rbkt/Queries/zorba/string/Regex/regex_err2.spec (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err2.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err20.spec (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err20.xq (+3/-0) test/rbkt/Queries/zorba/string/Regex/regex_err21.spec (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err21.xq (+3/-0) test/rbkt/Queries/zorba/string/Regex/regex_err22.spec (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err22.xq (+3/-0) test/rbkt/Queries/zorba/string/Regex/regex_err23.spec (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err23.xq (+3/-0) test/rbkt/Queries/zorba/string/Regex/regex_err24.spec (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err24.xq (+3/-0) test/rbkt/Queries/zorba/string/Regex/regex_err25.spec (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err25.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err3.spec (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err3.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err4.spec (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err4.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err5.spec (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err5.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err7.spec (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err7.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err8.spec (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err8.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err9.spec (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_err9.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m1.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m10.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m11.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m12.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m13.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m14.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m15.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m16.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m17.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m18.xq (+3/-0) test/rbkt/Queries/zorba/string/Regex/regex_m19.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m2.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m20.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m21.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m22.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m23.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m24.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m25.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m26.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m27.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m28.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m29.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m3.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m30.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m31.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m32.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m33.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m34.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m35.xq (+4/-0) test/rbkt/Queries/zorba/string/Regex/regex_m36.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m37.xq (+4/-0) test/rbkt/Queries/zorba/string/Regex/regex_m38.xq (+4/-0) test/rbkt/Queries/zorba/string/Regex/regex_m39.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m4.xq (+6/-0) test/rbkt/Queries/zorba/string/Regex/regex_m40.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m41.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m42.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m43.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m44.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m45.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m46.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m47.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m48.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m49.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m5.xq (+6/-0) test/rbkt/Queries/zorba/string/Regex/regex_m50.xq (+2/-0) test/rbkt/Queries/zorba/string/Regex/regex_m51.xq (+2/-0) test/rbkt/Queries/zorba/string/Regex/regex_m52.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m53.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_m6.xq (+6/-0) test/rbkt/Queries/zorba/string/Regex/regex_m7.xq (+6/-0) test/rbkt/Queries/zorba/string/Regex/regex_m8.xq (+7/-0) test/rbkt/Queries/zorba/string/Regex/regex_m9.xq (+7/-0) test/rbkt/Queries/zorba/string/Regex/regex_prime1.xq (+17/-0) test/rbkt/Queries/zorba/string/Regex/regex_r1.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_r10.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_r11.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_r12.xq (+7/-0) test/rbkt/Queries/zorba/string/Regex/regex_r2.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_r3.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_r4.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_r5.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_r6.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_r7_err.spec (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_r7_err.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_r8_err.spec (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_r8_err.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_r9.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_t1.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_t2.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_t3_err.spec (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_t3_err.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/regex_t4.xq (+2/-0) test/rbkt/Queries/zorba/string/Regex/regex_t5.xq (+1/-0) test/rbkt/Queries/zorba/string/Regex/zorba.html (+242/-0) test/rbkt/Queries/zorba/string/Regex/zorba2.html (+5/-0) test/rbkt/Queries/zorba/testdriver/bom_bug.xq (+1/-0) test/rbkt/Queries/zorba/xdm-schema/1-to-5.xq (+11/-0) test/rbkt/Queries/zorba/xdm-schema/empty-sequence.xq (+5/-0) test/rbkt/Queries/zorba/xdm-schema/nodes.xq (+11/-0) test/rbkt/Queries/zorba/xqddf/daniel/i1.xq (+1/-1) test/rbkt/Queries/zorba/xqddf/daniel/i2.xq (+1/-1) test/rbkt/Queries/zorba/xqddf/daniel/i3.xq (+1/-1) test/rbkt/Queries/zorba/xqddf/daniel/i4.xq (+1/-1) test/rbkt/Queries/zorba/xqddf/daniel/i5.xq (+2/-2) test/rbkt/Queries/zorba/xqddf/daniel/i6.xq (+4/-4) test/rbkt/Queries/zorba/xqddf/daniel/ric6.xq (+8/-4) test/rbkt/Queries/zorba/xqddf/daniel/undo1.xq (+7/-3) test/rbkt/Queries/zorba/xqddf/ic-foreignKey.xq (+10/-2) test/rbkt/Queries/zorba/xqdoc/moduleDocumentation.xq (+1/-0) test/rbkt/modules/CMakeLists.txt (+2/-0) test/rbkt/modules/java/CMakeLists.txt (+40/-0) test/rbkt/modules/java/Test.java (+7/-0) test/rbkt/testdriver.cpp (+2/-0) test/unit/static_context.cpp (+25/-0) test/update/CMakeLists.txt (+9/-0) |
To merge this branch: | bzr merge lp:~zorba-coders/zorba/jsoniq-plan_serialization |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Markos Zaharioudakis | Approve | ||
Matthias Brantner | Pending | ||
Review via email: mp+103872@code.launchpad.net |
This proposal supersedes a proposal from 2012-04-17.
Commit message
- plan serializer for jsoniq items and iterators
- some fixes for the build without json (still not compiling because of problems with the collection functions)
- marked all -nodes dml functions as deprecated
- fixed documentation of the dml and jsoniq modules
- fixed collections/
- ignore jsoniq.org/errors module in the moduleDocumentation test
Description of the change
- plan serializer for jsoniq items and iterators
- some fixes for the build without json (still not compiling because of problems with the collection functions)
- marked all -nodes dml functions as deprecated
- fixed documentation of the dml and jsoniq modules
- fixed collections/
- ignore jsoniq.org/errors module in the moduleDocumentation test
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal | # |
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal | # |
The attempt to merge lp:~zorba-coders/zorba/jsoniq-plan_serialization into lp:~zorba-coders/zorba/jsoniq failed. Below is the output from the failed tests.
CMake Error at /home/ceej/
Validation queue job jsoniq-
finished. The final status was:
No tests were run - build or configure step must have failed.
Not commiting changes.
Error in read script: /home/ceej/
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal | # |
The attempt to merge lp:~zorba-coders/zorba/jsoniq-plan_serialization into lp:~zorba-coders/zorba/jsoniq failed. Below is the output from the failed tests.
CMake Error at /home/ceej/
Validation queue job jsoniq-
finished. The final status was:
No tests were run - build or configure step must have failed.
Not commiting changes.
Error in read script: /home/ceej/
Markos Zaharioudakis (markos-za) : Posted in a previous version of this proposal | # |
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal | # |
The attempt to merge lp:~zorba-coders/zorba/jsoniq-plan_serialization into lp:~zorba-coders/zorba/jsoniq failed. Below is the output from the failed tests.
CMake Error at /home/ceej/
Validation queue job jsoniq-
finished. The final status was:
No tests were run - build or configure step must have failed.
Not commiting changes.
Error in read script: /home/ceej/
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal | # |
The attempt to merge lp:~zorba-coders/zorba/jsoniq-plan_serialization into lp:~zorba-coders/zorba/jsoniq failed. Below is the output from the failed tests.
CMake Error at /home/ceej/
Validation queue job jsoniq-
finished. The final status was:
122 tests did not succeed - changes not commited.
Error in read script: /home/ceej/
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
The attempt to merge lp:~zorba-coders/zorba/jsoniq-plan_serialization into lp:~zorba-coders/zorba/jsoniq failed. Below is the output from the failed tests.
CMake Error at /home/ceej/
Validation queue job jsoniq-
finished. The final status was:
6 tests did not succeed - changes not commited.
Error in read script: /home/ceej/
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
The attempt to merge lp:~zorba-coders/zorba/jsoniq-plan_serialization into lp:~zorba-coders/zorba/jsoniq failed. Below is the output from the failed tests.
CMake Error at /home/ceej/
Validation queue job jsoniq-
finished. The final status was:
6 tests did not succeed - changes not commited.
Error in read script: /home/ceej/
Markos Zaharioudakis (markos-za) : | # |
Preview Diff
1 | === modified file 'CMakeCompiler.txt' |
2 | --- CMakeCompiler.txt 2012-04-11 20:22:52 +0000 |
3 | +++ CMakeCompiler.txt 2012-04-27 13:22:48 +0000 |
4 | @@ -108,6 +108,9 @@ |
5 | IF(NOT CMAKE_CXX_FLAGS MATCHES "-Wextra") |
6 | SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra") |
7 | ENDIF(NOT CMAKE_CXX_FLAGS MATCHES "-Wextra") |
8 | + IF(NOT CMAKE_CXX_FLAGS MATCHES "-D_FILE_OFFSET_BITS") |
9 | + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FILE_OFFSET_BITS=64") |
10 | + ENDIF(NOT CMAKE_CXX_FLAGS MATCHES "-D_FILE_OFFSET_BITS") |
11 | IF (UNIX AND NOT APPLE) |
12 | IF (NOT CMAKE_SHARED_LINKER_FLAGS MATCHES "as-needed") |
13 | SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--as-needed") |
14 | |
15 | === modified file 'CMakeConfiguration.txt' |
16 | --- CMakeConfiguration.txt 2012-04-11 20:22:52 +0000 |
17 | +++ CMakeConfiguration.txt 2012-04-27 13:22:48 +0000 |
18 | @@ -135,14 +135,14 @@ |
19 | SET (ZORBA_DEBUG_STRING ${ZORBA_DEBUG_STRING} CACHE BOOL "debug strings") |
20 | MESSAGE (STATUS "ZORBA_DEBUG_STRING: " ${ZORBA_DEBUG_STRING}) |
21 | |
22 | -SET(ZORBA_NO_UNICODE OFF CACHE BOOL "disable ICU") |
23 | -MESSAGE(STATUS "ZORBA_NO_UNICODE: " ${ZORBA_NO_UNICODE}) |
24 | +SET(ZORBA_NO_ICU OFF CACHE BOOL "disable ICU") |
25 | +MESSAGE(STATUS "ZORBA_NO_ICU: " ${ZORBA_NO_ICU}) |
26 | |
27 | -IF (ZORBA_NO_UNICODE) |
28 | +IF (ZORBA_NO_ICU) |
29 | SET (no_full_text ON) |
30 | -ELSE (ZORBA_NO_UNICODE) |
31 | +ELSE (ZORBA_NO_ICU) |
32 | SET (no_full_text OFF) |
33 | -ENDIF (ZORBA_NO_UNICODE) |
34 | +ENDIF (ZORBA_NO_ICU) |
35 | SET (ZORBA_NO_FULL_TEXT ${no_full_text} CACHE BOOL "disable XQuery Full-Text support") |
36 | MESSAGE(STATUS "ZORBA_NO_FULL_TEXT: " ${ZORBA_NO_FULL_TEXT}) |
37 | |
38 | |
39 | === modified file 'CMakeLists.txt' |
40 | --- CMakeLists.txt 2012-04-11 20:22:52 +0000 |
41 | +++ CMakeLists.txt 2012-04-27 13:22:48 +0000 |
42 | @@ -123,10 +123,14 @@ |
43 | CHECK_TYPE_SIZE("int64_t" ZORBA_HAVE_INT64_T) |
44 | |
45 | CHECK_CXX_SOURCE_COMPILES ("#include <type_traits>\nint main() { std::enable_if<true,int> x; }" ZORBA_CXX_ENABLE_IF) |
46 | -CHECK_CXX_SOURCE_COMPILES ("int main() { int *p = nullptr; }" ZORBA_CXX_NULLPTR) |
47 | -CHECK_CXX_SOURCE_COMPILES ("int main() { static_assert(1,\"\"); }" ZORBA_CXX_STATIC_ASSERT) |
48 | +SET(CMAKE_EXTRA_INCLUDE_FILES wchar.h) |
49 | +CHECK_TYPE_SIZE("wchar_t" ZORBA_SIZEOF_WCHAR_T) |
50 | +SET(CMAKE_EXTRA_INCLUDE_FILES) |
51 | CHECK_CXX_SOURCE_COMPILES ("#include <memory>\nint main() { std::unique_ptr<int> p; }" ZORBA_CXX_UNIQUE_PTR) |
52 | |
53 | +CHECK_CXX_SOURCE_COMPILES("int main() { int *p = nullptr; }" ZORBA_CXX_NULLPTR) |
54 | +CHECK_CXX_SOURCE_COMPILES("int main() { static_assert(1,\"\"); }" ZORBA_CXX_STATIC_ASSERT) |
55 | + |
56 | ################################################################################ |
57 | # Various cmake macros |
58 | |
59 | |
60 | === modified file 'ChangeLog' |
61 | --- ChangeLog 2012-04-12 09:18:43 +0000 |
62 | +++ ChangeLog 2012-04-27 13:22:48 +0000 |
63 | @@ -3,7 +3,14 @@ |
64 | version 2.5 |
65 | |
66 | New Features: |
67 | + * fn:available-environment-variables |
68 | + * fn:environment-variables |
69 | + * fn:uri-collection |
70 | + * fn:unparsed-text |
71 | + * fn:unparsed-text-available |
72 | * Extended API for Python, Java, PHP and Ruby. |
73 | + * Add jvm classpath to zorbacmd and to Zorba API. Tracked by #931816 |
74 | + * Added support for NO_ICU (to not use ICU for unicode processing) |
75 | |
76 | Optimization: |
77 | |
78 | @@ -11,13 +18,21 @@ |
79 | * Fixed bug 955170 (Catch clause with URILiteral-based wilcard NameTest) |
80 | * Fixed bug 955135 (err:XQDY0044 not caught by try-catch expressions) |
81 | * Fixed bug #967864 (var substitution did not update theFreeVars property) |
82 | + * Fixed buf #891650 (context size var not always declared within path expr) |
83 | + * Fixed bug #948879 (--uri-path doesn't work with fetch:content()) |
84 | * Fixed bug in window iterator (binding the end vars in the output tuple stream) |
85 | * Fixed bug #866547 (protect index-join rule from general flwor) |
86 | + * Fixed bug #867253 (cdml:delete-nodes should only remove root nodes) |
87 | * Fixed bug #967428 (do not hoist index creation outside a try-catch) |
88 | * Fixed performance problem with the findNodeSources function of the no-copy rule |
89 | * Fixed bug #872234 (prevent a rewritting to take place in case of sequential expr) |
90 | + * Fixed bug #906494 (default compile with D_FILE_OFFSET_BITS=64) |
91 | * Fixed bug #912586, #912593 and #912722 (assertion failures with lax validation) |
92 | + * Fixed bug #921458 (file:read-text-lines() blocking) |
93 | + * Fixed bug #980526 (no-copy rule bug due to global var being set in "distant" udf) |
94 | * Fixed bug #949910 (has-children may be invoked on all nodes). Internally, zorba::store::Item::getChildren() now returns NULL on node classes without offspring (instead of raising an error). |
95 | + * Fixed Bug #933490: Error ItemFactoryImpl::createBase64Binary with istream |
96 | + * Fixed bug #867112 (Diagnostic Handler was not working on external APIs) |
97 | |
98 | |
99 | version 2.2 |
100 | @@ -153,7 +168,9 @@ |
101 | * Fixed bug when parsing a document with a base-uri attribute. |
102 | * Fixed bug #863320 (Sentence is incorrectly incremented when token characters end without sentence terminator) |
103 | * Fixed bug #863730 (static delete-node* functions don't raise ZDDY0012) |
104 | + * Implemented the probe-index-range-value for general indexes |
105 | * Removed ZSTR0005 and ZSTR0006 error codes |
106 | + * Fixed bug #867662 ("nullptr" warning) |
107 | * Fixed bug #868258 (Assertion failure with two delete collection) |
108 | * Fixed bug #871623 and #871629 (assertion failures with insertions in dynamic collections) |
109 | * Fixed bug #867262 (allow reuse of iterator over ExtFuncArgItemSequence) |
110 | @@ -162,6 +179,8 @@ |
111 | * New node-reference module. References can be obtained for any node, and |
112 | different nodes cannot have the same identifier. |
113 | * Fixed bug #872697 (segmentation fault with validation of NMTOKENS) |
114 | + * General index cannot be declared as unique if the type of its key is |
115 | + xs:anyAtomicType or xs:untypedAtomic. |
116 | * Added undo for node revalidation |
117 | * Optimization for count(collection()) expressions |
118 | * Fixed bug #872796 (validate-in-place can interfere with other update primitives) |
119 | @@ -180,6 +199,8 @@ |
120 | * Fixed bug #855715 (Invalid escaped characters in regex not caught) |
121 | * Fixed bug #862089 (Split binary/xq install directories for modules) by |
122 | splitting "module path" into separate URI and Library paths |
123 | + * New node-position module. This module allows to obtain a representation of a node position, which |
124 | + can be used to assess structural relationships with other nodes. |
125 | * Fixed bug #872502 (validation of the JSON module xqdoc fails) |
126 | * Fixed bug #897619 (testdriver_mt can not run the XQueryX tests) |
127 | * Fixed bug #867107 (xqdoc dependency to zorba is wrong) |
128 | |
129 | === modified file 'KNOWN_ISSUES.txt' |
130 | --- KNOWN_ISSUES.txt 2012-04-11 20:22:52 +0000 |
131 | +++ KNOWN_ISSUES.txt 2012-04-27 13:22:48 +0000 |
132 | @@ -37,7 +37,7 @@ |
133 | * The serializer currently doesn't implement character maps as specified |
134 | (http://www.w3.org/TR/xslt-xquery-serialization/#character-maps) |
135 | |
136 | -* In the 2.0 release, setting the CMake variables ZORBA_NO_UNICODE to |
137 | +* In the 2.0 release, setting the CMake variables ZORBA_NO_ICU to |
138 | ON is not supported. |
139 | |
140 | * The PHP language binding is not supported on Mac OS X. For details, |
141 | |
142 | === modified file 'NOTICE.txt' |
143 | --- NOTICE.txt 2012-04-11 20:22:52 +0000 |
144 | +++ NOTICE.txt 2012-04-27 13:22:48 +0000 |
145 | @@ -459,6 +459,24 @@ |
146 | suitability of this software for any purpose. It is provided "as is" |
147 | without express or implied warranty. |
148 | |
149 | +---------------------------------------------------- |
150 | + |
151 | +src/util/win32/dirent.h |
152 | + |
153 | +Copyright: 2006 Toni Ronkko |
154 | + |
155 | + |
156 | + Permission is hereby granted, free of charge, to any person obtaining |
157 | + a copy of this software and associated documentation files (the |
158 | + ``Software''), to deal in the Software without restriction, including |
159 | + without limitation the rights to use, copy, modify, merge, publish, |
160 | + distribute, sublicense, and/or sell copies of the Software, and to |
161 | + permit persons to whom the Software is furnished to do so, subject to |
162 | + the following conditions: |
163 | + |
164 | + The above copyright notice and this permission notice shall be included |
165 | + in all copies or substantial portions of the Software. |
166 | + |
167 | |
168 | External libraries used by this project: |
169 | ---------------------------------------------------- |
170 | |
171 | === modified file 'NOTICE.xml' |
172 | --- NOTICE.xml 2012-04-11 20:22:52 +0000 |
173 | +++ NOTICE.xml 2012-04-27 13:22:48 +0000 |
174 | @@ -423,6 +423,22 @@ |
175 | without express or implied warranty. |
176 | </foreign-notice> |
177 | </foreign-files> |
178 | + <foreign-files> |
179 | + <file>src/util/win32/dirent.h</file> |
180 | + <copyright>2006 Toni Ronkko</copyright> |
181 | + <foreign-notice> |
182 | + Permission is hereby granted, free of charge, to any person obtaining |
183 | + a copy of this software and associated documentation files (the |
184 | + ``Software''), to deal in the Software without restriction, including |
185 | + without limitation the rights to use, copy, modify, merge, publish, |
186 | + distribute, sublicense, and/or sell copies of the Software, and to |
187 | + permit persons to whom the Software is furnished to do so, subject to |
188 | + the following conditions: |
189 | + |
190 | + The above copyright notice and this permission notice shall be included |
191 | + in all copies or substantial portions of the Software. |
192 | + </foreign-notice> |
193 | + </foreign-files> |
194 | |
195 | <external-lib mandatory="true"> |
196 | <name>LIBXML2</name> |
197 | |
198 | === modified file 'bin/path_util.cpp' |
199 | --- bin/path_util.cpp 2012-04-11 20:22:52 +0000 |
200 | +++ bin/path_util.cpp 2012-04-27 13:22:48 +0000 |
201 | @@ -49,7 +49,7 @@ |
202 | } |
203 | |
204 | |
205 | -static void |
206 | +void |
207 | tokenizePath( |
208 | const std::string& aPathStr, |
209 | std::vector<String>& aResult) |
210 | @@ -66,6 +66,23 @@ |
211 | } |
212 | } |
213 | |
214 | + |
215 | +String |
216 | +concatenatePaths( const std::vector<String>& aPathList) |
217 | +{ |
218 | + String delimiter(filesystem_path::get_path_separator()); |
219 | + |
220 | + String lResult; |
221 | + for (std::vector<String>::const_iterator lIter = aPathList.begin(); |
222 | + lIter != aPathList.end(); ++lIter) |
223 | + { |
224 | + lResult += delimiter + *lIter; |
225 | + } |
226 | + |
227 | + return lResult; |
228 | +} |
229 | + |
230 | + |
231 | void |
232 | setPathsOnContext( |
233 | const ZorbaCMDProperties& aProperties, |
234 | @@ -101,8 +118,8 @@ |
235 | // Compute and set lib path |
236 | aProperties.getLibPath(lPathStr); |
237 | tokenizePath(lPathStr, lPath); |
238 | + lPath.push_back(lCWD.get_path()); |
239 | lEnvStr = getPathFromEnvironment("ZORBA_LIB_PATH"); |
240 | - lPath.push_back(lCWD.get_path()); |
241 | tokenizePath(lEnvStr, lPath); |
242 | aStaticCtx->setLibPath(lPath); |
243 | } |
244 | |
245 | === modified file 'bin/path_util.h' |
246 | --- bin/path_util.h 2012-04-11 20:22:52 +0000 |
247 | +++ bin/path_util.h 2012-04-27 13:22:48 +0000 |
248 | @@ -32,6 +32,12 @@ |
249 | setPathsOnContext(const ZorbaCMDProperties& aProperties, |
250 | zorba::StaticContext_t& aStaticCtx); |
251 | |
252 | + void |
253 | + tokenizePath(const std::string& aPathStr, std::vector<String>& aResult); |
254 | + |
255 | + |
256 | + String |
257 | + concatenatePaths( const std::vector<String>& aPathList); |
258 | |
259 | } |
260 | } /* namespace zorba */ |
261 | |
262 | === modified file 'bin/zorbacmd.cpp' |
263 | --- bin/zorbacmd.cpp 2012-04-11 20:22:52 +0000 |
264 | +++ bin/zorbacmd.cpp 2012-04-27 13:22:48 +0000 |
265 | @@ -787,6 +787,14 @@ |
266 | return 3; |
267 | } |
268 | |
269 | + // Add command line --classpath option in front of config/env CLASSPATH |
270 | + Properties* globalProperties = Properties::instance(); |
271 | + std::string cmdJvmClassPath; |
272 | + lProperties.getJVMClassPath(cmdJvmClassPath); |
273 | + std::string configJvmClassPath; |
274 | + globalProperties->getJVMClassPath(configJvmClassPath); |
275 | + globalProperties->setJVMClassPath(cmdJvmClassPath + |
276 | + filesystem_path::get_path_separator() + configJvmClassPath); |
277 | |
278 | // Start the engine |
279 | |
280 | |
281 | === modified file 'bin/zorbacmdproperties.cpp' |
282 | --- bin/zorbacmdproperties.cpp 2012-04-11 20:22:52 +0000 |
283 | +++ bin/zorbacmdproperties.cpp 2012-04-27 13:22:48 +0000 |
284 | @@ -181,6 +181,11 @@ |
285 | aPath = theLibPath; |
286 | } |
287 | |
288 | +void ZorbaCMDProperties::getJVMClassPath(std::string& aPath) const |
289 | +{ |
290 | + aPath = theClasspath; |
291 | +} |
292 | + |
293 | std::vector<std::pair<std::string,std::string> > ZorbaCMDProperties::getSerializerParameters() const |
294 | { |
295 | std::vector<std::pair<std::string,std::string> > lResult; |
296 | |
297 | === modified file 'bin/zorbacmdproperties.h' |
298 | --- bin/zorbacmdproperties.h 2012-04-11 20:22:52 +0000 |
299 | +++ bin/zorbacmdproperties.h 2012-04-27 13:22:48 +0000 |
300 | @@ -92,6 +92,9 @@ |
301 | void |
302 | getLibPath(std::string&) const; |
303 | |
304 | + void |
305 | + getJVMClassPath(std::string&) const; |
306 | + |
307 | bool isDebug(){ return theDebug; } |
308 | |
309 | bool hasNoLogo(){ return theNoLogo; } |
310 | |
311 | === modified file 'bin/zorbacmdproperties.txt' |
312 | --- bin/zorbacmdproperties.txt 2012-04-11 20:22:52 +0000 |
313 | +++ bin/zorbacmdproperties.txt 2012-04-27 13:22:48 +0000 |
314 | @@ -31,6 +31,7 @@ |
315 | ("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.") |
316 | ("lib-path", po::value<std::string>(), "Library path (list of directories) where Zorba will look for dynamic libraries (e.g., module external function implementations.") |
317 | ("module-path", po::value<std::string>(), "Path (list of directories) to add to both the URI and Library paths.") |
318 | +("classpath", po::value<std::string>(), "JVM classpath to be used by modules using Java implementations") |
319 | ("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"). |
320 | ("trailing-nl", "Output a trailing newline after the result of the query.") |
321 | ("stop-words", po::value<std::vector<std::string> >(), "Mapping specifying a stop-words URI to another.") |
322 | |
323 | === modified file 'bin/zorbacmdproperties_base.h' |
324 | --- bin/zorbacmdproperties_base.h 2012-04-11 20:22:52 +0000 |
325 | +++ bin/zorbacmdproperties_base.h 2012-04-27 13:22:48 +0000 |
326 | @@ -15,13 +15,6 @@ |
327 | */ |
328 | /* vim:set et sw=2 ts=2: */ |
329 | |
330 | -// ****************************************** |
331 | -// * * |
332 | -// * THIS IS A GENERATED FILE. DO NOT EDIT! * |
333 | -// * SEE .txt FILE WITH SAME NAME * |
334 | -// * * |
335 | -// ****************************************** |
336 | - |
337 | #include <string> |
338 | #include <sstream> |
339 | #include <zorba/config.h> |
340 | @@ -30,13 +23,29 @@ |
341 | |
342 | #ifndef ZORBACMD_ZORBACMDPROPERTIESBASE |
343 | #define ZORBACMD_ZORBACMDPROPERTIESBASE |
344 | -namespace zorbacmd { |
345 | -class ZorbaCMDPropertiesBase : public ::zorba::PropertiesBase { |
346 | +namespace zorbacmd |
347 | +{ |
348 | + |
349 | +class ZorbaCMDPropertiesBase : public ::zorba::PropertiesBase |
350 | +{ |
351 | protected: |
352 | - const char **get_all_options () const { |
353 | - static const char *result [] = { "--timing", "--output-file", "--serialization-parameter", "--serialize-html", "--serialize-text", "--indent", "--print-query", "--print-errors-as-xml", "--byte-order-mark", "--omit-xml-declaration", "--base-uri", "--boundary-space", "--default-collation", "--construction-mode", "--ordering-mode", "--multiple", "--query", "--as-files", "--external-variable", "--context-item", "--optimization-level", "--lib-module", "--parse-only", "--compile-only", "--no-serializer", "--debug", "--debug-host", "--debug-port", "--no-logo", "--timeout", "--uri-path", "--lib-path", "--module-path", "--option", "--trailing-nl", "--stop-words", "--thesaurus", "--compile-plan", "--execute-plan", NULL }; |
354 | + const char **get_all_options () const |
355 | + { |
356 | + static const char *result [] = { |
357 | + "--timing", "--output-file", "--serialization-parameter", |
358 | + "--serialize-html", "--serialize-text", "--indent", "--print-query", |
359 | + "--print-errors-as-xml", "--byte-order-mark", "--omit-xml-declaration", |
360 | + "--base-uri", "--boundary-space", "--default-collation", |
361 | + "--construction-mode", "--ordering-mode", "--multiple", "--query", |
362 | + "--as-files", "--external-variable", "--context-item", |
363 | + "--optimization-level", "--lib-module", "--parse-only", "--compile-only", |
364 | + "--no-serializer", "--debug", "--debug-host", "--debug-port", "--no-logo", |
365 | + "--timeout", "--uri-path", "--lib-path", "--module-path", "--classpath", |
366 | + "--option", "--trailing-nl", "--stop-words", "--thesaurus", |
367 | + "--compile-plan", "--execute-plan", NULL }; |
368 | return result; |
369 | } |
370 | + |
371 | bool theTiming; |
372 | std::string theOutputFile; |
373 | std::vector<std::string> theSerializationParameter; |
374 | @@ -70,6 +79,7 @@ |
375 | std::string theUriPath; |
376 | std::string theLibPath; |
377 | std::string theModulePath; |
378 | + std::string theClasspath; |
379 | std::vector<std::string> theOption; |
380 | bool theTrailingNl; |
381 | std::vector<std::string> theStopWords; |
382 | @@ -136,6 +146,7 @@ |
383 | const std::string &uriPath () const { return theUriPath; } |
384 | const std::string &libPath () const { return theLibPath; } |
385 | const std::string &modulePath () const { return theModulePath; } |
386 | + const std::string &classpath () const { return theClasspath; } |
387 | const std::vector<std::string> &option () const { return theOption; } |
388 | const bool &trailingNl () const { return theTrailingNl; } |
389 | const std::vector<std::string> &stopWords () const { return theStopWords; } |
390 | @@ -158,12 +169,16 @@ |
391 | else if (strcmp (*argv, "--output-file") == 0 || strncmp (*argv, "-o", 2) == 0) { |
392 | int d = 2; |
393 | if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; } |
394 | - if (*argv == NULL) { result = "No value given for --output-file option"; break; } init_val (*argv, theOutputFile, d); |
395 | + if (*argv == NULL) { result = "No value given for --output-file option"; break; } |
396 | + |
397 | + init_val (*argv, theOutputFile, d); |
398 | } |
399 | else if (strcmp (*argv, "--serialization-parameter") == 0 || strncmp (*argv, "-z", 2) == 0) { |
400 | int d = 2; |
401 | if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; } |
402 | - if (*argv == NULL) { result = "No value given for --serialization-parameter option"; break; } init_val (*argv, theSerializationParameter, d); |
403 | + if (*argv == NULL) { result = "No value given for --serialization-parameter option"; break; } |
404 | + |
405 | + init_val (*argv, theSerializationParameter, d); |
406 | } |
407 | else if (strcmp (*argv, "--serialize-html") == 0) { |
408 | theSerializeHtml = true; |
409 | @@ -189,37 +204,51 @@ |
410 | else if (strcmp (*argv, "--base-uri") == 0) { |
411 | int d = 2; |
412 | if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; } |
413 | - if (*argv == NULL) { result = "No value given for --base-uri option"; break; } init_val (*argv, theBaseUri, d); |
414 | + if (*argv == NULL) { result = "No value given for --base-uri option"; break; } |
415 | + |
416 | + init_val (*argv, theBaseUri, d); |
417 | } |
418 | else if (strcmp (*argv, "--boundary-space") == 0) { |
419 | int d = 2; |
420 | if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; } |
421 | - if (*argv == NULL) { result = "No value given for --boundary-space option"; break; } init_val (*argv, theBoundarySpace, d); |
422 | + if (*argv == NULL) { result = "No value given for --boundary-space option"; break; } |
423 | + |
424 | + init_val (*argv, theBoundarySpace, d); |
425 | } |
426 | else if (strcmp (*argv, "--default-collation") == 0) { |
427 | int d = 2; |
428 | if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; } |
429 | - if (*argv == NULL) { result = "No value given for --default-collation option"; break; } init_val (*argv, theDefaultCollation, d); |
430 | + if (*argv == NULL) { result = "No value given for --default-collation option"; break; } |
431 | + |
432 | + init_val (*argv, theDefaultCollation, d); |
433 | } |
434 | else if (strcmp (*argv, "--construction-mode") == 0) { |
435 | int d = 2; |
436 | if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; } |
437 | - if (*argv == NULL) { result = "No value given for --construction-mode option"; break; } init_val (*argv, theConstructionMode, d); |
438 | + if (*argv == NULL) { result = "No value given for --construction-mode option"; break; } |
439 | + |
440 | + init_val (*argv, theConstructionMode, d); |
441 | } |
442 | else if (strcmp (*argv, "--ordering-mode") == 0) { |
443 | int d = 2; |
444 | if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; } |
445 | - if (*argv == NULL) { result = "No value given for --ordering-mode option"; break; } init_val (*argv, theOrderingMode, d); |
446 | + if (*argv == NULL) { result = "No value given for --ordering-mode option"; break; } |
447 | + |
448 | + init_val (*argv, theOrderingMode, d); |
449 | } |
450 | else if (strcmp (*argv, "--multiple") == 0 || strncmp (*argv, "-m", 2) == 0) { |
451 | int d = 2; |
452 | if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; } |
453 | - if (*argv == NULL) { result = "No value given for --multiple option"; break; } init_val (*argv, theMultiple, d); |
454 | + if (*argv == NULL) { result = "No value given for --multiple option"; break; } |
455 | + |
456 | + init_val (*argv, theMultiple, d); |
457 | } |
458 | else if (strcmp (*argv, "--query") == 0 || strncmp (*argv, "-q", 2) == 0) { |
459 | int d = 2; |
460 | if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; } |
461 | - if (*argv == NULL) { result = "No value given for --query option"; break; } init_val (*argv, theQueriesOrFiles, d); |
462 | + if (*argv == NULL) { result = "No value given for --query option"; break; } |
463 | + |
464 | + init_val (*argv, theQueriesOrFiles, d); |
465 | } |
466 | else if (strcmp (*argv, "--as-files") == 0 || strncmp (*argv, "-f", 2) == 0) { |
467 | theAsFiles = true; |
468 | @@ -227,17 +256,23 @@ |
469 | else if (strcmp (*argv, "--external-variable") == 0 || strncmp (*argv, "-e", 2) == 0) { |
470 | int d = 2; |
471 | if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; } |
472 | - if (*argv == NULL) { result = "No value given for --external-variable option"; break; } init_val (*argv, theExternalVariable, d); |
473 | + if (*argv == NULL) { result = "No value given for --external-variable option"; break; } |
474 | + |
475 | + init_val (*argv, theExternalVariable, d); |
476 | } |
477 | else if (strcmp (*argv, "--context-item") == 0) { |
478 | int d = 2; |
479 | if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; } |
480 | - if (*argv == NULL) { result = "No value given for --context-item option"; break; } init_val (*argv, theContextItem, d); |
481 | + if (*argv == NULL) { result = "No value given for --context-item option"; break; } |
482 | + |
483 | + init_val (*argv, theContextItem, d); |
484 | } |
485 | else if (strcmp (*argv, "--optimization-level") == 0) { |
486 | int d = 2; |
487 | if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; } |
488 | - if (*argv == NULL) { result = "No value given for --optimization-level option"; break; } init_val (*argv, theOptimizationLevel, d); |
489 | + if (*argv == NULL) { result = "No value given for --optimization-level option"; break; } |
490 | + |
491 | + init_val (*argv, theOptimizationLevel, d); |
492 | } |
493 | else if (strcmp (*argv, "--lib-module") == 0 || strncmp (*argv, "-l", 2) == 0) { |
494 | theLibModule = true; |
495 | @@ -257,12 +292,16 @@ |
496 | else if (strcmp (*argv, "--debug-host") == 0 || strncmp (*argv, "-h", 2) == 0) { |
497 | int d = 2; |
498 | if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; } |
499 | - if (*argv == NULL) { result = "No value given for --debug-host option"; break; } init_val (*argv, theDebugHost, d); |
500 | + if (*argv == NULL) { result = "No value given for --debug-host option"; break; } |
501 | + |
502 | + init_val (*argv, theDebugHost, d); |
503 | } |
504 | else if (strcmp (*argv, "--debug-port") == 0 || strncmp (*argv, "-p", 2) == 0) { |
505 | int d = 2; |
506 | if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; } |
507 | - if (*argv == NULL) { result = "No value given for --debug-port option"; break; } init_val (*argv, theDebugPort, d); |
508 | + if (*argv == NULL) { result = "No value given for --debug-port option"; break; } |
509 | + |
510 | + init_val (*argv, theDebugPort, d); |
511 | } |
512 | else if (strcmp (*argv, "--no-logo") == 0) { |
513 | theNoLogo = true; |
514 | @@ -270,27 +309,44 @@ |
515 | else if (strcmp (*argv, "--timeout") == 0) { |
516 | int d = 2; |
517 | if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; } |
518 | - if (*argv == NULL) { result = "No value given for --timeout option"; break; } init_val (*argv, theTimeout, d); |
519 | + if (*argv == NULL) { result = "No value given for --timeout option"; break; } |
520 | + |
521 | + init_val (*argv, theTimeout, d); |
522 | } |
523 | else if (strcmp (*argv, "--uri-path") == 0) { |
524 | int d = 2; |
525 | if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; } |
526 | - if (*argv == NULL) { result = "No value given for --uri-path option"; break; } init_val (*argv, theUriPath, d); |
527 | + if (*argv == NULL) { result = "No value given for --uri-path option"; break; } |
528 | + |
529 | + init_val (*argv, theUriPath, d); |
530 | } |
531 | else if (strcmp (*argv, "--lib-path") == 0) { |
532 | int d = 2; |
533 | if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; } |
534 | - if (*argv == NULL) { result = "No value given for --lib-path option"; break; } init_val (*argv, theLibPath, d); |
535 | + if (*argv == NULL) { result = "No value given for --lib-path option"; break; } |
536 | + |
537 | + init_val (*argv, theLibPath, d); |
538 | } |
539 | else if (strcmp (*argv, "--module-path") == 0) { |
540 | int d = 2; |
541 | if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; } |
542 | - if (*argv == NULL) { result = "No value given for --module-path option"; break; } init_val (*argv, theModulePath, d); |
543 | + if (*argv == NULL) { result = "No value given for --module-path option"; break; } |
544 | + |
545 | + init_val (*argv, theModulePath, d); |
546 | + } |
547 | + else if (strcmp (*argv, "--classpath") == 0) { |
548 | + int d = 2; |
549 | + if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; } |
550 | + if (*argv == NULL) { result = "No value given for --classpath option"; break; } |
551 | + |
552 | + init_val (*argv, theClasspath, d); |
553 | } |
554 | else if (strcmp (*argv, "--option") == 0) { |
555 | int d = 2; |
556 | if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; } |
557 | - if (*argv == NULL) { result = "No value given for --option option"; break; } init_val (*argv, theOption, d); |
558 | + if (*argv == NULL) { result = "No value given for --option option"; break; } |
559 | + |
560 | + init_val (*argv, theOption, d); |
561 | } |
562 | else if (strcmp (*argv, "--trailing-nl") == 0) { |
563 | theTrailingNl = true; |
564 | @@ -298,12 +354,16 @@ |
565 | else if (strcmp (*argv, "--stop-words") == 0) { |
566 | int d = 2; |
567 | if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; } |
568 | - if (*argv == NULL) { result = "No value given for --stop-words option"; break; } init_val (*argv, theStopWords, d); |
569 | + if (*argv == NULL) { result = "No value given for --stop-words option"; break; } |
570 | + |
571 | + init_val (*argv, theStopWords, d); |
572 | } |
573 | else if (strcmp (*argv, "--thesaurus") == 0) { |
574 | int d = 2; |
575 | if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; } |
576 | - if (*argv == NULL) { result = "No value given for --thesaurus option"; break; } init_val (*argv, theThesaurus, d); |
577 | + if (*argv == NULL) { result = "No value given for --thesaurus option"; break; } |
578 | + |
579 | + init_val (*argv, theThesaurus, d); |
580 | } |
581 | else if (strcmp (*argv, "--compile-plan") == 0 || strncmp (*argv, "-c", 2) == 0) { |
582 | theCompilePlan = true; |
583 | @@ -327,46 +387,47 @@ |
584 | |
585 | const char *get_help_msg () const { |
586 | return |
587 | -"--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" |
588 | -"--output-file, -o\nWrite the result to the given file.\n\n" |
589 | -"--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" |
590 | -"--serialize-html\nSerialize the result as HTML.\n\n" |
591 | -"--serialize-text\nSerialize the result as Text.\n\n" |
592 | -"--indent, -i\nIndent output.\n\n" |
593 | -"--print-query\nPrint the queries.\n\n" |
594 | -"--print-errors-as-xml, -x\nPrint the errors as XML.\n\n" |
595 | -"--byte-order-mark\nSet the byte-order-mark for the serializer.\n\n" |
596 | -"--omit-xml-declaration, -r\nOmit the XML declaration from the result.\n\n" |
597 | -"--base-uri\nSet the base URI property of the static context.\n\n" |
598 | -"--boundary-space\nSet the boundary-space policy ('strip' or 'preserve') in the static context.\n\n" |
599 | -"--default-collation\nAdd the given collation and set the value of the default collation in the static context to the given collation.\n\n" |
600 | -"--construction-mode\nSet the construction mode ('strip' or 'preserve') in the static context.\n\n" |
601 | -"--ordering-mode\nSet the ordering mode ('ordered' or 'unordered') in the static context.\n\n" |
602 | -"--multiple, -m\nExecute the given queries multiple times.\n\n" |
603 | -"--query, -q\nQuery test or file URI (file://...)\n\n" |
604 | -"--as-files, -f\nTreat all -q arguments as file paths instead of URIs or inline queries.\n\n" |
605 | -"--external-variable, -e\nProvide the value for a variable given a file (name=file) or a value (name:=value)\n\n" |
606 | -"--context-item\nSet the context item to the XML document in a given file.\n\n" |
607 | -"--optimization-level\nOptimization level for the query compiler (O0, O1 or O2 - default: O1)\n\n" |
608 | -"--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" |
609 | -"--parse-only\nStop after parsing the query.\n\n" |
610 | -"--compile-only\nOnly compile (don't execute)\n\n" |
611 | -"--no-serializer\nDo not serialize (discard) result.\n\n" |
612 | -"--debug, -d\nLaunch the Zorba debugger server and connect to a DBGP-enabled debugger client.\n\n" |
613 | -"--debug-host, -h\nThe host where the DBGP-enabled debugger client listens for connections. Defaults to: 127.0.0.1\n\n" |
614 | -"--debug-port, -p\nThe port on which the DBGP-enabled debugger client listens for connections. Defaults to: 28028\n\n" |
615 | -"--no-logo\nPrint no logo when starting.\n\n" |
616 | -"--timeout\nSpecify a timeout in seconds. After the specified time, the execution of the query will be aborted.\n\n" |
617 | -"--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" |
618 | -"--lib-path\nLibrary path (list of directories) where Zorba will look for dynamic libraries (e.g., module external function implementations.\n\n" |
619 | -"--module-path\nPath (list of directories) to add to both the URI and Library paths.\n\n" |
620 | -"--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" |
621 | -"--trailing-nl\nOutput a trailing newline after the result of the query.\n\n" |
622 | -"--stop-words\nMapping specifying a stop-words URI to another.\n\n" |
623 | -"--thesaurus\nMapping specifying a thesaurus URI to another.\n\n" |
624 | -"--compile-plan, -c\nOutput the query plan as binary.\n\n" |
625 | -"--execute-plan\nTake a query plan as binary and execute it. Binary query plans can be generated using the --compile-plan option.\n\n" |
626 | -; |
627 | + "--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" |
628 | + "--output-file, -o\nWrite the result to the given file.\n\n" |
629 | + "--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" |
630 | + "--serialize-html\nSerialize the result as HTML.\n\n" |
631 | + "--serialize-text\nSerialize the result as Text.\n\n" |
632 | + "--indent, -i\nIndent output.\n\n" |
633 | + "--print-query\nPrint the queries.\n\n" |
634 | + "--print-errors-as-xml, -x\nPrint the errors as XML.\n\n" |
635 | + "--byte-order-mark\nSet the byte-order-mark for the serializer.\n\n" |
636 | + "--omit-xml-declaration, -r\nOmit the XML declaration from the result.\n\n" |
637 | + "--base-uri\nSet the base URI property of the static context.\n\n" |
638 | + "--boundary-space\nSet the boundary-space policy ('strip' or 'preserve') in the static context.\n\n" |
639 | + "--default-collation\nAdd the given collation and set the value of the default collation in the static context to the given collation.\n\n" |
640 | + "--construction-mode\nSet the construction mode ('strip' or 'preserve') in the static context.\n\n" |
641 | + "--ordering-mode\nSet the ordering mode ('ordered' or 'unordered') in the static context.\n\n" |
642 | + "--multiple, -m\nExecute the given queries multiple times.\n\n" |
643 | + "--query, -q\nQuery test or file URI (file://...)\n\n" |
644 | + "--as-files, -f\nTreat all -q arguments as file paths instead of URIs or inline queries.\n\n" |
645 | + "--external-variable, -e\nProvide the value for a variable given a file (name=file) or a value (name:=value)\n\n" |
646 | + "--context-item\nSet the context item to the XML document in a given file.\n\n" |
647 | + "--optimization-level\nOptimization level for the query compiler (O0, O1 or O2 - default: O1)\n\n" |
648 | + "--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" |
649 | + "--parse-only\nStop after parsing the query.\n\n" |
650 | + "--compile-only\nOnly compile (don't execute)\n\n" |
651 | + "--no-serializer\nDo not serialize (discard) result.\n\n" |
652 | + "--debug, -d\nLaunch the Zorba debugger server and connect to a DBGP-enabled debugger client.\n\n" |
653 | + "--debug-host, -h\nThe host where the DBGP-enabled debugger client listens for connections. Defaults to: 127.0.0.1\n\n" |
654 | + "--debug-port, -p\nThe port on which the DBGP-enabled debugger client listens for connections. Defaults to: 28028\n\n" |
655 | + "--no-logo\nPrint no logo when starting.\n\n" |
656 | + "--timeout\nSpecify a timeout in seconds. After the specified time, the execution of the query will be aborted.\n\n" |
657 | + "--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" |
658 | + "--lib-path\nLibrary path (list of directories) where Zorba will look for dynamic libraries (e.g., module external function implementations.\n\n" |
659 | + "--module-path\nPath (list of directories) to add to both the URI and Library paths.\n\n" |
660 | + "--classpath\nJVM classpath to be used by modules using Java implementations\n\n" |
661 | + "--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" |
662 | + "--trailing-nl\nOutput a trailing newline after the result of the query.\n\n" |
663 | + "--stop-words\nMapping specifying a stop-words URI to another.\n\n" |
664 | + "--thesaurus\nMapping specifying a thesaurus URI to another.\n\n" |
665 | + "--compile-plan, -c\nOutput the query plan as binary.\n\n" |
666 | + "--execute-plan\nTake a query plan as binary and execute it. Binary query plans can be generated using the --compile-plan option.\n\n" |
667 | + ; |
668 | } |
669 | |
670 | static const ZorbaCMDPropertiesBase *instance () { |
671 | |
672 | === modified file 'cmake_modules/ZorbaModule.cmake' |
673 | --- cmake_modules/ZorbaModule.cmake 2012-04-11 20:22:52 +0000 |
674 | +++ cmake_modules/ZorbaModule.cmake 2012-04-27 13:22:48 +0000 |
675 | @@ -140,7 +140,6 @@ |
676 | ENDIF (NOT IS_ABSOLUTE "${MODULE_FILE}") |
677 | GET_FILENAME_COMPONENT (module_name "${MODULE_FILE}" NAME) |
678 | |
679 | - |
680 | MANGLE_URI (${MODULE_URI} ".xq" module_path module_filename) |
681 | |
682 | # Compute a CMake-symbol-safe version of the target URI, for storing |
683 | @@ -267,6 +266,14 @@ |
684 | SET (module_filewe "${module_filewe}_${MODULE_VERSION}") |
685 | ENDIF (MODULE_VERSION) |
686 | |
687 | + # Compute the output path for the library. Note: This is copied |
688 | + # from ADD_COPY_RULE(); probably should refactor this logic. |
689 | + IF (${MODULE_TEST_ONLY} EQUAL 1) |
690 | + SET (_output_basedir "${CMAKE_BINARY_DIR}/TEST_LIB_PATH") |
691 | + ELSE (${MODULE_TEST_ONLY} EQUAL 1) |
692 | + SET (_output_basedir "${CMAKE_BINARY_DIR}/LIB_PATH") |
693 | + ENDIF (${MODULE_TEST_ONLY} EQUAL 1) |
694 | + |
695 | # It seems like it would be nice to set the VERSION and/or |
696 | # SOVERSION target properties here. However: On Windows, it |
697 | # doesn't seem to do anything (the .rc file configured above |
698 | @@ -278,12 +285,44 @@ |
699 | # FOLDER is to group IDE projects into folders. |
700 | SET_TARGET_PROPERTIES (${module_lib_target} PROPERTIES |
701 | OUTPUT_NAME "${module_filewe}${SUFFIX}" |
702 | - ${target_type}_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${module_name}.src" |
703 | + ${target_type}_OUTPUT_DIRECTORY "${_output_basedir}/${module_path}" |
704 | FOLDER "Modules" |
705 | - ) |
706 | - TARGET_LINK_LIBRARIES(${module_lib_target} |
707 | - zorba_${ZORBA_STORE_NAME} ${MODULE_LINK_LIBRARIES}) |
708 | - |
709 | + ) |
710 | + TARGET_LINK_LIBRARIES(${module_lib_target} zorba_${ZORBA_STORE_NAME}) |
711 | + |
712 | + # Ridiculous hack: CMake doesn't seem to (reliably) set up |
713 | + # dependencies if you specify a library to TARGET_LINK_LIBRARIES() |
714 | + # which is the output of some other ADD_LIBRARY(). We can't solve |
715 | + # this problem in the general case. We can work around it, |
716 | + # however, in the specific case where the target library was |
717 | + # generated by an earlier call to DECLARE_ZORBA_MODULE() - by |
718 | + # remembering that output library's path and its corresponding |
719 | + # target in a global property. |
720 | + FOREACH (_lib ${MODULE_LINK_LIBRARIES}) |
721 | + GET_PROPERTY (_targetname GLOBAL PROPERTY "${_lib}_TARGET") |
722 | + IF ("${_targetname}" STREQUAL "") |
723 | + TARGET_LINK_LIBRARIES(${module_lib_target} "${_lib}") |
724 | + ELSE ("${_targetname}" STREQUAL "") |
725 | + TARGET_LINK_LIBRARIES(${module_lib_target} "${_targetname}") |
726 | + ENDIF ("${_targetname}" STREQUAL "") |
727 | + ENDFOREACH (_lib) |
728 | + |
729 | + # Remember this library for the auto-generated module Config.cmake |
730 | + # file. Also remember the target name for the hack mentioned |
731 | + # above. QQQ and what about the installed version? |
732 | + GET_TARGET_PROPERTY (_lib_location "${module_lib_target}" LOCATION) |
733 | + SET_PROPERTY (GLOBAL APPEND PROPERTY "${PROJECT_NAME}_LIBRARIES" |
734 | + "${_lib_location}") |
735 | + SET_PROPERTY (GLOBAL PROPERTY "${_lib_location}_TARGET" |
736 | + "${module_lib_target}") |
737 | + |
738 | + # If this is a core module, remember the target that builds the |
739 | + # library so zorbacmd can depend on it. |
740 | + IF (${PROJECT_NAME} STREQUAL "zorba") |
741 | + SET_PROPERTY (GLOBAL APPEND PROPERTY ZORBA_CORE_MODULE_LIB_TARGETS |
742 | + "${module_lib_target}") |
743 | + ENDIF (${PROJECT_NAME} STREQUAL "zorba") |
744 | + |
745 | # Install the library, if it's not a TEST_ONLY module |
746 | IF (NOT MODULE_TEST_ONLY) |
747 | IF(NOT ${PROJECT_NAME} STREQUAL "zorba") |
748 | @@ -314,17 +353,9 @@ |
749 | ENDIF (MODULE_VERSION) |
750 | FOREACH (version_infix "" ${version_infixes}) |
751 | ADD_COPY_RULE ("URI" "${SOURCE_FILE}" "${module_path}/${module_filename}" |
752 | - "${version_infix}" "" "${MODULE_TEST_ONLY}") |
753 | + "${version_infix}" "" 1 "${MODULE_TEST_ONLY}") |
754 | ENDFOREACH (version_infix) |
755 | |
756 | - # Also copy the dynamic library from the location it was built. |
757 | - IF (module_lib_target) |
758 | - GET_TARGET_PROPERTY (lib_location "${module_lib_target}" LOCATION) |
759 | - GET_FILENAME_COMPONENT (lib_filename "${lib_location}" NAME) |
760 | - ADD_COPY_RULE ("LIB" "${lib_location}" "${module_path}/${lib_filename}" |
761 | - "" "${module_lib_target}" "${MODULE_TEST_ONLY}") |
762 | - ENDIF (module_lib_target) |
763 | - |
764 | # Last but not least, whip up a test case that ensures the module |
765 | # can at least be compiled. Don't bother for test-only modules |
766 | # (presumably they're there to be tested!). |
767 | @@ -375,7 +406,7 @@ |
768 | ENDIF (NOT SCHEMA_TEST_ONLY) |
769 | |
770 | ADD_COPY_RULE ("URI" "${SOURCE_FILE}" "${schema_path}/${schema_filename}" |
771 | - "" "" "${SCHEMA_TEST_ONLY}") |
772 | + "" "" 1 "${SCHEMA_TEST_ONLY}") |
773 | |
774 | ENDMACRO (DECLARE_ZORBA_SCHEMA) |
775 | |
776 | @@ -407,25 +438,74 @@ |
777 | MANGLE_URI (${URI_FILE_URI} "" uri_file_path uri_file_filename) |
778 | |
779 | ADD_COPY_RULE ("URI" "${SOURCE_FILE}" "${uri_file_path}/${uri_file_filename}" |
780 | - "" "" "${URI_FILE_TEST_ONLY}") |
781 | + "" "" 1 "${URI_FILE_TEST_ONLY}") |
782 | |
783 | ENDMACRO (DECLARE_ZORBA_URI_FILE) |
784 | |
785 | + |
786 | +# Inform Zorba of a .jar file that should be made available on the CLASSPATH |
787 | +# of the JVM, should the JVM be started. QQQ more doc needed |
788 | +# |
789 | +# Args: FILE - path to file(s) (must be absolute) |
790 | +# TARGET - (optional) a CMake target that must be executed in order |
791 | +# for FILEs to be generated |
792 | +# EXTERNAL - (optional) FILE specifies a path that should be added |
793 | +# to CLASSPATH as-is |
794 | +# TEST_ONLY - (optional) Jar file is for testcases only and should not |
795 | +# be installed |
796 | +# |
797 | +# Must supply at least one value to FILE or TARGET. |
798 | +MACRO (DECLARE_ZORBA_JAR) |
799 | + PARSE_ARGUMENTS (JAR "FILE;TARGET" "TARGET" "TEST_ONLY;EXTERNAL" ${ARGN}) |
800 | + IF (NOT JAR_FILE) |
801 | + MESSAGE (FATAL_ERROR "'FILE' argument is required for DECLARE_ZORBA_JAR") |
802 | + ENDIF (NOT JAR_FILE) |
803 | + |
804 | + # Initialize classpath file and set up copy rule (once per project) |
805 | + SET (_CP_FILE "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-classpath.txt") |
806 | + GET_PROPERTY (_known_project GLOBAL PROPERTY "${PROJECT_NAME}-jars") |
807 | + IF (NOT _known_project) |
808 | + FILE (REMOVE "${_CP_FILE}") |
809 | + SET_PROPERTY (GLOBAL PROPERTY "${PROJECT_NAME}-jars" 1) |
810 | + ADD_COPY_RULE ("LIB" "${_CP_FILE}" "jars/${PROJECT_NAME}-classpath.txt" |
811 | + "" "" 1 "${JAR_TEST_ONLY}") |
812 | + ENDIF (NOT _known_project) |
813 | + |
814 | + # Iterate over all supplied jar files |
815 | + FOREACH (_jar_file ${JAR_FILE}) |
816 | + |
817 | + IF (JAR_EXTERNAL) |
818 | + # Put absolute path into classpath file |
819 | + FILE (APPEND "${_CP_FILE}" "${_jar_file}\n") |
820 | + ELSE (JAR_EXTERNAL) |
821 | + # Copy jar to jars/ directory and add relative path to classpath file |
822 | + GET_FILENAME_COMPONENT (_output_filename "${_jar_file}" NAME) |
823 | + ADD_COPY_RULE ("LIB" "${_jar_file}" "jars/${_output_filename}" "" |
824 | + "${JAR_TARGET}" 1 "${JAR_TEST_ONLY}") |
825 | + FILE (APPEND "${_CP_FILE}" "${_output_filename}\n") |
826 | + ENDIF (JAR_EXTERNAL) |
827 | + |
828 | + ENDFOREACH (_jar_file) |
829 | +ENDMACRO (DECLARE_ZORBA_JAR) |
830 | + |
831 | + |
832 | # Utility macro for setting up a build rule to copy a file to a |
833 | -# particular (possibly versioned) file in a shared directory if such a file has |
834 | -# not already been output. |
835 | +# particular (possibly versioned) file in a shared directory if such a |
836 | +# file has not already been output. |
837 | +# |
838 | # FILE_TYPE: Either "URI" or "LIB"; will be used to determine which shared |
839 | -# directory to place output in (URI_PATH or LIB_PATH). Also, "URI" files |
840 | -# will have an INSTALL() directive to put them in the install image. |
841 | +# directory to place output in (URI_PATH or LIB_PATH). |
842 | # INPUT_FILE: Absolute path to file to copy. |
843 | # OUTPUT_FILE: Relative path to output file (relative to URI_PATH). |
844 | # VERSION_ARG: Version; may be "" for non-versioned files. |
845 | # DEPEND_TARGET: A CMake target name upon which the copy rule should depend; |
846 | # may be "". |
847 | +# INSTALL: If 1, an INSTALL() directive will be executed to put the |
848 | +# file into the install image. |
849 | # TEST_ONLY: If 1, file is for testcases only; will be copied into |
850 | -# TEST_URI_PATH/TEST_LIB_PATH and will not be installed |
851 | +# TEST_URI_PATH/TEST_LIB_PATH and will not be installed. |
852 | MACRO (ADD_COPY_RULE FILE_TYPE INPUT_FILE OUTPUT_FILE VERSION_ARG |
853 | - DEPEND_TARGET TEST_ONLY) |
854 | + DEPEND_TARGET INSTALL TEST_ONLY) |
855 | # Choose output base directory |
856 | IF (${TEST_ONLY} EQUAL 1) |
857 | SET (_output_basedir "${CMAKE_BINARY_DIR}/TEST_${FILE_TYPE}_PATH") |
858 | @@ -470,13 +550,13 @@ |
859 | SET_PROPERTY (GLOBAL APPEND PROPERTY ZORBA_URI_FILES |
860 | "${INPUT_FILE}" "${_output_file}" "${DEPEND_TARGET}" "${_is_core}") |
861 | |
862 | - # Also set up an INSTALL rule (unless TEST_ONLY or LIB). |
863 | - IF ( (NOT "${FILE_TYPE}" STREQUAL "LIB") AND (NOT ${TEST_ONLY} EQUAL 1) ) |
864 | + # Also set up an INSTALL rule (unless TEST_ONLY). |
865 | + IF ( (${INSTALL} EQUAL 1) AND (NOT ${TEST_ONLY} EQUAL 1) ) |
866 | |
867 | IF(NOT _is_core) |
868 | STRING(REPLACE "-" "_" component_name ${PROJECT_NAME}) |
869 | INSTALL (FILES "${INPUT_FILE}" |
870 | - DESTINATION "${ZORBA_NONCORE_URI_DIR}/${_output_path}" |
871 | + DESTINATION "${ZORBA_NONCORE_${FILE_TYPE}_DIR}/${_output_path}" |
872 | RENAME "${_output_filename}" |
873 | COMPONENT "${component_name}") |
874 | |
875 | @@ -496,11 +576,11 @@ |
876 | |
877 | ELSE(NOT _is_core) |
878 | INSTALL (FILES "${INPUT_FILE}" |
879 | - DESTINATION "${ZORBA_CORE_URI_DIR}/${_output_path}" |
880 | + DESTINATION "${ZORBA_CORE_${FILE_TYPE}_DIR}/${_output_path}" |
881 | RENAME "${_output_filename}") |
882 | ENDIF(NOT _is_core) |
883 | |
884 | - ENDIF ( (NOT "${FILE_TYPE}" STREQUAL "LIB") AND (NOT ${TEST_ONLY} EQUAL 1) ) |
885 | + ENDIF ( (${INSTALL} EQUAL 1) AND (NOT ${TEST_ONLY} EQUAL 1) ) |
886 | ENDIF (file_found EQUAL -1) |
887 | ENDMACRO (ADD_COPY_RULE) |
888 | |
889 | @@ -535,6 +615,8 @@ |
890 | # files to their corresponding output directories, with appropriate |
891 | # dependencies. This macro will only have any effect when called by |
892 | # the top-level project in a build. |
893 | +# Also, this function automatically generates a CMake projectConfig.cmake |
894 | +# file for the project, based on config/ExternalModuleConfig.cmake.in. |
895 | MACRO (DONE_DECLARING_ZORBA_URIS) |
896 | IF (PROJECT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) |
897 | # Close out the zorba modules and schemas manifests |
898 | @@ -553,9 +635,10 @@ |
899 | LIST (GET copy_rules 2 _depend_target) |
900 | LIST (GET copy_rules 3 _is_core) |
901 | LIST (REMOVE_AT copy_rules 0 1 2 3) |
902 | - SET (_depends "${_input_file}") |
903 | IF (_depend_target) |
904 | - LIST (APPEND _depends "${_depend_target}") |
905 | + SET (_depends "${_depend_target}") |
906 | + ELSE (_depend_target) |
907 | + SET (_depends "${_input_file}") |
908 | ENDIF (_depend_target) |
909 | ADD_CUSTOM_COMMAND (OUTPUT "${_output_file}" |
910 | COMMAND "${CMAKE_COMMAND}" -E copy |
911 | @@ -571,7 +654,8 @@ |
912 | |
913 | # Targets and dependencies: |
914 | # ALL depends on check_uris; check_uris depends on check_core_uris; |
915 | - # zorbacmd depends on check_core_uris. |
916 | + # zorbacmd depends on check_core_uris as well as all core module |
917 | + # library targets. |
918 | ADD_CUSTOM_TARGET (check_uris ALL |
919 | DEPENDS ${_noncore_output_files} VERBATIM) |
920 | SET_TARGET_PROPERTIES(check_uris PROPERTIES FOLDER "Modules") |
921 | @@ -584,6 +668,8 @@ |
922 | DEPENDS ${_core_output_files} VERBATIM) |
923 | ADD_DEPENDENCIES(check_uris check_core_uris) |
924 | ADD_DEPENDENCIES(zorbacmd check_core_uris) |
925 | + GET_PROPERTY (_corelibs GLOBAL PROPERTY ZORBA_CORE_MODULE_LIB_TARGETS) |
926 | + ADD_DEPENDENCIES(zorbacmd ${_corelibs}) |
927 | SET_TARGET_PROPERTIES(check_core_uris PROPERTIES FOLDER "Modules") |
928 | ENDIF (_num_core GREATER 0) |
929 | SET_PROPERTY (GLOBAL PROPERTY ZORBA_URI_FILES) |
930 | @@ -591,6 +677,18 @@ |
931 | #add 'xqdoc' and 'xqdoc-xml' targets |
932 | ADD_XQDOC_TARGETS() |
933 | ENDIF (PROJECT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) |
934 | + |
935 | + # Now, do things that should be done at the end of *any* project, not |
936 | + # just the top-level project. |
937 | + |
938 | + # Generate project's projectConfig.cmake file. |
939 | + # QQQ need to create an installable version of this too, once we know |
940 | + # how installing a module package should work. |
941 | + GET_PROPERTY (ZORBA_PROJECT_LIBRARIES |
942 | + GLOBAL PROPERTY "${PROJECT_NAME}_LIBRARIES") |
943 | + CONFIGURE_FILE("${Zorba_EXTERNALMODULECONFIG_FILE}" |
944 | + "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" @ONLY) |
945 | + |
946 | ENDMACRO (DONE_DECLARING_ZORBA_URIS) |
947 | |
948 | # Initialize expected failures and zorba modules output files when |
949 | @@ -629,56 +727,106 @@ |
950 | |
951 | ENDMACRO(expected_failure) |
952 | |
953 | -# Convenience macro for adding tests in a standard format. |
954 | +# Convenience macro for adding tests in a standard format. All test |
955 | +# cases (.xq files) in "Queries" subdirectory of the named directory |
956 | +# will be automatically added for CTest. Each test will be named |
957 | +# ${PROJECT_NAME}/<filename>, where <filename> is the path relative to |
958 | +# the Queries/ subdirectory. |
959 | +# |
960 | +# The optional second argument exists for Windows. Normally, |
961 | +# EXPECTED_FAILURE() can be used even for tests that crash |
962 | +# (segfault). However, on Windows, when a test crashes, it pops up a |
963 | +# dialog box. This prevents tests running unattended. Since it is not |
964 | +# possible with CMake to remove a test once added, |
965 | +# ADD_TEST_DIRECTORY() needs to be told not to add the test at all on |
966 | +# Windows platforms. Therefore, after the directory name, you may |
967 | +# additional arguments in the form (testname bugnumber testname |
968 | +# bugnumber ...) to ADD_TEST_DIRECTORY(). On Windows, the named tests |
969 | +# will be skipped entirely. On other platforms, they will be passed to |
970 | +# EXPECTED_FAILURE() with the corresponding bug number. |
971 | +# |
972 | +# This second argument should only be used for test cases that are |
973 | +# currently *crashing* on Windows. If the test is simply failing, then |
974 | +# you should use EXPECTED_FAILURE() after calling ADD_TEST_DIRECTORY(). |
975 | +# |
976 | # Parameters: |
977 | # TEST_DIR - all the .xq files in this directory will be added as tests |
978 | -# ARGV1 - if this is present, it will be interpreted as a list of |
979 | -# exceptions. The list items will be removed from the list of |
980 | -# files found in TEST_DIR. |
981 | +# (additional args) - expected crashing tests, as discussed above. |
982 | MACRO (ADD_TEST_DIRECTORY TEST_DIR) |
983 | # QQQ error-check: Queries directory exists, some tests found... |
984 | FILE(GLOB_RECURSE TESTFILES FOLLOW_SYMLINKS |
985 | RELATIVE "${TEST_DIR}/Queries" "${TEST_DIR}/Queries/*.xq") |
986 | |
987 | - FOREACH (EXCEPTION ${ARGV1}) |
988 | - LIST (REMOVE_ITEM TESTFILES ${EXCEPTION}) |
989 | - ENDFOREACH (EXCEPTION) |
990 | + # Convert extra arguments to two lists: test names and bug IDs |
991 | + SET (crash_tests) |
992 | + SET (crash_bugids) |
993 | + SET (known_crashes ${ARGN}) |
994 | + LIST (LENGTH known_crashes num_crashes) |
995 | + WHILE (num_crashes GREATER 0) |
996 | + LIST (GET known_crashes 0 _testcase) |
997 | + LIST (APPEND crash_tests ${_testcase}) |
998 | + LIST (GET known_crashes 1 _bugid) |
999 | + LIST (APPEND crash_bugids ${_bugid}) |
1000 | + LIST (REMOVE_AT known_crashes 0 1) |
1001 | + MATH (EXPR num_crashes "${num_crashes} - 2") |
1002 | + ENDWHILE (num_crashes GREATER 0) |
1003 | |
1004 | + IF(WIN32) |
1005 | + SET(PATH_SEP ",") |
1006 | + ELSE(WIN32) |
1007 | + SET(PATH_SEP ":") |
1008 | + ENDIF(WIN32) |
1009 | SET(TESTCOUNTER 0) |
1010 | FOREACH(TESTFILE ${TESTFILES}) |
1011 | SET(TESTNAME "${PROJECT_NAME}/${TESTFILE}") |
1012 | |
1013 | - IF(WIN32) |
1014 | - SET(PATH_SEP ",") |
1015 | - ELSE(WIN32) |
1016 | - SET(PATH_SEP ":") |
1017 | - ENDIF(WIN32) |
1018 | - ADD_TEST(${TESTNAME} "${Zorba_TESTDRIVER}" |
1019 | - "--rbkt-src" "${TEST_DIR}" |
1020 | - "--module-path" "${CMAKE_BINARY_DIR}/URI_PATH/${PATH_SEP}${SECONDARY_MODULE_PATHS}" |
1021 | - "${TESTFILE}") |
1022 | - |
1023 | - MATH(EXPR TESTCOUNTER ${TESTCOUNTER}+1) |
1024 | - MATH(EXPR TESTMOD "${TESTCOUNTER}%100") |
1025 | - IF (${TESTMOD} EQUAL 0) |
1026 | - MESSAGE(STATUS "Adding another 100 Tests") |
1027 | - ENDIF (${TESTMOD} EQUAL 0) |
1028 | + # See if this test is in the known-crashing list |
1029 | + SET (_crash_bugid) |
1030 | + LIST (FIND crash_tests ${TESTNAME} _crash_idx) |
1031 | + IF (${_crash_idx} GREATER -1) |
1032 | + # Get corresponding bug ID |
1033 | + LIST (GET crash_bugids ${_crash_idx} _crash_bugid) |
1034 | + # Remove from known-crashing list |
1035 | + LIST (REMOVE_AT crash_tests ${_crash_idx}) |
1036 | + ENDIF (${_crash_idx} GREATER -1) |
1037 | + |
1038 | + # On Windows, skip calling ADD_TEST() for any known crashing tests |
1039 | + IF (WIN32 AND (${_crash_idx} GREATER -1) ) |
1040 | + MESSAGE (STATUS "WARNING: Skipping test case ${TESTNAME} which is expected to crash - bug ${_crash_bugid}") |
1041 | + ELSE (WIN32 AND (${_crash_idx} GREATER -1) ) |
1042 | + # DEPENDENCY_MODULE_PATH will always start with an appropriate |
1043 | + # path separator |
1044 | + ADD_TEST(${TESTNAME} "${Zorba_TESTDRIVER}" |
1045 | + "--rbkt-src" "${TEST_DIR}" |
1046 | + "--module-path" |
1047 | + "${CMAKE_BINARY_DIR}/URI_PATH/${PATH_SEP}${DEPENDENCY_MODULE_PATH}" |
1048 | + "${TESTFILE}") |
1049 | + |
1050 | + # On non-Windows, call EXPECTED_FAILURE() for known crashes |
1051 | + IF (${_crash_idx} GREATER -1) |
1052 | + MESSAGE (STATUS "Marking test case ${TESTNAME} as expected to crash - bug ${bugid}") |
1053 | + EXPECTED_FAILURE (${TESTNAME} ${_bugid}) |
1054 | + ENDIF (${_crash_idx} GREATER -1) |
1055 | + |
1056 | + MATH(EXPR TESTCOUNTER ${TESTCOUNTER}+1) |
1057 | + MATH(EXPR TESTMOD "${TESTCOUNTER}%100") |
1058 | + IF (${TESTMOD} EQUAL 0) |
1059 | + MESSAGE(STATUS "Adding another 100 Tests") |
1060 | + ENDIF (${TESTMOD} EQUAL 0) |
1061 | + |
1062 | + ENDIF (WIN32 AND (${_crash_idx} GREATER -1) ) |
1063 | + |
1064 | ENDFOREACH(TESTFILE) |
1065 | + |
1066 | + # Ensure that known-crashes list is empty - otherwise some tests were |
1067 | + # named that didn't exist |
1068 | + IF (NOT "${crash_tests}" STREQUAL "") |
1069 | + MESSAGE (FATAL_ERROR "The following non-existing test cases were passed to ADD_TEST_DIRECTORY(): ${crash_tests}") |
1070 | + ENDIF (NOT "${crash_tests}" STREQUAL "") |
1071 | + |
1072 | MESSAGE(STATUS "Added ${TESTCOUNTER} tests in ${TEST_DIR}") |
1073 | ENDMACRO (ADD_TEST_DIRECTORY) |
1074 | |
1075 | -# Macro to install a basic CMake config file for a module. Provide a |
1076 | -# source and binary directory. Result will be installed in binary |
1077 | -# directory. This is a macro because it is called from two different |
1078 | -# places: ZorbaUse.cmake, and Zorba's modules/CMakeLists.txt. |
1079 | -MACRO(CREATE_MODULE_CONFIG name src_dir bin_dir) |
1080 | - # Set variables referenced in ExternalModuleConfig.cmake.in |
1081 | - SET(MODULE_SOURCE_DIR ${src_dir}) |
1082 | - SET(MODULE_BINARY_DIR ${bin_dir}) |
1083 | - CONFIGURE_FILE("${Zorba_EXTERNALMODULECONFIG_FILE}" |
1084 | - "${MODULE_BINARY_DIR}/${name}Config.cmake" @ONLY) |
1085 | -ENDMACRO(CREATE_MODULE_CONFIG) |
1086 | - |
1087 | # This macro easies the process of adding test for store dependent |
1088 | # executables. It has the same naming convection for the target as the |
1089 | # macro that is used to generated store dependent executables (thus, |
1090 | |
1091 | === modified file 'config/ExternalModuleConfig.cmake.in' |
1092 | --- config/ExternalModuleConfig.cmake.in 2012-04-11 20:22:52 +0000 |
1093 | +++ config/ExternalModuleConfig.cmake.in 2012-04-27 13:22:48 +0000 |
1094 | @@ -12,12 +12,29 @@ |
1095 | # See the License for the specific language governing permissions and |
1096 | # limitations under the License. |
1097 | |
1098 | -IF(WIN32) |
1099 | - SET(PATH_SEP ",") |
1100 | -ELSE(WIN32) |
1101 | - SET(PATH_SEP ":") |
1102 | -ENDIF(WIN32) |
1103 | - |
1104 | -# QQQ When all the module versioning and external-module work is |
1105 | -# complete, this should contain ONLY MODULE_BINARY_DIR/modules. |
1106 | -SET(SECONDARY_MODULE_PATHS "${SECONDARY_MODULE_PATHS}${PATH_SEP}@MODULE_SOURCE_DIR@/src/${PATH_SEP}@MODULE_BINARY_DIR@/src/${PATH_SEP}@MODULE_BINARY_DIR@/modules/") |
1107 | +IF (WIN32) |
1108 | + SET (PATH_SEP ",") |
1109 | +ELSE (WIN32) |
1110 | + SET (PATH_SEP ":") |
1111 | +ENDIF (WIN32) |
1112 | + |
1113 | +# Probably should have separate URI and LIB paths here someday; will |
1114 | +# require testdriver to accept --uri-path and --lib-path args |
1115 | +# Note that this path is meaningless if the module is installed; see |
1116 | +# bug 966999. |
1117 | +SET (DEPENDENCY_MODULE_PATH |
1118 | + "${DEPENDENCY_MODULE_PATH}${PATH_SEP}@PROJECT_BINARY_DIR@/URI_PATH/${PATH_SEP}${DEPENDENCY_LIB_PATH}${PATH_SEP}@PROJECT_BINARY_DIR@/LIB_PATH/") |
1119 | + |
1120 | +# Dynamic libraries created by this project to link against |
1121 | +SET (@PROJECT_NAME@_LIBRARIES @ZORBA_PROJECT_LIBRARIES@) |
1122 | + |
1123 | +# Include directories exported by this project |
1124 | +SET (@PROJECT_NAME@_INCLUDE_DIRS @ZORBA_PROJECT_INCLUDE_DIRS@) |
1125 | + |
1126 | +# Offer a "use file" to the user of this module. For most module |
1127 | +# packages, this is unnecessary. However it can be utilized by |
1128 | +# advanced packages which wish to, for example, export a C++ header |
1129 | +# file to dependent packages. As above, note that this currently is |
1130 | +# non-functional if this module package is installed; this will only |
1131 | +# work from a project build directory. |
1132 | +SET (@PROJECT_NAME@_USE_FILE "@ZORBA_PROJECT_USE_FILE@") |
1133 | |
1134 | === modified file 'config/ZorbaUse.cmake' |
1135 | --- config/ZorbaUse.cmake 2012-04-11 20:22:52 +0000 |
1136 | +++ config/ZorbaUse.cmake 2012-04-27 13:22:48 +0000 |
1137 | @@ -31,7 +31,3 @@ |
1138 | # Load Zorba module support macros. |
1139 | INCLUDE("${Zorba_CMAKE_MODULES_DIR}/Windows/ProxyFindModule.cmake") |
1140 | ENDIF(WIN32) |
1141 | - |
1142 | -# Generate project's projectConfig.cmake file. |
1143 | -CREATE_MODULE_CONFIG(${PROJECT_NAME} "${PROJECT_SOURCE_DIR}" |
1144 | - "${PROJECT_BINARY_DIR}") |
1145 | |
1146 | === modified file 'doc/cxx/examples/context.cpp' |
1147 | --- doc/cxx/examples/context.cpp 2012-04-11 20:22:52 +0000 |
1148 | +++ doc/cxx/examples/context.cpp 2012-04-27 13:22:48 +0000 |
1149 | @@ -149,7 +149,11 @@ |
1150 | outStream2 << lQuery << std::endl; |
1151 | std::cout << outStream2.str() << std::endl; |
1152 | |
1153 | +#ifndef ZORBA_NO_ICU |
1154 | if (outStream2.str() != "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\nBook 1.1\n") |
1155 | +#else |
1156 | + if (outStream2.str() != "<?xml version=\"1.0\"?>\nBook 1.1\n") |
1157 | +#endif /* ZORBA_NO_ICU */ |
1158 | { |
1159 | std::cerr << "Test 4 failed with a wrong result : " << std::endl |
1160 | << outStream2.str() << std::endl; |
1161 | |
1162 | === modified file 'include/zorba/config.h.cmake' |
1163 | --- include/zorba/config.h.cmake 2012-04-11 20:22:52 +0000 |
1164 | +++ include/zorba/config.h.cmake 2012-04-27 13:22:48 +0000 |
1165 | @@ -96,6 +96,8 @@ |
1166 | typedef __int64 int64_t; |
1167 | #endif /* ZORBA_HAVE_INT64_T */ |
1168 | |
1169 | +#cmakedefine ZORBA_SIZEOF_WCHAR_T @ZORBA_SIZEOF_WCHAR_T@ |
1170 | + |
1171 | // Compiler |
1172 | #cmakedefine CLANG |
1173 | #cmakedefine MSVC |
1174 | @@ -148,7 +150,7 @@ |
1175 | |
1176 | // Zorba features |
1177 | #cmakedefine ZORBA_NO_FULL_TEXT |
1178 | -#cmakedefine ZORBA_NO_UNICODE |
1179 | +#cmakedefine ZORBA_NO_ICU |
1180 | #cmakedefine ZORBA_NO_XMLSCHEMA |
1181 | #cmakedefine ZORBA_NUMERIC_OPTIMIZATION |
1182 | #cmakedefine ZORBA_VERIFY_PEER_SSL_CERTIFICATE |
1183 | |
1184 | === modified file 'include/zorba/pregenerated/diagnostic_list.h' |
1185 | --- include/zorba/pregenerated/diagnostic_list.h 2012-04-11 20:22:52 +0000 |
1186 | +++ include/zorba/pregenerated/diagnostic_list.h 2012-04-27 13:22:48 +0000 |
1187 | @@ -286,6 +286,10 @@ |
1188 | |
1189 | extern ZORBA_DLL_PUBLIC XQueryErrorCode FOTY0015; |
1190 | |
1191 | +extern ZORBA_DLL_PUBLIC XQueryErrorCode FOUT1170; |
1192 | + |
1193 | +extern ZORBA_DLL_PUBLIC XQueryErrorCode FOUT1190; |
1194 | + |
1195 | extern ZORBA_DLL_PUBLIC XQueryErrorCode XUST0001; |
1196 | |
1197 | extern ZORBA_DLL_PUBLIC XQueryErrorCode XUST0002; |
1198 | @@ -610,16 +614,18 @@ |
1199 | |
1200 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0030_INDEX_RANGE_GENERAL_PROBE_NOT_ALLOWED; |
1201 | |
1202 | -extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0034_INDEX_RANGE_VALUE_PROBE_BAD_KEY_TYPES; |
1203 | - |
1204 | -extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0035_INDEX_GENERAL_INSERT; |
1205 | - |
1206 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0031_IC_NOT_DECLARED; |
1207 | |
1208 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0032_IC_NOT_ACTIVATED; |
1209 | |
1210 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0033_IC_NOT_MET; |
1211 | |
1212 | +extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0034_INDEX_RANGE_VALUE_PROBE_BAD_KEY_TYPES; |
1213 | + |
1214 | +extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0035_INDEX_GENERAL_INSERT; |
1215 | + |
1216 | +extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDDY0036_NON_ROOT_NODE_DELETION; |
1217 | + |
1218 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDST0001_COLLECTION_ALREADY_DECLARED; |
1219 | |
1220 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZDST0002_COLLECTION_ALREADY_IMPORTED; |
1221 | @@ -800,13 +806,13 @@ |
1222 | |
1223 | namespace jerr { |
1224 | |
1225 | +#if defined(ZORBA_WITH_JSON) |
1226 | extern ZORBA_DLL_PUBLIC JSONiqErrorCode JNSE0012; |
1227 | |
1228 | extern ZORBA_DLL_PUBLIC JSONiqErrorCode JNSE0013; |
1229 | |
1230 | extern ZORBA_DLL_PUBLIC JSONiqErrorCode JNSE0014; |
1231 | |
1232 | -#if defined(ZORBA_WITH_JSON) |
1233 | extern ZORBA_DLL_PUBLIC JSONiqErrorCode JNTY0002; |
1234 | |
1235 | extern ZORBA_DLL_PUBLIC JSONiqErrorCode JNTY0003; |
1236 | |
1237 | === modified file 'include/zorba/properties_base.h' |
1238 | --- include/zorba/properties_base.h 2012-04-11 20:22:52 +0000 |
1239 | +++ include/zorba/properties_base.h 2012-04-27 13:22:48 +0000 |
1240 | @@ -101,8 +101,44 @@ |
1241 | std::vector<std::string>& val, |
1242 | unsigned delta); |
1243 | |
1244 | +/** |
1245 | + * \brief This class provides access to global properties. |
1246 | + * |
1247 | + * This class provides access to global properties set for Zorba in environment |
1248 | + * and configuration file. |
1249 | + * It is available using Zorba.getProperties() method. |
1250 | + * \see { Zorba::getProperties() } |
1251 | + */ |
1252 | +class ZORBA_DLL_PUBLIC PropertiesGlobal : public PropertiesBase |
1253 | +{ |
1254 | +public: |
1255 | + virtual ~PropertiesGlobal() {} |
1256 | + |
1257 | + /** |
1258 | + * \brief Get global JVM classpath property. |
1259 | + * |
1260 | + * Before the JVM is started this will return the classpath set by |
1261 | + * command line option, the CLASSPATH environment variable and in Zorba |
1262 | + * config file. |
1263 | + * |
1264 | + * After the JVM is started this will contain in addition the paths to jars |
1265 | + * used by modules that make use of the JVM. |
1266 | + */ |
1267 | + virtual void getJVMClassPath(std::string & jvmClasspath) {} |
1268 | + |
1269 | + /** |
1270 | + * \brief Set global JVM classpath property. |
1271 | + * |
1272 | + * This method should be used to set additional JVM classpath for modules |
1273 | + * that make use of JVM. This will overide the classpath set by CLASSPATH |
1274 | + * environment variable or Zorba config file. |
1275 | + * |
1276 | + * Once the JVM is started this method doesn't have any effect. |
1277 | + */ |
1278 | + virtual void setJVMClassPath(const std::string & jvmClasspath) {} |
1279 | +}; |
1280 | + |
1281 | } |
1282 | - |
1283 | #endif // ZORBA_PROPERTIES_BASE_H |
1284 | /* |
1285 | * Local variables: |
1286 | |
1287 | === modified file 'include/zorba/static_context.h' |
1288 | --- include/zorba/static_context.h 2012-04-11 20:22:52 +0000 |
1289 | +++ include/zorba/static_context.h 2012-04-27 13:22:48 +0000 |
1290 | @@ -26,9 +26,13 @@ |
1291 | #include <zorba/function.h> |
1292 | #include <zorba/annotation.h> |
1293 | #include <zorba/smart_ptr.h> |
1294 | +#include <zorba/smart_ptr.h> |
1295 | #ifndef ZORBA_NO_FULL_TEXT |
1296 | #include <zorba/thesaurus.h> |
1297 | #endif /* ZORBA_NO_FULL_TEXT */ |
1298 | +#include <zorba/zorba.h> |
1299 | +#include <zorba/store_manager.h> |
1300 | +#include <zorba/zorba_exception.h> |
1301 | |
1302 | namespace zorba { |
1303 | |
1304 | @@ -685,6 +689,38 @@ |
1305 | */ |
1306 | virtual void |
1307 | getFullLibPath(std::vector<String>& aLibPath) const = 0; |
1308 | + |
1309 | + /** \brief Fetches an resource refered to by the given URI. |
1310 | + * |
1311 | + * Resolution is done using the URI mappers and resolvers registered |
1312 | + * in this static context. If no such mappers or resolvers have been |
1313 | + * registered, the built-in ones are used. |
1314 | + * |
1315 | + * The default EntityKind for resources fetched by this function |
1316 | + * is "SOME_CONTENT". |
1317 | + * |
1318 | + * @param aURI the name of the resource to fetch |
1319 | + * |
1320 | + * @return the fetched resource |
1321 | + */ |
1322 | + virtual Item |
1323 | + fetch(const String& aURI) const = 0; |
1324 | + |
1325 | + /** \brief Fetches an resource refered to by the given URI. |
1326 | + * |
1327 | + * Resolution is done using the URI mappers and resolvers registered |
1328 | + * in this static context. If no such mappers or resolvers have been |
1329 | + * registered, the built-in ones are used. |
1330 | + * |
1331 | + * @param aURI the name of the resource to fetch |
1332 | + * |
1333 | + * @param aEntityKind the kind of the entity to fetch (i.e. |
1334 | + * SOME_CONTENT, SCHEMA, MODULE, THESAURUS, or STOP_WORDS) |
1335 | + * |
1336 | + * @return the fetched resource |
1337 | + */ |
1338 | + virtual Item |
1339 | + fetch(const String& aURI, const String& aEntityKind) const = 0; |
1340 | }; |
1341 | |
1342 | } /* namespace zorba */ |
1343 | |
1344 | === modified file 'include/zorba/util/file.h' |
1345 | --- include/zorba/util/file.h 2012-04-11 20:22:52 +0000 |
1346 | +++ include/zorba/util/file.h 2012-04-27 13:22:48 +0000 |
1347 | @@ -24,6 +24,7 @@ |
1348 | #include <cstdio> |
1349 | #include <string> |
1350 | #include <time.h> |
1351 | +#include <vector> |
1352 | |
1353 | #include <zorba/config.h> |
1354 | #include <zorba/file.h> |
1355 | @@ -84,6 +85,7 @@ |
1356 | void mkdir(); |
1357 | void deep_mkdir(); |
1358 | void rmdir(bool ignore = true); |
1359 | + void lsdir(std::vector<std::string> &list); |
1360 | #ifndef _WIN32_WCE |
1361 | void chdir(); |
1362 | #endif |
1363 | |
1364 | === modified file 'include/zorba/util/time.h' |
1365 | --- include/zorba/util/time.h 2012-04-11 20:22:52 +0000 |
1366 | +++ include/zorba/util/time.h 2012-04-27 13:22:48 +0000 |
1367 | @@ -178,7 +178,7 @@ |
1368 | |
1369 | inline long get_walltime_in_millis(const walltime& t) |
1370 | { |
1371 | - return t.time * 1000 + t.millitm; |
1372 | + return (long)(t.time * 1000 + t.millitm); |
1373 | } |
1374 | |
1375 | #else /* not Windows, and no clock_gettime() */ |
1376 | |
1377 | === modified file 'include/zorba/xmldatamanager.h' |
1378 | --- include/zorba/xmldatamanager.h 2012-04-11 20:22:52 +0000 |
1379 | +++ include/zorba/xmldatamanager.h 2012-04-27 13:22:48 +0000 |
1380 | @@ -187,6 +187,8 @@ |
1381 | ParseOptions& aOptions) const = 0; |
1382 | |
1383 | /** \brief Fetches an resource refered to by the given URI. |
1384 | + * |
1385 | + * @deprecated this function has been replaced by StaticContext::fetch. |
1386 | */ |
1387 | virtual Item |
1388 | fetch(const String& aURI) const = 0; |
1389 | |
1390 | === modified file 'include/zorba/zorba.h' |
1391 | --- include/zorba/zorba.h 2012-04-11 20:22:52 +0000 |
1392 | +++ include/zorba/zorba.h 2012-04-27 13:22:48 +0000 |
1393 | @@ -34,14 +34,18 @@ |
1394 | #include <zorba/xquery.h> |
1395 | #include <zorba/zorba_string.h> |
1396 | #include <zorba/iterator.h> |
1397 | +#include <zorba/properties_base.h> |
1398 | |
1399 | namespace zorba { |
1400 | |
1401 | /** |
1402 | * The Zorba class is the single point of access to the %Zorba engine. |
1403 | * There exists one instance of the Zorba class per process. |
1404 | - * It can be used to (1) create and compile queries, (2) create static contexts, |
1405 | - * (3) provides access to the XmlDataManager, and (4) provides access to the ItemFactory. |
1406 | + * It can be used to (1) create and compile queries, |
1407 | + * (2) create static contexts, |
1408 | + * (3) provides access to the XmlDataManager, |
1409 | + * (4) provides access to the ItemFactory, and |
1410 | + * (5) provides access to the PropertiesGlobal. |
1411 | */ |
1412 | class ZORBA_DLL_PUBLIC Zorba |
1413 | { |
1414 | @@ -301,7 +305,7 @@ |
1415 | virtual StaticContext_t |
1416 | createStaticContext(DiagnosticHandler* aDiagnosticHandler = 0) = 0; |
1417 | |
1418 | - /** \brief Gets the singelton instance of the ItemFactory. |
1419 | + /** \brief Gets the singleton instance of the ItemFactory. |
1420 | * |
1421 | * @return ItemFactory the singleton instance of the ItemFactory. |
1422 | */ |
1423 | @@ -310,18 +314,24 @@ |
1424 | |
1425 | /** \brief Gets the singleton instance of the XmlDataManager object. |
1426 | * |
1427 | - * @return XmlDataManager the singelton instance of the XmlDataManager. |
1428 | + * @return XmlDataManager the singleton instance of the XmlDataManager. |
1429 | */ |
1430 | virtual XmlDataManager* |
1431 | getXmlDataManager() = 0; |
1432 | |
1433 | /** \brief Gets the singleton instance of Zorba's audit provider object. |
1434 | * |
1435 | - * @return audit::Provider the singelton instance of Zorba's audit provider. |
1436 | + * @return audit::Provider the singeleton instance of Zorba's audit provider. |
1437 | */ |
1438 | virtual audit::Provider* |
1439 | getAuditProvider() = 0; |
1440 | |
1441 | + /** \brief Gets the singleton instance of Zorba's properties object. |
1442 | + * |
1443 | + * @return zorba::Properties the singleton instance of Zorba's properties object. |
1444 | + */ |
1445 | + virtual PropertiesGlobal* getPropertiesGlobal() = 0; |
1446 | + |
1447 | }; /* class Zorba */ |
1448 | |
1449 | |
1450 | |
1451 | === modified file 'modules/CMakeLists.txt' |
1452 | --- modules/CMakeLists.txt 2012-04-11 20:22:52 +0000 |
1453 | +++ modules/CMakeLists.txt 2012-04-27 13:22:48 +0000 |
1454 | @@ -21,13 +21,19 @@ |
1455 | # named "zorba_modules" as a sibling to the main Zorba source |
1456 | # directory. |
1457 | |
1458 | -# First, configure the moduleConfig.cmake file for each module |
1459 | -# project. We must do this "manually" before doing any |
1460 | -# ADD_SUBDIRECTORY()s, so that all the config files are built and |
1461 | -# ready for other modules' FIND_PACKAGE() calls. We also add all |
1462 | -# module build dirs to CMAKE_PREFIX_PATH for the same reason. |
1463 | -SET (project_regex "[Pp][Rr][Oo][Jj][Ee][Cc][Tt]") |
1464 | -FILE (GLOB modules_dir_items RELATIVE "${ZORBA_MODULES_DIR}" "${ZORBA_MODULES_DIR}/[a-zA-Z0-9]*") |
1465 | +# This is complicated and more than a little hacky. We need to add all |
1466 | +# the module subdirectories, but some may depend on others so we can't |
1467 | +# simply add them alphabetically. Here we determine their project |
1468 | +# names and dependencies by manually reading their CMakeLists.txt |
1469 | +# files (as text files). We form a directed graph (which isn't easy in |
1470 | +# CMake) then produce a topological sort to load the modules in |
1471 | +# order. Note that this will not work if there are cyclical |
1472 | +# dependencies between modules; if we ever need that ability, this |
1473 | +# will get more complicated. |
1474 | + |
1475 | +FILE (GLOB modules_dir_items |
1476 | + RELATIVE "${ZORBA_MODULES_DIR}" |
1477 | + "${ZORBA_MODULES_DIR}/[a-zA-Z0-9]*") |
1478 | |
1479 | # Filter out non-directories |
1480 | SET (module_dirs) |
1481 | @@ -37,19 +43,27 @@ |
1482 | ENDIF (IS_DIRECTORY "${ZORBA_MODULES_DIR}/${module_dir}") |
1483 | ENDFOREACH (module_dir) |
1484 | |
1485 | +# First, form a simple list of all known module projects in the |
1486 | +# variable "module_projects". Also, for each project, set a variable |
1487 | +# named eg. "zorba-email-module_DIR" with the path to that project's |
1488 | +# directory, relative to ZORBA_MODULES_DIR. |
1489 | +SET (project_regex "[Pp][Rr][Oo][Jj][Ee][Cc][Tt] *\\( *([^ )]*)") |
1490 | +SET (module_projects) |
1491 | FOREACH (module_dir ${module_dirs}) |
1492 | - # This is really kind of hacky, but I don't know a better solution without |
1493 | - # introducing some sort of inter-module dependency tracking and requiring |
1494 | - # consistent directory naming for external modules. What we do here is |
1495 | - # read the module's CMakeLists.txt (as a text file), searching for the |
1496 | - # PROJECT() declaration, so we can extract the name of the CMake project. |
1497 | SET (module_project) |
1498 | - SET (cmakelists) |
1499 | - FILE (STRINGS "${ZORBA_MODULES_DIR}/${module_dir}/CMakeLists.txt" cmakelists |
1500 | - REGEX ${project_regex}) |
1501 | + SET (cmakelists_file "${ZORBA_MODULES_DIR}/${module_dir}/CMakeLists.txt") |
1502 | + FILE (STRINGS "${cmakelists_file}" cmakelists REGEX "${project_regex}") |
1503 | FOREACH (line ${cmakelists}) |
1504 | - IF (line MATCHES "${project_regex} *\\(([^)]*)\\)") |
1505 | - SET (module_project ${CMAKE_MATCH_1}) |
1506 | + |
1507 | + IF (line MATCHES "${project_regex}") |
1508 | + IF (NOT "${module_project}" STREQUAL "") |
1509 | + MESSAGE (FATAL_ERROR |
1510 | + "${cmakelists_file} contains duplicate PROJECT() statements - " |
1511 | + "cannot parse!") |
1512 | + ENDIF (NOT "${module_project}" STREQUAL "") |
1513 | + SET (module_project "${CMAKE_MATCH_1}") |
1514 | + LIST (APPEND module_projects "${module_project}") |
1515 | + SET ("${module_project}_DIR" "${module_dir}") |
1516 | |
1517 | # Print the found module name |
1518 | SET (status "Found module project ${module_project}") |
1519 | @@ -63,8 +77,7 @@ |
1520 | MESSAGE (STATUS "${status}") |
1521 | MESSAGE (STATUS "${border}") |
1522 | |
1523 | - BREAK () |
1524 | - ENDIF (line MATCHES "${project_regex} *\\(([^)]*)\\)") |
1525 | + ENDIF (line MATCHES "${project_regex}") |
1526 | ENDFOREACH (line) |
1527 | |
1528 | IF (NOT module_project) |
1529 | @@ -72,14 +85,77 @@ |
1530 | "does not contain a recognizable CMake project.") |
1531 | ENDIF (NOT module_project) |
1532 | |
1533 | - SET (module_builddir "${CMAKE_BINARY_DIR}/zorba_modules/${module_project}") |
1534 | - FILE (MAKE_DIRECTORY "${module_builddir}") |
1535 | - CREATE_MODULE_CONFIG (${module_project} "${ZORBA_MODULES_DIR}/${module_dir}" |
1536 | - "${module_builddir}") |
1537 | - LIST (APPEND CMAKE_PREFIX_PATH "${module_builddir}") |
1538 | - #SET (ZORBA_EXTERNAL_MODULES_SRCS ${ZORBA_EXTERNAL_MODULES_SRCS} ${ZORBA_MODULES_DIR}/${module_dir}/src) |
1539 | -ENDFOREACH (module_dir) |
1540 | -#SET (ZORBA_EXTERNAL_MODULES_SRCS ${ZORBA_EXTERNAL_MODULES_SRCS} PARENT_SCOPE) |
1541 | +ENDFOREACH (module_dir) |
1542 | + |
1543 | +# Next, form the DAG. This comprises one list containing only those |
1544 | +# module projects that some other module project depends on |
1545 | +# (dep_module_projects), and a series of CMake variables named |
1546 | +# eg. "zorba-email-module_DEPS" containing the module projects that |
1547 | +# the named project depends on. Doing this unfortunately requires us |
1548 | +# to read through all CMakeLists.txt files again. |
1549 | +SET (find_package_regex |
1550 | + "[Ff][Ii][Nn][Dd]_[Pp][Aa][Cc][Kk][Aa][Gg][Ee] *\\( *([^ )]*)") |
1551 | +SET (dep_module_projects) |
1552 | +FOREACH (module_dir ${module_dirs}) |
1553 | + SET (module_project) |
1554 | + SET (cmakelists_file "${ZORBA_MODULES_DIR}/${module_dir}/CMakeLists.txt") |
1555 | + FILE (STRINGS "${cmakelists_file}" cmakelists |
1556 | + REGEX "${project_regex}|${find_package_regex}") |
1557 | + FOREACH (line ${cmakelists}) |
1558 | + IF (line MATCHES "${project_regex}") |
1559 | + # Don't have to do error checking here; was done in last pass. |
1560 | + SET (module_project "${CMAKE_MATCH_1}") |
1561 | + ELSEIF (line MATCHES "${find_package_regex}") |
1562 | + SET (dependee ${CMAKE_MATCH_1}) |
1563 | + # Ensure this dependency is a known module project, and not some |
1564 | + # other dependency like "Zorba" - don't want those in the DAG. |
1565 | + LIST (FIND module_projects "${dependee}" is_known) |
1566 | + IF (is_known GREATER -1) |
1567 | + message (STATUS "${module_project} depends on ${dependee}") |
1568 | + # Save the dependency in a variable based on the current project |
1569 | + LIST (APPEND "${module_project}_DEPS" ${dependee}) |
1570 | + # Also add this dependee to dep_module_projects |
1571 | + LIST (APPEND dep_module_projects ${dependee}) |
1572 | + ENDIF (is_known GREATER -1) |
1573 | + ENDIF (line MATCHES "${project_regex}") |
1574 | + ENDFOREACH (line) |
1575 | + |
1576 | +ENDFOREACH (module_dir) |
1577 | + |
1578 | + |
1579 | +# Now, transform the DAG into a dependency-ordered list. See |
1580 | +# http://en.wikipedia.org/wiki/Topological_sorting . |
1581 | +SET (no_deps) |
1582 | +SET (visited) |
1583 | +SET (ordered_modules) |
1584 | +MACRO (VISIT mod_name) |
1585 | + LIST (FIND visited "${mod_name}" is_visited) |
1586 | + IF (is_visited EQUAL -1) |
1587 | + # Haven't seen this module before; iterate through modules that depend on it |
1588 | + LIST (APPEND visited "${mod_name}") |
1589 | + FOREACH (depender ${${mod_name}_DEPS}) |
1590 | + VISIT ("${depender}") |
1591 | + ENDFOREACH (depender) |
1592 | + # Now that all modules that depend on it have been added, add this one |
1593 | + LIST (APPEND ordered_modules "${mod_name}") |
1594 | + ELSE (is_visited EQUAL -1) |
1595 | + ENDIF (is_visited EQUAL -1) |
1596 | +ENDMACRO (VISIT) |
1597 | +# Annoying - LIST(REMOVE_DUPLICATES) dies if the list is empty. |
1598 | +LIST (LENGTH dep_module_projects num_deps) |
1599 | +IF (num_deps GREATER 0) |
1600 | + LIST (REMOVE_DUPLICATES dep_module_projects) |
1601 | +ENDIF (num_deps GREATER 0) |
1602 | +FOREACH (module_project ${module_projects}) |
1603 | + # Only initially visit those modules projects that do NOT have any |
1604 | + # module projects depending on them; that is, only visit those module |
1605 | + # projects that are NOT in dep_module_projects. |
1606 | + LIST (FIND dep_module_projects "${module_project}" is_dep) |
1607 | + IF (is_dep EQUAL -1) |
1608 | + VISIT (${module_project}) |
1609 | + ENDIF (is_dep EQUAL -1) |
1610 | + |
1611 | +ENDFOREACH (module_project) |
1612 | |
1613 | # Each of these projects will also want to be able to |
1614 | # FIND_PACKAGE(Zorba), so add our own build dir to the CMake module |
1615 | @@ -89,9 +165,16 @@ |
1616 | # Now, iterate through all the module projects again and actually add |
1617 | # them to this Zorba project. Create a binary directory for them |
1618 | # inside our own. |
1619 | -FOREACH (module_dir ${module_dirs}) |
1620 | +FOREACH (module_project ${ordered_modules}) |
1621 | + # Create the module binary directory and add it to CMAKE_PREFIX_PATH |
1622 | + # so other modules can find it. Then, add the module project |
1623 | + # directory. |
1624 | + SET (module_dir "${${module_project}_DIR}") |
1625 | + SET (module_builddir "${CMAKE_BINARY_DIR}/zorba_modules/${module_project}") |
1626 | + FILE (MAKE_DIRECTORY "${module_builddir}") |
1627 | + LIST (APPEND CMAKE_PREFIX_PATH "${module_builddir}") |
1628 | ADD_SUBDIRECTORY("${ZORBA_MODULES_DIR}/${module_dir}" |
1629 | - "${CMAKE_BINARY_DIR}/zorba_modules/zorba_${module_dir}_module") |
1630 | -ENDFOREACH (module_dir) |
1631 | + "${CMAKE_BINARY_DIR}/zorba_modules/${module_project}") |
1632 | +ENDFOREACH (module_project) |
1633 | |
1634 | MESSAGE(STATUS "End modules") |
1635 | |
1636 | === modified file 'modules/ExternalModules.conf' |
1637 | --- modules/ExternalModules.conf 2012-04-11 20:22:52 +0000 |
1638 | +++ modules/ExternalModules.conf 2012-04-27 13:22:48 +0000 |
1639 | @@ -32,7 +32,7 @@ |
1640 | excel bzr lp:zorba/excel-module zorba-2.2 |
1641 | geo bzr lp:zorba/geo-module zorba-2.2 |
1642 | http-client bzr lp:zorba/http-client-module zorba-2.2 |
1643 | -image bzr lp:zorba/image-module zorba-2.2 |
1644 | +image bzr lp:zorba/image-module 1.0 |
1645 | languages bzr lp:zorba/languages-module zorba-2.2 |
1646 | oauth bzr lp:zorba/oauth-module zorba-2.2 |
1647 | process bzr lp:zorba/process-module zorba-2.2 |
1648 | @@ -40,3 +40,5 @@ |
1649 | system bzr lp:zorba/system-module zorba-2.2 |
1650 | xqxq bzr lp:zorba/xqxq-module zorba-2.2 |
1651 | email bzr lp:zorba/email-module zorba-2.2 |
1652 | +util-jvm bzr lp:zorba/util-jvm-module |
1653 | +schema-tools bzr lp:zorba/schema-tools-module |
1654 | |
1655 | === modified file 'modules/com/zorba-xquery/www/modules/converters/json.xq' |
1656 | --- modules/com/zorba-xquery/www/modules/converters/json.xq 2012-03-08 23:31:02 +0000 |
1657 | +++ modules/com/zorba-xquery/www/modules/converters/json.xq 2012-04-27 13:22:48 +0000 |
1658 | @@ -100,7 +100,7 @@ |
1659 | import schema namespace json-options = |
1660 | "http://www.zorba-xquery.com/modules/converters/json-options"; |
1661 | |
1662 | -declare namespace ann = "http://www.zorba-xquery.com/annotations"; |
1663 | +declare namespace an = "http://www.zorba-xquery.com/annotations"; |
1664 | declare namespace err = "http://www.w3.org/2005/xqt-errors"; |
1665 | declare namespace zerr = "http://www.zorba-xquery.com/errors"; |
1666 | |
1667 | @@ -252,7 +252,7 @@ |
1668 | $options as item()? |
1669 | ) as element()* external; |
1670 | |
1671 | -declare %ann:streamable %private function json:serialize-internal( |
1672 | +declare %an:streamable %private function json:serialize-internal( |
1673 | $xml as item()*, |
1674 | $options as item()? |
1675 | ) as xs:string external; |
1676 | |
1677 | === modified file 'modules/com/zorba-xquery/www/modules/datetime.xq' |
1678 | --- modules/com/zorba-xquery/www/modules/datetime.xq 2012-04-11 20:22:52 +0000 |
1679 | +++ modules/com/zorba-xquery/www/modules/datetime.xq 2012-04-27 13:22:48 +0000 |
1680 | @@ -28,7 +28,7 @@ |
1681 | : |
1682 | :) |
1683 | module namespace datetime = "http://www.zorba-xquery.com/modules/datetime"; |
1684 | -declare namespace ann = "http://www.zorba-xquery.com/annotations"; |
1685 | +declare namespace an = "http://www.zorba-xquery.com/annotations"; |
1686 | declare namespace ver = "http://www.zorba-xquery.com/options/versioning"; |
1687 | declare option ver:module-version "2.0"; |
1688 | |
1689 | @@ -39,7 +39,7 @@ |
1690 | : |
1691 | : @return the non-stable datetime value |
1692 | :) |
1693 | -declare %ann:nondeterministic function datetime:current-dateTime ( ) as xs:dateTime external; |
1694 | +declare %an:nondeterministic function datetime:current-dateTime ( ) as xs:dateTime external; |
1695 | |
1696 | (:~ |
1697 | : Return the current time value. |
1698 | @@ -48,7 +48,7 @@ |
1699 | : |
1700 | : @return the non-stable time value |
1701 | :) |
1702 | -declare %ann:nondeterministic function datetime:current-time ( ) as xs:time external; |
1703 | +declare %an:nondeterministic function datetime:current-time ( ) as xs:time external; |
1704 | |
1705 | (:~ |
1706 | : Return the current date value. |
1707 | @@ -57,11 +57,11 @@ |
1708 | : |
1709 | : @return the non-stable date value |
1710 | :) |
1711 | -declare %ann:nondeterministic function datetime:current-date ( ) as xs:date external; |
1712 | +declare %an:nondeterministic function datetime:current-date ( ) as xs:date external; |
1713 | |
1714 | (:~ |
1715 | : Return the the number of milliseconds since the Epoch. |
1716 | : |
1717 | : @return the said number of milliseconds. |
1718 | :) |
1719 | -declare %ann:nondeterministic function datetime:timestamp ( ) as xs:long external; |
1720 | +declare %an:nondeterministic function datetime:timestamp ( ) as xs:long external; |
1721 | |
1722 | === modified file 'modules/com/zorba-xquery/www/modules/fetch.xq' |
1723 | --- modules/com/zorba-xquery/www/modules/fetch.xq 2012-04-11 20:22:52 +0000 |
1724 | +++ modules/com/zorba-xquery/www/modules/fetch.xq 2012-04-27 13:22:48 +0000 |
1725 | @@ -33,7 +33,7 @@ |
1726 | :) |
1727 | module namespace fetch = "http://www.zorba-xquery.com/modules/fetch"; |
1728 | |
1729 | -declare namespace ann = "http://www.zorba-xquery.com/annotations"; |
1730 | +declare namespace an = "http://www.zorba-xquery.com/annotations"; |
1731 | |
1732 | declare namespace zerr = "http://www.zorba-xquery.com/errors"; |
1733 | |
1734 | @@ -49,7 +49,7 @@ |
1735 | : URI Resolvers</a>. Therefore, it queries all URI mappers |
1736 | : and resolvers with kind <tt>EntityData::SOME_CONTENT</tt>.</p> |
1737 | : |
1738 | - : <p>The function is annotated with the <tt>ann:streamable</tt> |
1739 | + : <p>The function is annotated with the <tt>an:streamable</tt> |
1740 | : annotation, that is it returns a streamable string. A streamable |
1741 | : string can only be consumed once. Please see section "Streamable Strings" |
1742 | : in the <a href="../../html/options_and_annotations.html"> |
1743 | @@ -65,7 +65,7 @@ |
1744 | : @see <a href="../../html/uriresolvers.html">URI Resolvers</a>. |
1745 | : @see <a href="../../html/options_and_annotations.html">Documentation of Zorba's annotations</a>. |
1746 | :) |
1747 | -declare %ann:streamable function fetch:content($uri as xs:string) as xs:string |
1748 | +declare %an:streamable function fetch:content($uri as xs:string) as xs:string |
1749 | { |
1750 | fetch:content($uri, "SOME_CONTENT") |
1751 | }; |
1752 | @@ -79,7 +79,7 @@ |
1753 | : URI Resolvers</a>. Therefore, it queries all URI mappers |
1754 | : and resolvers with the specified entity kind.</p> |
1755 | : |
1756 | - : <p>The function is annotated with the <tt>ann:streamable</tt> |
1757 | + : <p>The function is annotated with the <tt>an:streamable</tt> |
1758 | : annotation, that is it returns a streamable string. A streamable |
1759 | : string can only be consumed once. Please see section "Streamable Strings" |
1760 | : in the <a href="../../html/options_and_annotations.html"> |
1761 | @@ -97,4 +97,4 @@ |
1762 | : @see <a href="../../html/options_and_annotations.html">Documentation of Zorba's annotations</a>. |
1763 | :) |
1764 | |
1765 | -declare %ann:streamable function fetch:content($uri as xs:string, $entityKind as xs:string) as xs:string external; |
1766 | +declare %an:streamable function fetch:content($uri as xs:string, $entityKind as xs:string) as xs:string external; |
1767 | |
1768 | === modified file 'modules/com/zorba-xquery/www/modules/http-client.xq' |
1769 | --- modules/com/zorba-xquery/www/modules/http-client.xq 2012-04-11 20:22:52 +0000 |
1770 | +++ modules/com/zorba-xquery/www/modules/http-client.xq 2012-04-27 13:22:48 +0000 |
1771 | @@ -248,7 +248,7 @@ |
1772 | |
1773 | import schema namespace http-schema = "http://expath.org/ns/http-client"; |
1774 | |
1775 | -declare namespace ann = "http://www.zorba-xquery.com/annotations"; |
1776 | +declare namespace an = "http://www.zorba-xquery.com/annotations"; |
1777 | declare namespace ver = "http://www.zorba-xquery.com/options/versioning"; |
1778 | declare namespace err = "http://www.w3.org/2005/xqt-errors"; |
1779 | |
1780 | @@ -291,7 +291,7 @@ |
1781 | : @example test/rbkt/Queries/zorba/http-client/send-request/send-request_href.xq |
1782 | : @example test/rbkt/Queries/zorba/http-client/send-request/http3-post.xq |
1783 | :) |
1784 | -declare %ann:sequential function http:send-request( |
1785 | +declare %an:sequential function http:send-request( |
1786 | $request as element(http-schema:request)?, |
1787 | $href as xs:string?, |
1788 | $bodies as item()*) as item()+ |
1789 | @@ -334,7 +334,7 @@ |
1790 | : |
1791 | : @example test/rbkt/Queries/zorba/http-client/get/get_text.xq |
1792 | :) |
1793 | -declare %ann:nondeterministic function http:get($href as xs:string) as item()+ |
1794 | +declare %an:nondeterministic function http:get($href as xs:string) as item()+ |
1795 | { |
1796 | http:http-nondeterministic-impl(validate {<http-schema:request method="GET" href="{$href}" follow-redirect="true"/>}, (), ()) |
1797 | }; |
1798 | @@ -353,7 +353,7 @@ |
1799 | : |
1800 | : @example test/rbkt/Queries/zorba/http-client/get-node/get-node_xml_query.xq |
1801 | :) |
1802 | -declare %ann:nondeterministic function http:get-node($href as xs:string) as item()+ |
1803 | +declare %an:nondeterministic function http:get-node($href as xs:string) as item()+ |
1804 | { |
1805 | http:http-nondeterministic-impl(validate {<http-schema:request method="GET" href="{$href}" follow-redirect="true" override-media-type="text/xml; charset=utf-8"/>}, (), ()) |
1806 | }; |
1807 | @@ -373,7 +373,7 @@ |
1808 | : |
1809 | : @example test/rbkt/Queries/zorba/http-client/get-text/get-text_xml_query.xq |
1810 | :) |
1811 | -declare %ann:nondeterministic function http:get-text($href as xs:string) as item()+ |
1812 | +declare %an:nondeterministic function http:get-text($href as xs:string) as item()+ |
1813 | { |
1814 | http:http-nondeterministic-impl(validate {<http-schema:request method="GET" href="{$href}" follow-redirect="true" override-media-type="text/plain; charset=utf-8"/>}, (), ()) |
1815 | }; |
1816 | @@ -393,7 +393,7 @@ |
1817 | : |
1818 | : @example test/rbkt/Queries/zorba/http-client/get-binary/get-binary_xml_query.xq |
1819 | :) |
1820 | -declare %ann:nondeterministic function http:get-binary($href as xs:string) as item()+ |
1821 | +declare %an:nondeterministic function http:get-binary($href as xs:string) as item()+ |
1822 | { |
1823 | http:http-nondeterministic-impl(validate {<http-schema:request method="GET" href="{$href}" follow-redirect="true" override-media-type="binary"/>}, (), ()) |
1824 | }; |
1825 | @@ -411,7 +411,7 @@ |
1826 | : |
1827 | : @example test/rbkt/Queries/zorba/http-client/head/head_status.xq |
1828 | :) |
1829 | -declare %ann:nondeterministic function http:head($href as xs:string) as item() { |
1830 | +declare %an:nondeterministic function http:head($href as xs:string) as item() { |
1831 | http:http-nondeterministic-impl( |
1832 | validate { |
1833 | <http-schema:request method="HEAD" href="{$href}"> |
1834 | @@ -431,7 +431,7 @@ |
1835 | : |
1836 | : @example test/rbkt/Queries/zorba/http-client/options/options.xq |
1837 | :) |
1838 | -declare %ann:nondeterministic function http:options($href as xs:string) as xs:string* { |
1839 | +declare %an:nondeterministic function http:options($href as xs:string) as xs:string* { |
1840 | let $resp := http:http-nondeterministic-impl( |
1841 | validate { |
1842 | <http-schema:request method="OPTIONS" href="{$href}"> |
1843 | @@ -460,7 +460,7 @@ |
1844 | : |
1845 | : @example test/rbkt/Queries/zorba/http-client/put/put2_element.xq |
1846 | :) |
1847 | -declare %ann:sequential function http:put($href as xs:string, $body as item()) as item()+ |
1848 | +declare %an:sequential function http:put($href as xs:string, $body as item()) as item()+ |
1849 | { |
1850 | variable $media-type as xs:string+ := |
1851 | typeswitch($body) |
1852 | @@ -504,7 +504,7 @@ |
1853 | : |
1854 | : @example test/rbkt/Queries/zorba/http-client/put/put3_html_br.xq |
1855 | :) |
1856 | -declare %ann:sequential function http:put($href as xs:string, $body as item(), $content-type as xs:string) as item()+ |
1857 | +declare %an:sequential function http:put($href as xs:string, $body as item(), $content-type as xs:string) as item()+ |
1858 | { |
1859 | variable $method := |
1860 | typeswitch ($body) |
1861 | @@ -545,7 +545,7 @@ |
1862 | : |
1863 | : @example test/rbkt/Queries/zorba/http-client/delete/delete.xq |
1864 | :) |
1865 | -declare %ann:sequential function http:delete($href as xs:string) as item()+ |
1866 | +declare %an:sequential function http:delete($href as xs:string) as item()+ |
1867 | { |
1868 | http:http-sequential-impl( |
1869 | validate { |
1870 | @@ -572,7 +572,7 @@ |
1871 | : |
1872 | : @example test/rbkt/Queries/zorba/http-client/post/post2_comment.xq |
1873 | :) |
1874 | -declare %ann:sequential function http:post($href as xs:string, $body as item()) as item()+ |
1875 | +declare %an:sequential function http:post($href as xs:string, $body as item()) as item()+ |
1876 | { |
1877 | variable $media-type as xs:string := |
1878 | typeswitch($body) |
1879 | @@ -617,7 +617,7 @@ |
1880 | : |
1881 | : @example test/rbkt/Queries/zorba/http-client/post/post3_xml.xq |
1882 | :) |
1883 | -declare %ann:sequential function http:post($href as xs:string, $body as item(), $content-type as xs:string) as item()+ |
1884 | +declare %an:sequential function http:post($href as xs:string, $body as item(), $content-type as xs:string) as item()+ |
1885 | { |
1886 | variable $method := |
1887 | typeswitch ($body) |
1888 | @@ -645,13 +645,13 @@ |
1889 | $result |
1890 | }; |
1891 | |
1892 | -declare %private %ann:sequential function http:http-sequential-impl( |
1893 | +declare %private %an:sequential function http:http-sequential-impl( |
1894 | $request as schema-element(http-schema:request)?, |
1895 | $href as xs:string?, |
1896 | $bodies as item()*) as item()+ external; |
1897 | |
1898 | |
1899 | -declare %private %ann:nondeterministic function http:http-nondeterministic-impl( |
1900 | +declare %private %an:nondeterministic function http:http-nondeterministic-impl( |
1901 | $request as schema-element(http-schema:request)?, |
1902 | $href as xs:string?, |
1903 | $bodies as item()*) as item()+ external; |
1904 | |
1905 | === modified file 'modules/com/zorba-xquery/www/modules/pregenerated/errors.xq' |
1906 | --- modules/com/zorba-xquery/www/modules/pregenerated/errors.xq 2012-04-11 20:22:52 +0000 |
1907 | +++ modules/com/zorba-xquery/www/modules/pregenerated/errors.xq 2012-04-27 13:22:48 +0000 |
1908 | @@ -521,14 +521,6 @@ |
1909 | |
1910 | (:~ |
1911 | :) |
1912 | -declare variable $zerr:ZDDY0034 as xs:QName := fn:QName($zerr:NS, "zerr:ZDDY0034"); |
1913 | - |
1914 | -(:~ |
1915 | -:) |
1916 | -declare variable $zerr:ZDDY0035 as xs:QName := fn:QName($zerr:NS, "zerr:ZDDY0035"); |
1917 | - |
1918 | -(:~ |
1919 | -:) |
1920 | declare variable $zerr:ZDDY0031 as xs:QName := fn:QName($zerr:NS, "zerr:ZDDY0031"); |
1921 | |
1922 | (:~ |
1923 | @@ -541,6 +533,18 @@ |
1924 | |
1925 | (:~ |
1926 | :) |
1927 | +declare variable $zerr:ZDDY0034 as xs:QName := fn:QName($zerr:NS, "zerr:ZDDY0034"); |
1928 | + |
1929 | +(:~ |
1930 | +:) |
1931 | +declare variable $zerr:ZDDY0035 as xs:QName := fn:QName($zerr:NS, "zerr:ZDDY0035"); |
1932 | + |
1933 | +(:~ |
1934 | +:) |
1935 | +declare variable $zerr:ZDDY0036 as xs:QName := fn:QName($zerr:NS, "zerr:ZDDY0036"); |
1936 | + |
1937 | +(:~ |
1938 | +:) |
1939 | declare variable $zerr:ZDST0001 as xs:QName := fn:QName($zerr:NS, "zerr:ZDST0001"); |
1940 | |
1941 | (:~ |
1942 | |
1943 | === modified file 'modules/com/zorba-xquery/www/modules/project_xqdoc.xq' |
1944 | --- modules/com/zorba-xquery/www/modules/project_xqdoc.xq 2012-04-11 20:22:52 +0000 |
1945 | +++ modules/com/zorba-xquery/www/modules/project_xqdoc.xq 2012-04-27 13:22:48 +0000 |
1946 | @@ -33,7 +33,7 @@ |
1947 | import schema namespace xqdoc = "http://www.xqdoc.org/1.0"; |
1948 | import schema namespace output = "http://www.w3.org/2010/xslt-xquery-serialization"; |
1949 | |
1950 | -declare namespace ann = "http://www.zorba-xquery.com/annotations"; |
1951 | +declare namespace an = "http://www.zorba-xquery.com/annotations"; |
1952 | declare namespace zm = "http://www.zorba-xquery.com/manifest"; |
1953 | import module namespace fetch = "http://www.zorba-xquery.com/modules/fetch"; |
1954 | |
1955 | @@ -58,7 +58,7 @@ |
1956 | : @param $xqdocPath where to generate the XQDoc XML documents. |
1957 | : @return empty sequence. |
1958 | :) |
1959 | -declare %ann:sequential function pxqdoc:delete-XML-dir( |
1960 | +declare %an:sequential function pxqdoc:delete-XML-dir( |
1961 | $xqdocPath as xs:string) |
1962 | { |
1963 | variable $xqdocXMLPath := fn:concat( $xqdocPath, |
1964 | @@ -70,7 +70,7 @@ |
1965 | else (); |
1966 | }; |
1967 | |
1968 | -declare %private %ann:nondeterministic function pxqdoc:load-manifest( |
1969 | +declare %private %an:nondeterministic function pxqdoc:load-manifest( |
1970 | $zorbaManifestPath as xs:string) |
1971 | { |
1972 | try |
1973 | @@ -90,7 +90,7 @@ |
1974 | : @param $xqdocPath where to generate the XQDoc XML documents. |
1975 | : @return empty sequence. |
1976 | :) |
1977 | -declare %ann:sequential function pxqdoc:generate-xqdoc-XML( |
1978 | +declare %an:sequential function pxqdoc:generate-xqdoc-XML( |
1979 | $zorbaManifestPath as xs:string, |
1980 | $xqdocPath as xs:string) |
1981 | { |
1982 | @@ -147,4 +147,4 @@ |
1983 | "http:__", |
1984 | "" |
1985 | ) |
1986 | -}; |
1987 | \ No newline at end of file |
1988 | +}; |
1989 | |
1990 | === modified file 'modules/com/zorba-xquery/www/modules/random.xq' |
1991 | --- modules/com/zorba-xquery/www/modules/random.xq 2012-04-11 20:22:52 +0000 |
1992 | +++ modules/com/zorba-xquery/www/modules/random.xq 2012-04-27 13:22:48 +0000 |
1993 | @@ -26,7 +26,7 @@ |
1994 | :) |
1995 | module namespace r = "http://www.zorba-xquery.com/modules/random"; |
1996 | |
1997 | -declare namespace ann = "http://www.zorba-xquery.com/annotations"; |
1998 | +declare namespace an = "http://www.zorba-xquery.com/annotations"; |
1999 | declare namespace zerr = "http://www.zorba-xquery.com/errors"; |
2000 | |
2001 | declare namespace ver = "http://www.zorba-xquery.com/options/versioning"; |
2002 | @@ -75,7 +75,7 @@ |
2003 | : @return <tt>$num</tt> random integers, or the empty |
2004 | : sequence if <tt>$num</tt> is negative. |
2005 | :) |
2006 | -declare %ann:nondeterministic function r:random( |
2007 | +declare %an:nondeterministic function r:random( |
2008 | $num as xs:integer |
2009 | ) as xs:integer* external; |
2010 | |
2011 | @@ -88,7 +88,7 @@ |
2012 | : |
2013 | : @return a random integer |
2014 | :) |
2015 | -declare %ann:nondeterministic function r:random() as xs:integer |
2016 | +declare %an:nondeterministic function r:random() as xs:integer |
2017 | { |
2018 | r:random(1) |
2019 | }; |
2020 | @@ -157,7 +157,7 @@ |
2021 | : |
2022 | : @error r:invalid-arg if <tt>$lower</tt> is greater than <tt>$upper</tt> |
2023 | :) |
2024 | -declare %ann:nondeterministic function r:random-between( |
2025 | +declare %an:nondeterministic function r:random-between( |
2026 | $lower as xs:integer, |
2027 | $upper as xs:integer, |
2028 | $num as xs:integer) as xs:integer* |
2029 | @@ -192,7 +192,7 @@ |
2030 | : @param $upper the upper bound for the random number |
2031 | : @return a random integer within the given range |
2032 | :) |
2033 | -declare %ann:nondeterministic function r:random-between( |
2034 | +declare %an:nondeterministic function r:random-between( |
2035 | $lower as xs:integer, |
2036 | $upper as xs:integer |
2037 | ) as xs:integer |
2038 | @@ -206,5 +206,5 @@ |
2039 | : |
2040 | : @return the generated UUID as xs:string |
2041 | :) |
2042 | -declare %ann:nondeterministic function r:uuid() as xs:string external; |
2043 | +declare %an:nondeterministic function r:uuid() as xs:string external; |
2044 | |
2045 | |
2046 | === modified file 'modules/com/zorba-xquery/www/modules/reflection.xq' |
2047 | --- modules/com/zorba-xquery/www/modules/reflection.xq 2012-04-11 20:22:52 +0000 |
2048 | +++ modules/com/zorba-xquery/www/modules/reflection.xq 2012-04-27 13:22:48 +0000 |
2049 | @@ -29,7 +29,7 @@ |
2050 | |
2051 | module namespace reflection = "http://www.zorba-xquery.com/modules/reflection"; |
2052 | |
2053 | -declare namespace ann = "http://www.zorba-xquery.com/annotations"; |
2054 | +declare namespace an = "http://www.zorba-xquery.com/annotations"; |
2055 | |
2056 | declare namespace err = "http://www.w3.org/2005/xqt-errors"; |
2057 | |
2058 | @@ -43,7 +43,7 @@ |
2059 | : variable, taken from a file, etc. The first parameter must always be a |
2060 | : QName identifying a known function. |
2061 | : |
2062 | - : The function is declared with the %ann:variadic annotation. Hence, it allows |
2063 | + : The function is declared with the %an:variadic annotation. Hence, it allows |
2064 | : for an arbitrary number of parameters. All of these parameters (except the |
2065 | : first one) will be passed to the function that is called. |
2066 | : |
2067 | @@ -61,7 +61,7 @@ |
2068 | : @example test/rbkt/Queries/zorba/reflection/reflection-invoke-01.xq |
2069 | : @example test/rbkt/Queries/zorba/reflection/reflection-invoke-92.xq |
2070 | :) |
2071 | -declare %ann:variadic function reflection:invoke( |
2072 | +declare %an:variadic function reflection:invoke( |
2073 | $name as xs:QName |
2074 | ) as item()* external; |
2075 | |
2076 | @@ -77,7 +77,7 @@ |
2077 | : |
2078 | : @see reflection:invoke() |
2079 | :) |
2080 | -declare %ann:nondeterministic %ann:variadic updating function reflection:invoke-n( |
2081 | +declare %an:nondeterministic %an:variadic updating function reflection:invoke-n( |
2082 | $name as xs:QName |
2083 | ) as item()* external; |
2084 | |
2085 | @@ -93,7 +93,7 @@ |
2086 | : |
2087 | : @see reflection:invoke-n() |
2088 | :) |
2089 | -declare %ann:nondeterministic %ann:variadic updating function reflection:invoke-u( |
2090 | +declare %an:nondeterministic %an:variadic updating function reflection:invoke-u( |
2091 | $name as xs:QName |
2092 | ) external; |
2093 | |
2094 | @@ -109,7 +109,7 @@ |
2095 | : |
2096 | : @see reflection:invoke() |
2097 | :) |
2098 | -declare %ann:variadic %ann:sequential function reflection:invoke-s( |
2099 | +declare %an:variadic %an:sequential function reflection:invoke-s( |
2100 | $name as xs:QName |
2101 | ) as item()* external; |
2102 | |
2103 | @@ -178,7 +178,7 @@ |
2104 | : |
2105 | : @return the result of evaluating the query |
2106 | :) |
2107 | -declare %ann:nondeterministic function reflection:eval-n( |
2108 | +declare %an:nondeterministic function reflection:eval-n( |
2109 | $query as xs:string |
2110 | ) as item()* external; |
2111 | |
2112 | @@ -197,7 +197,7 @@ |
2113 | : |
2114 | : @see reflection:eval() |
2115 | :) |
2116 | -declare %ann:nondeterministic updating function reflection:eval-u( |
2117 | +declare %an:nondeterministic updating function reflection:eval-u( |
2118 | $query as xs:string |
2119 | ) external; |
2120 | |
2121 | @@ -217,6 +217,6 @@ |
2122 | : |
2123 | : @see reflection:eval() |
2124 | :) |
2125 | -declare %ann:sequential function reflection:eval-s( |
2126 | +declare %an:sequential function reflection:eval-s( |
2127 | $query as xs:string |
2128 | ) as item()* external; |
2129 | |
2130 | === modified file 'modules/com/zorba-xquery/www/modules/store/data-structures/unordered-map.xq' |
2131 | --- modules/com/zorba-xquery/www/modules/store/data-structures/unordered-map.xq 2012-04-11 20:22:52 +0000 |
2132 | +++ modules/com/zorba-xquery/www/modules/store/data-structures/unordered-map.xq 2012-04-27 13:22:48 +0000 |
2133 | @@ -40,7 +40,7 @@ |
2134 | |
2135 | declare namespace zerr = "http://www.zorba-xquery.com/errors"; |
2136 | declare namespace err = "http://www.w3.org/2005/xqt-errors"; |
2137 | -declare namespace ann = "http://www.zorba-xquery.com/annotations"; |
2138 | +declare namespace an = "http://www.zorba-xquery.com/annotations"; |
2139 | |
2140 | declare namespace ver = "http://www.zorba-xquery.com/options/versioning"; |
2141 | declare option ver:module-version "2.0"; |
2142 | @@ -63,7 +63,7 @@ |
2143 | : xs:anyAtomicType. |
2144 | : @error zerr:ZSTR0001 if a map with the given name already exists. |
2145 | :) |
2146 | -declare %ann:variadic %ann:sequential function map:create( |
2147 | +declare %an:variadic %an:sequential function map:create( |
2148 | $name as xs:QName, |
2149 | $key-type as xs:QName) as empty-sequence() external; |
2150 | |
2151 | @@ -77,7 +77,7 @@ |
2152 | : |
2153 | : @error zerr:ZDDY0023 if a map with the given name does not exist. |
2154 | :) |
2155 | -declare %ann:sequential function map:delete( |
2156 | +declare %an:sequential function map:delete( |
2157 | $name as xs:QName) as empty-sequence() external; |
2158 | |
2159 | (:~ |
2160 | @@ -107,7 +107,7 @@ |
2161 | : @see map:create |
2162 | : |
2163 | :) |
2164 | -declare %ann:variadic %ann:sequential function map:insert( |
2165 | +declare %an:variadic %an:sequential function map:insert( |
2166 | $name as xs:QName, |
2167 | $value as item()*, |
2168 | $key as xs:anyAtomicType?) as empty-sequence() external; |
2169 | @@ -133,7 +133,7 @@ |
2170 | : |
2171 | : @see map:create |
2172 | :) |
2173 | -declare %ann:variadic function map:get( |
2174 | +declare %an:variadic function map:get( |
2175 | $name as xs:QName, |
2176 | $key as xs:anyAtomicType?) as item()* external; |
2177 | |
2178 | @@ -158,7 +158,7 @@ |
2179 | : @see map:create |
2180 | : |
2181 | :) |
2182 | -declare %ann:variadic %ann:sequential function map:remove( |
2183 | +declare %an:variadic %an:sequential function map:remove( |
2184 | $name as xs:QName, |
2185 | $key as xs:anyAtomicType?) as empty-sequence() external; |
2186 | |
2187 | |
2188 | === modified file 'modules/com/zorba-xquery/www/modules/store/dynamic/collections/dml.xq' |
2189 | --- modules/com/zorba-xquery/www/modules/store/dynamic/collections/dml.xq 2012-04-11 20:22:52 +0000 |
2190 | +++ modules/com/zorba-xquery/www/modules/store/dynamic/collections/dml.xq 2012-04-27 13:22:48 +0000 |
2191 | @@ -17,7 +17,7 @@ |
2192 | :) |
2193 | |
2194 | (:~ |
2195 | - : This modules provides a set of functions to modify a collection and retrieve the nodes |
2196 | + : This modules provides a set of functions to modify a collection and retrieve the items |
2197 | : contained in a particular collection. |
2198 | : |
2199 | : <p>Please refer to our documentation for <a href="../../html/data_lifecycle.html"> |
2200 | @@ -35,7 +35,7 @@ |
2201 | module namespace dml = "http://www.zorba-xquery.com/modules/store/dynamic/collections/dml"; |
2202 | |
2203 | declare namespace zerr = "http://www.zorba-xquery.com/errors"; |
2204 | -declare namespace ann = "http://www.zorba-xquery.com/annotations"; |
2205 | +declare namespace an = "http://www.zorba-xquery.com/annotations"; |
2206 | |
2207 | declare namespace ver = "http://www.zorba-xquery.com/options/versioning"; |
2208 | declare option ver:module-version "2.0"; |
2209 | @@ -53,6 +53,8 @@ |
2210 | : |
2211 | : @error zerr:ZDDY0003 if the collection identified by $name is not available. |
2212 | : |
2213 | + : @deprecated please use the cdml:insert-first#2 function |
2214 | + : |
2215 | :) |
2216 | declare updating function |
2217 | dml:insert-nodes-first($name as xs:QName, $content as node()*) external; |
2218 | @@ -87,6 +89,8 @@ |
2219 | : |
2220 | : @error zerr:ZDDY0003 if the collection identified by $name is not available. |
2221 | : |
2222 | + : @deprecated please use the cdml:insert-last#2 function |
2223 | + : |
2224 | :) |
2225 | declare updating function |
2226 | dml:insert-nodes-last($name as xs:QName, $content as node()*) external; |
2227 | @@ -125,6 +129,8 @@ |
2228 | : @error zerr:ZDDY0003 if the collection identified by $name is not available. |
2229 | : @error zerr:ZDDY0011 if the target node is not contained in the collection. |
2230 | : |
2231 | + : @deprecated please use the cdml:insert-before#3 function |
2232 | + : |
2233 | :) |
2234 | declare updating function |
2235 | dml:insert-nodes-before( |
2236 | @@ -169,6 +175,8 @@ |
2237 | : @error zerr:ZDDY0003 if the collection identified by $name is not available. |
2238 | : @error zerr:ZDDY0011 if the target node is not contained in the collection. |
2239 | : |
2240 | + : @deprecated please use the cdml:insert-after#3 function |
2241 | + : |
2242 | :) |
2243 | declare updating function |
2244 | dml:insert-nodes-after( |
2245 | @@ -213,8 +221,10 @@ |
2246 | : |
2247 | : @see dml:insert-nodes-first |
2248 | : |
2249 | + : @deprecated please use the cdml:apply-insert-first#2 function |
2250 | + : |
2251 | :) |
2252 | -declare %ann:sequential function |
2253 | +declare %an:sequential function |
2254 | dml:apply-insert-nodes-first( |
2255 | $name as xs:QName, |
2256 | $content as node()*) as node()* external; |
2257 | @@ -235,7 +245,7 @@ |
2258 | : @see dml:insert-first |
2259 | : |
2260 | :) |
2261 | -declare %ann:sequential function |
2262 | +declare %an:sequential function |
2263 | dml:apply-insert-first($name as xs:QName, $content as item()*) as item()* external; |
2264 | |
2265 | |
2266 | @@ -254,8 +264,10 @@ |
2267 | : |
2268 | : @see dml:insert-nodes-last |
2269 | : |
2270 | + : @deprecated please use the cdml:apply-insert-last#2 function |
2271 | + : |
2272 | :) |
2273 | -declare %ann:sequential function dml:apply-insert-nodes-last( |
2274 | +declare %an:sequential function dml:apply-insert-nodes-last( |
2275 | $name as xs:QName, |
2276 | $content as node()*) as node()* external; |
2277 | |
2278 | @@ -276,7 +288,7 @@ |
2279 | : @see dml:insert-last |
2280 | : |
2281 | :) |
2282 | -declare %ann:sequential function dml:apply-insert-last( |
2283 | +declare %an:sequential function dml:apply-insert-last( |
2284 | $name as xs:QName, |
2285 | $content as item()*) as item()* external; |
2286 | |
2287 | @@ -298,8 +310,10 @@ |
2288 | : |
2289 | : @see dml:insert-nodes-before |
2290 | : |
2291 | + : @deprecated please use the cdml:apply-insert-before#3 function |
2292 | + : |
2293 | :) |
2294 | -declare %ann:sequential function |
2295 | +declare %an:sequential function |
2296 | dml:apply-insert-nodes-before( |
2297 | $name as xs:QName, |
2298 | $target as node(), |
2299 | @@ -324,7 +338,7 @@ |
2300 | : @see dml:insert-before |
2301 | : |
2302 | :) |
2303 | -declare %ann:sequential function |
2304 | +declare %an:sequential function |
2305 | dml:apply-insert-before( |
2306 | $name as xs:QName, |
2307 | $target as item(), |
2308 | @@ -348,8 +362,10 @@ |
2309 | : |
2310 | : @see dml:insert-nodes-after |
2311 | : |
2312 | + : @deprecated please use the cdml:apply-insert-after#3 function |
2313 | + : |
2314 | :) |
2315 | -declare %ann:sequential function |
2316 | +declare %an:sequential function |
2317 | dml:apply-insert-nodes-after( |
2318 | $name as xs:QName, |
2319 | $pos as node(), |
2320 | @@ -374,7 +390,7 @@ |
2321 | : @see dml:insert-after |
2322 | : |
2323 | :) |
2324 | -declare %ann:sequential function |
2325 | +declare %an:sequential function |
2326 | dml:apply-insert-after( |
2327 | $name as xs:QName, |
2328 | $pos as item(), |
2329 | @@ -394,6 +410,8 @@ |
2330 | : a collection or not all nodes of the $target sequence belong to the same |
2331 | : collection. |
2332 | : |
2333 | + : @deprecated please use the cdml:delete#1 function |
2334 | + : |
2335 | :) |
2336 | declare updating function |
2337 | dml:delete-nodes($target as node()*) external; |
2338 | @@ -428,6 +446,8 @@ |
2339 | : |
2340 | : @error zerr:ZDDY0011 if the collection doesn't contain any node. |
2341 | : |
2342 | + : @deprecated please use the cdml:delete-first#1 function |
2343 | + : |
2344 | :) |
2345 | declare updating function |
2346 | dml:delete-node-first($name as xs:QName) external; |
2347 | @@ -462,6 +482,8 @@ |
2348 | : |
2349 | : @error zerr:ZDDY0011 if the collection doesn't contain the given number of nodes. |
2350 | : |
2351 | + : @deprecated please use the cdml:delete-first#2 function |
2352 | + : |
2353 | :) |
2354 | declare updating function |
2355 | dml:delete-nodes-first($name as xs:QName, $number as xs:integer) external; |
2356 | @@ -498,6 +520,8 @@ |
2357 | : for the expanded QName $name. |
2358 | : @error zerr:ZDDY0011 if the collection doesn't contain any node. |
2359 | : |
2360 | + : @deprecated please use the cdml:delete-last#1 function |
2361 | + : |
2362 | :) |
2363 | declare updating function |
2364 | dml:delete-node-last($name as xs:QName) external; |
2365 | @@ -535,6 +559,8 @@ |
2366 | : for the expanded QName $name. |
2367 | : @error zerr:ZDDY0011 if the collection doesn't contain the given number of nodes. |
2368 | : |
2369 | + : @deprecated please use the cdml:delete-last#2 function |
2370 | + : |
2371 | :) |
2372 | declare updating function |
2373 | dml:delete-nodes-last($name as xs:QName, $number as xs:integer) external; |
2374 | |
2375 | === modified file 'modules/com/zorba-xquery/www/modules/store/dynamic/collections/w3c/dml.xq' |
2376 | --- modules/com/zorba-xquery/www/modules/store/dynamic/collections/w3c/dml.xq 2012-04-11 20:22:52 +0000 |
2377 | +++ modules/com/zorba-xquery/www/modules/store/dynamic/collections/w3c/dml.xq 2012-04-27 13:22:48 +0000 |
2378 | @@ -43,7 +43,7 @@ |
2379 | import module namespace qdml = "http://www.zorba-xquery.com/modules/store/dynamic/collections/dml"; |
2380 | |
2381 | declare namespace zerr = "http://www.zorba-xquery.com/errors"; |
2382 | -declare namespace ann = "http://www.zorba-xquery.com/annotations"; |
2383 | +declare namespace an = "http://www.zorba-xquery.com/annotations"; |
2384 | |
2385 | declare namespace ver = "http://www.zorba-xquery.com/options/versioning"; |
2386 | declare option ver:module-version "2.0"; |
2387 | @@ -153,7 +153,7 @@ |
2388 | : @see dml:insert-nodes-first |
2389 | : |
2390 | :) |
2391 | -declare %ann:sequential function dml:apply-insert-nodes-first( |
2392 | +declare %an:sequential function dml:apply-insert-nodes-first( |
2393 | $name as xs:string, |
2394 | $content as node()*) as node()* |
2395 | { |
2396 | @@ -176,7 +176,7 @@ |
2397 | : @see dml:insert-nodes-last |
2398 | : |
2399 | :) |
2400 | -declare %ann:sequential function dml:apply-insert-nodes-last( |
2401 | +declare %an:sequential function dml:apply-insert-nodes-last( |
2402 | $name as xs:string, |
2403 | $content as node()*) as node()* |
2404 | { |
2405 | @@ -201,7 +201,7 @@ |
2406 | : @see dml:insert-nodes-before |
2407 | : |
2408 | :) |
2409 | -declare %ann:sequential function dml:apply-insert-nodes-before( |
2410 | +declare %an:sequential function dml:apply-insert-nodes-before( |
2411 | $name as xs:string, |
2412 | $target as node(), |
2413 | $content as node()*) as node()* |
2414 | @@ -227,7 +227,7 @@ |
2415 | : @see dml:insert-nodes-after |
2416 | : |
2417 | :) |
2418 | -declare %ann:sequential function dml:apply-insert-nodes-after( |
2419 | +declare %an:sequential function dml:apply-insert-nodes-after( |
2420 | $name as xs:string, |
2421 | $pos as node(), |
2422 | $content as node()*) as node()* |
2423 | |
2424 | === modified file 'modules/com/zorba-xquery/www/modules/store/static/collections/dml.xq' |
2425 | --- modules/com/zorba-xquery/www/modules/store/static/collections/dml.xq 2012-04-11 20:22:52 +0000 |
2426 | +++ modules/com/zorba-xquery/www/modules/store/static/collections/dml.xq 2012-04-27 13:22:48 +0000 |
2427 | @@ -17,7 +17,7 @@ |
2428 | :) |
2429 | |
2430 | (:~ |
2431 | - : This modules provides a set of functions to modify a collection and retrieve the nodes |
2432 | + : This modules provides a set of functions to modify a collection and retrieve the items |
2433 | : contained in a particular collection. |
2434 | : |
2435 | : <p>This module is part of <a href="../../html/xqddf.html">Zorba's XQuery Data |
2436 | @@ -42,7 +42,7 @@ |
2437 | :) |
2438 | module namespace cdml = "http://www.zorba-xquery.com/modules/store/static/collections/dml"; |
2439 | |
2440 | -declare namespace ann = "http://www.zorba-xquery.com/annotations"; |
2441 | +declare namespace an = "http://www.zorba-xquery.com/annotations"; |
2442 | declare namespace zerr = "http://www.zorba-xquery.com/errors"; |
2443 | |
2444 | declare namespace ver = "http://www.zorba-xquery.com/options/versioning"; |
2445 | @@ -68,6 +68,8 @@ |
2446 | : @error zerr:ZDTY0001 if $content does not match the expected type (as specified |
2447 | : in the collection declaration) according to the rules for SequenceType Matching. |
2448 | : |
2449 | + : @deprecated please use the cdml:insert#2 function |
2450 | + : |
2451 | :) |
2452 | declare updating function |
2453 | cdml:insert-nodes($name as xs:QName, $content as node()*) external; |
2454 | @@ -115,6 +117,8 @@ |
2455 | : @error zerr:ZDTY0001 if $content does not match the expected type (as specified |
2456 | : in the collection declaration) according to the rules for SequenceType Matching. |
2457 | : |
2458 | + : @deprecated please use the cdml:insert-first#2 function |
2459 | + : |
2460 | :) |
2461 | declare updating function |
2462 | cdml:insert-nodes-first($name as xs:QName, $content as node()*) external; |
2463 | @@ -160,6 +164,8 @@ |
2464 | : @error zerr:ZDTY0001 if $content does not match the expected type (as specified |
2465 | : in the collection declaration) according to the rules for SequenceType Matching. |
2466 | : |
2467 | + : @deprecated please use the cdml:insert-last#2 function |
2468 | + : |
2469 | :) |
2470 | declare updating function |
2471 | cdml:insert-nodes-last($name as xs:QName, $content as node()*) external; |
2472 | @@ -210,6 +216,8 @@ |
2473 | : @error zerr:ZDDY0011 if the $target node is not a node that is contained in |
2474 | : the collection $name. |
2475 | : |
2476 | + : @deprecated please use the cdml:insert-before#3 function |
2477 | + : |
2478 | :) |
2479 | declare updating function |
2480 | cdml:insert-nodes-before( |
2481 | @@ -269,6 +277,8 @@ |
2482 | : @error zerr:ZDDY0011 if the $target node is not a node that is contained in |
2483 | : the collection $name. |
2484 | : |
2485 | + : @deprecated please use the cdml:insert-after#3 function |
2486 | + : |
2487 | :) |
2488 | declare updating function |
2489 | cdml:insert-nodes-after( |
2490 | @@ -302,7 +312,7 @@ |
2491 | : |
2492 | :) |
2493 | declare updating function |
2494 | -cdml:insert-after($name as xs:QName, $target as node(), $content as item()*) external; |
2495 | +cdml:insert-after($name as xs:QName, $target as item(), $content as item()*) external; |
2496 | |
2497 | |
2498 | (:~ |
2499 | @@ -325,8 +335,10 @@ |
2500 | : |
2501 | : @see cdml:insert-nodes |
2502 | : |
2503 | + : @deprecated please use the cdml:apply-insert#2 function |
2504 | + : |
2505 | :) |
2506 | -declare %ann:sequential function |
2507 | +declare %an:sequential function |
2508 | cdml:apply-insert-nodes($name as xs:QName, $content as node()*) as node()* external; |
2509 | |
2510 | |
2511 | @@ -350,10 +362,9 @@ |
2512 | : @see cdml:insert |
2513 | : |
2514 | :) |
2515 | -declare %ann:sequential function |
2516 | +declare %an:sequential function |
2517 | cdml:apply-insert($name as xs:QName, $content as item()*) as item()* external; |
2518 | |
2519 | - |
2520 | (:~ |
2521 | : This function does the same as the insert-nodes-first function except |
2522 | : it immediately applies the resulting pending updates and returns the |
2523 | @@ -375,8 +386,10 @@ |
2524 | : |
2525 | : @see cdml:insert-nodes-first |
2526 | : |
2527 | + : @deprecated please use the cdml:apply-insert-first#2 function |
2528 | + : |
2529 | :) |
2530 | -declare %ann:sequential function |
2531 | +declare %an:sequential function |
2532 | cdml:apply-insert-nodes-first( |
2533 | $name as xs:QName, |
2534 | $content as node()*) as node()* external; |
2535 | @@ -404,10 +417,9 @@ |
2536 | : @see cdml:insert-first |
2537 | : |
2538 | :) |
2539 | -declare %ann:sequential function |
2540 | +declare %an:sequential function |
2541 | cdml:apply-insert-first($name as xs:QName, $content as item()*) as item()* external; |
2542 | |
2543 | - |
2544 | (:~ |
2545 | : This function does the same as the insert-nodes-last function except |
2546 | : it immediately applies the resulting pending updates and returns the |
2547 | @@ -428,8 +440,10 @@ |
2548 | : |
2549 | : @see cdml:insert-nodes-last |
2550 | : |
2551 | + : @deprecated please use the cdml:apply-insert-last#2 function |
2552 | + : |
2553 | :) |
2554 | -declare %ann:sequential function |
2555 | +declare %an:sequential function |
2556 | cdml:apply-insert-nodes-last( |
2557 | $name as xs:QName, |
2558 | $content as node()*) as node()* external; |
2559 | @@ -456,7 +470,7 @@ |
2560 | : @see cdml:insert-last |
2561 | : |
2562 | :) |
2563 | -declare %ann:sequential function |
2564 | +declare %an:sequential function |
2565 | cdml:apply-insert-last($name as xs:QName, $content as item()*) as item()* external; |
2566 | |
2567 | |
2568 | @@ -485,8 +499,10 @@ |
2569 | : |
2570 | : @see cdml:insert-nodes-before |
2571 | : |
2572 | + : @deprecated please use the cdml:apply-insert-before#3 function |
2573 | + : |
2574 | :) |
2575 | -declare %ann:sequential function |
2576 | +declare %an:sequential function |
2577 | cdml:apply-insert-nodes-before( |
2578 | $name as xs:QName, |
2579 | $target as node(), |
2580 | @@ -519,7 +535,7 @@ |
2581 | : @see cdml:insert-before |
2582 | : |
2583 | :) |
2584 | -declare %ann:sequential function |
2585 | +declare %an:sequential function |
2586 | cdml:apply-insert-before( |
2587 | $name as xs:QName, |
2588 | $target as item(), |
2589 | @@ -551,8 +567,10 @@ |
2590 | : |
2591 | : @see cdml:insert-nodes-after |
2592 | : |
2593 | + : @deprecated please use the cdml:apply-insert-after#3 function |
2594 | + : |
2595 | :) |
2596 | -declare %ann:sequential function |
2597 | +declare %an:sequential function |
2598 | cdml:apply-insert-nodes-after( |
2599 | $name as xs:QName, |
2600 | $pos as node(), |
2601 | @@ -585,7 +603,7 @@ |
2602 | : @see cdml:insert-after |
2603 | : |
2604 | :) |
2605 | -declare %ann:sequential function |
2606 | +declare %an:sequential function |
2607 | cdml:apply-insert-after( |
2608 | $name as xs:QName, |
2609 | $pos as item(), |
2610 | @@ -609,6 +627,8 @@ |
2611 | : collection or not all nodes of the $target sequence belong to the same |
2612 | : collection. |
2613 | : |
2614 | + : @deprecated please use the cdml:delete#1 function |
2615 | + : |
2616 | :) |
2617 | declare updating function |
2618 | cdml:delete-nodes($target as node()*) external; |
2619 | @@ -651,6 +671,8 @@ |
2620 | : @error zerr:ZDDY0012 if the order property of the collection $name is unordered. |
2621 | : @error zerr:ZDDY0011 If the collection is empty. |
2622 | : |
2623 | + : @deprecated please use the cdml:delete-first#1 function |
2624 | + : |
2625 | :) |
2626 | declare updating function |
2627 | cdml:delete-node-first($name as xs:QName) external; |
2628 | @@ -694,6 +716,8 @@ |
2629 | : @error zerr:ZDDY0012 if the order property of the collection $name is unordered. |
2630 | : @error zerr:ZDDY0011 If the collection contains less than $number nodes. |
2631 | : |
2632 | + : @deprecated please use the cdml:delete-first#2 function |
2633 | + : |
2634 | :) |
2635 | declare updating function |
2636 | cdml:delete-nodes-first($name as xs:QName, $number as xs:integer) external; |
2637 | @@ -737,6 +761,8 @@ |
2638 | : append-only, or queue. |
2639 | : @error zerr:ZDDY0012 if the order property of the collection $name is unordered. |
2640 | : @error zerr:ZDDY0011 If the collection is empty. |
2641 | + : |
2642 | + : @deprecated please use the cdml:delete-last#1 function |
2643 | :) |
2644 | declare updating function |
2645 | cdml:delete-node-last($name as xs:QName) external; |
2646 | @@ -777,6 +803,8 @@ |
2647 | : @error zerr:ZDDY0012 if the order property of the collection $name is unordered. |
2648 | : @error zerr:ZDDY0011 If the collection contains less than $number nodes. |
2649 | : |
2650 | + : @deprecated please use the cdml:delete-last#2 function |
2651 | + : |
2652 | :) |
2653 | declare updating function |
2654 | cdml:delete-nodes-last($name as xs:QName, $number as xs:integer) external; |
2655 | @@ -806,6 +834,9 @@ |
2656 | : The truncate function is an updating function that deletes the |
2657 | : entire contents of collection. |
2658 | : |
2659 | + : Please note that applying this function can not be undone in case |
2660 | + : an error happens during the application of the containing PUL. |
2661 | + : |
2662 | : @param $name The name of the collection whose content to delete |
2663 | : |
2664 | : @return The result of this function is an empty XDM instance and a pending update |
2665 | @@ -852,7 +883,7 @@ |
2666 | |
2667 | (:~ |
2668 | : The index-of function returns the position of the given item (node or |
2669 | - : json item) within its containing the collection. |
2670 | + : json item) within its containing collection. |
2671 | : |
2672 | : @param $node The item to retrieve the index for. |
2673 | : |
2674 | @@ -863,4 +894,4 @@ |
2675 | : |
2676 | :) |
2677 | declare function |
2678 | -cdml:index-of($item as item()) as xs:integer external; |
2679 | +cdml:index-of($item as item()) as xs:integer external; |
2680 | |
2681 | === modified file 'modules/com/zorba-xquery/www/modules/store/static/indexes/dml.xq' |
2682 | --- modules/com/zorba-xquery/www/modules/store/static/indexes/dml.xq 2012-04-11 20:22:52 +0000 |
2683 | +++ modules/com/zorba-xquery/www/modules/store/static/indexes/dml.xq 2012-04-27 13:22:48 +0000 |
2684 | @@ -43,7 +43,7 @@ |
2685 | module namespace idml = "http://www.zorba-xquery.com/modules/store/static/indexes/dml"; |
2686 | |
2687 | declare namespace zerr = "http://www.zorba-xquery.com/errors"; |
2688 | -declare namespace ann = "http://www.zorba-xquery.com/annotations"; |
2689 | +declare namespace an = "http://www.zorba-xquery.com/annotations"; |
2690 | |
2691 | declare namespace ver = "http://www.zorba-xquery.com/options/versioning"; |
2692 | |
2693 | @@ -80,7 +80,7 @@ |
2694 | : the sequence type specified in the corresponding keyspec. |
2695 | : |
2696 | :) |
2697 | -declare %ann:variadic function idml:probe-index-point-value( |
2698 | +declare %an:variadic function idml:probe-index-point-value( |
2699 | $name as xs:QName, |
2700 | $key_i as xs:anyAtomicType?) as node()* external; |
2701 | |
2702 | @@ -187,7 +187,7 @@ |
2703 | : lower and upper bound, neither T1 is a subtype of T2 nor T2 is a |
2704 | : subtype of T1. |
2705 | :) |
2706 | -declare %ann:variadic function idml:probe-index-range-value( |
2707 | +declare %an:variadic function idml:probe-index-range-value( |
2708 | $name as xs:QName, |
2709 | $lowerBound-i as xs:anyAtomicType?, |
2710 | $upperBound-i as xs:anyAtomicType?, |
2711 | |
2712 | === modified file 'modules/com/zorba-xquery/www/modules/xqdoc.xq' |
2713 | --- modules/com/zorba-xquery/www/modules/xqdoc.xq 2012-04-11 20:22:52 +0000 |
2714 | +++ modules/com/zorba-xquery/www/modules/xqdoc.xq 2012-04-27 13:22:48 +0000 |
2715 | @@ -61,7 +61,7 @@ |
2716 | :) |
2717 | module namespace xqd = "http://www.zorba-xquery.com/modules/xqdoc"; |
2718 | |
2719 | -declare namespace ann = "http://www.zorba-xquery.com/annotations"; |
2720 | +declare namespace an = "http://www.zorba-xquery.com/annotations"; |
2721 | declare namespace ver = "http://www.zorba-xquery.com/options/versioning"; |
2722 | |
2723 | declare namespace err = "http://www.w3.org/2005/xqt-errors"; |
2724 | @@ -80,7 +80,7 @@ |
2725 | : @error zerr::ZXQD0002 if the xqdoc comments in the |
2726 | : module contain invalid XML |
2727 | :) |
2728 | -declare %ann:nondeterministic function xqd:xqdoc( |
2729 | +declare %an:nondeterministic function xqd:xqdoc( |
2730 | $module-uri as xs:string |
2731 | ) as element() external; |
2732 | |
2733 | |
2734 | === modified file 'modules/com/zorba-xquery/www/modules/xqdoc.xsd' |
2735 | --- modules/com/zorba-xquery/www/modules/xqdoc.xsd 2012-04-11 20:22:52 +0000 |
2736 | +++ modules/com/zorba-xquery/www/modules/xqdoc.xsd 2012-04-27 13:22:48 +0000 |
2737 | @@ -141,6 +141,7 @@ |
2738 | </xsd:complexType> |
2739 | |
2740 | <xsd:complexType name="annotation"> |
2741 | + <xsd:attribute name="prefix" type="xsd:string" use="optional"/> |
2742 | <xsd:attribute name="namespace" type="xsd:string" use="optional"/> |
2743 | <xsd:attribute name="localname" type="xsd:string" use="optional"/> |
2744 | <xsd:attribute name="value" type="xsd:string" use="optional"/> |
2745 | |
2746 | === modified file 'modules/com/zorba-xquery/www/modules/xqdoc2xhtml/index.xq' |
2747 | --- modules/com/zorba-xquery/www/modules/xqdoc2xhtml/index.xq 2012-04-11 20:22:52 +0000 |
2748 | +++ modules/com/zorba-xquery/www/modules/xqdoc2xhtml/index.xq 2012-04-27 13:22:48 +0000 |
2749 | @@ -38,7 +38,7 @@ |
2750 | import schema namespace xqdoc = "http://www.xqdoc.org/1.0"; |
2751 | import schema namespace output = "http://www.w3.org/2010/xslt-xquery-serialization"; |
2752 | |
2753 | -declare namespace ann = "http://www.zorba-xquery.com/annotations"; |
2754 | +declare namespace an = "http://www.zorba-xquery.com/annotations"; |
2755 | declare namespace werr = "http://www.w3.org/2005/xqt-errors"; |
2756 | declare namespace z = "http://www.zorba-xquery.com/manifest"; |
2757 | |
2758 | @@ -125,7 +125,7 @@ |
2759 | : @param $collector the name of the collector. |
2760 | : @return empty sequence. |
2761 | :) |
2762 | -declare %private %ann:sequential function xqdoc2html:collect-schema ( |
2763 | +declare %private %an:sequential function xqdoc2html:collect-schema ( |
2764 | $schemaURI as xs:string, |
2765 | $fileName as xs:string, |
2766 | $collector) |
2767 | @@ -174,7 +174,7 @@ |
2768 | : E.g. ("cpp", "h", "xml") |
2769 | : @return The empty sequence. |
2770 | :) |
2771 | -declare %private %ann:sequential function xqdoc2html:gather-and-copy( |
2772 | +declare %private %an:sequential function xqdoc2html:gather-and-copy( |
2773 | $sourcePath as xs:string, |
2774 | $destinationPath as xs:string, |
2775 | $extensions as xs:string+) |
2776 | @@ -239,7 +239,7 @@ |
2777 | : @param $extensions The sequence of file types to copy (e.g. ("cpp", "h", "xml")). |
2778 | : @return The empty sequence. |
2779 | :) |
2780 | -declare %private %ann:sequential function xqdoc2html:copy-files( |
2781 | +declare %private %an:sequential function xqdoc2html:copy-files( |
2782 | $sourcePath as xs:string, |
2783 | $destinationPath as xs:string, |
2784 | $extensions as xs:string+) |
2785 | @@ -266,7 +266,7 @@ |
2786 | : @param $xqdocBuildPath where to generate the XQDoc XML documents. |
2787 | : @return Empty sequence. |
2788 | :) |
2789 | -declare %ann:sequential function xqdoc2html:copy-xhtml-requisites( |
2790 | +declare %an:sequential function xqdoc2html:copy-xhtml-requisites( |
2791 | $xhtmlRequisitesPath as xs:string, |
2792 | $xqdocBuildPath as xs:string) |
2793 | { |
2794 | @@ -300,7 +300,7 @@ |
2795 | |
2796 | (:_____________________________________________________________________________________________________:) |
2797 | |
2798 | -declare %private %ann:sequential function xqdoc2html:create-general-menu() |
2799 | +declare %private %an:sequential function xqdoc2html:create-general-menu() |
2800 | { |
2801 | { |
2802 | variable $allStructures := for $entry in $xqdoc2html:menuEntries/entry return $entry/@structure; |
2803 | @@ -313,7 +313,7 @@ |
2804 | } |
2805 | }; |
2806 | |
2807 | -declare %private %ann:sequential function xqdoc2html:create-collection-categories ( |
2808 | +declare %private %an:sequential function xqdoc2html:create-collection-categories ( |
2809 | $collectionName as xs:QName, |
2810 | $xqdocXmlPath as xs:string) |
2811 | { |
2812 | @@ -326,7 +326,7 @@ |
2813 | return dml:apply-insert-nodes($collectionName, $xqdoc); |
2814 | }; |
2815 | |
2816 | -declare %private %ann:sequential function xqdoc2html:collectZorbaManifestEntries( |
2817 | +declare %private %an:sequential function xqdoc2html:collectZorbaManifestEntries( |
2818 | $zorbaManifestPath as xs:string, |
2819 | $xqdocBuildPath as xs:string) |
2820 | { |
2821 | @@ -365,7 +365,7 @@ |
2822 | : @param $xhtmlRequisitesPath the path where the XHTML requisites are stored. |
2823 | : @return Empty sequence. |
2824 | :) |
2825 | -declare %ann:sequential function xqdoc2html:main( |
2826 | +declare %an:sequential function xqdoc2html:main( |
2827 | $zorbaManifestPath as xs:string, |
2828 | $xqdocBuildPath as xs:string, |
2829 | $indexHtmlPath as xs:string, |
2830 | @@ -474,7 +474,7 @@ |
2831 | </html> |
2832 | }; |
2833 | |
2834 | -declare %private %ann:sequential function xqdoc2html:copy-schemas( |
2835 | +declare %private %an:sequential function xqdoc2html:copy-schemas( |
2836 | $schemas, |
2837 | $xqdocXhtmlPath as xs:string |
2838 | ) |
2839 | @@ -510,7 +510,7 @@ |
2840 | : @param $zorbaPath path to zorba source dir |
2841 | : @return A string sequence with a status message for each processed module. |
2842 | :) |
2843 | -declare %private %ann:sequential function xqdoc2html:generate-xqdoc-xhtml( |
2844 | +declare %private %an:sequential function xqdoc2html:generate-xqdoc-xhtml( |
2845 | $generalLeftMenu, |
2846 | $xhtmlRequisitesPath as xs:string, |
2847 | $xqdocXhtmlPath as xs:string |
2848 | @@ -598,7 +598,7 @@ |
2849 | : @param $xqdocXhtmlPath where to generate the XQDoc XHTML documents. |
2850 | : @return the processed $xhtml. |
2851 | :) |
2852 | -declare %private %ann:sequential function xqdoc2html:configure-xml ( |
2853 | +declare %private %an:sequential function xqdoc2html:configure-xml ( |
2854 | $xqdoc, |
2855 | $examplePath as xs:string, |
2856 | $xqdocXhtmlPath as xs:string) |
2857 | @@ -624,7 +624,7 @@ |
2858 | : @param $examplePath string with the paths where the examples are kept separated by ; . |
2859 | : @return The created XHTML page. |
2860 | :) |
2861 | -declare %private %ann:sequential function xqdoc2html:copy-examples( |
2862 | +declare %private %an:sequential function xqdoc2html:copy-examples( |
2863 | $xqdoc, |
2864 | $examplesFolderDestination as xs:string, |
2865 | $examplePath as xs:string) |
2866 | @@ -665,7 +665,7 @@ |
2867 | : separated by <pre>;</pre>. |
2868 | : @return The full path of the file to be resolved. |
2869 | :) |
2870 | -declare %private %ann:nondeterministic function xqdoc2html:resolve-file-path( |
2871 | +declare %private %an:nondeterministic function xqdoc2html:resolve-file-path( |
2872 | $relativeFilePath as xs:string, |
2873 | $directoryPath as xs:string |
2874 | ) as xs:string |
2875 | @@ -683,7 +683,7 @@ |
2876 | fn:error($err:UE010, fn:concat("The path <", $directoryPath, "> must point to an existing directory:")) |
2877 | }; |
2878 | |
2879 | -declare %private %ann:sequential function xqdoc2html:copy-example( |
2880 | +declare %private %an:sequential function xqdoc2html:copy-example( |
2881 | $exampleSource as xs:string, |
2882 | $exampleDestination as xs:string, |
2883 | $examplePath as xs:string) |
2884 | @@ -827,7 +827,7 @@ |
2885 | } |
2886 | }; |
2887 | |
2888 | -declare %private %ann:sequential function xqdoc2html:parse-spec-args( |
2889 | +declare %private %an:sequential function xqdoc2html:parse-spec-args( |
2890 | $exampleSource as xs:string, |
2891 | $specLines as xs:string*) as xs:string |
2892 | { |
2893 | @@ -868,7 +868,7 @@ |
2894 | |
2895 | }; |
2896 | |
2897 | -declare %private %ann:sequential function xqdoc2html:load-expected-results( |
2898 | +declare %private %an:sequential function xqdoc2html:load-expected-results( |
2899 | $result_split as xs:string*) as xs:string |
2900 | { |
2901 | if(fn:empty($result_split)) then |
2902 | @@ -889,7 +889,7 @@ |
2903 | xqdoc2html:load-expected-results(fn:subsequence($result_split, 2))) |
2904 | }; |
2905 | |
2906 | -declare %private %ann:sequential function xqdoc2html:parse-spec-results( |
2907 | +declare %private %an:sequential function xqdoc2html:parse-spec-results( |
2908 | $exampleSource as xs:string, |
2909 | $specLines as xs:string*) as xs:string |
2910 | { |
2911 | @@ -966,7 +966,7 @@ |
2912 | else ()} |
2913 | {if(contains($type, "nondeterministic ")) then |
2914 | <a href="{$ZorbaOptAndAnn}" |
2915 | - title="%ann:nondeterministic" |
2916 | + title="%an:nondeterministic" |
2917 | target="_blank"><img src="{concat($imagesPath, "Nondeterministic.gif")}" alt="Nondeterministic"/></a> |
2918 | else ()} |
2919 | {if(contains($type, "variadic")) then |
2920 | @@ -1001,7 +1001,7 @@ |
2921 | : @param $examplePath string with the paths where the examples are kept separated by ; . |
2922 | : @return The created XHTML page. |
2923 | :) |
2924 | -declare %private %ann:sequential function xqdoc2html:add-left-menu( |
2925 | +declare %private %an:sequential function xqdoc2html:add-left-menu( |
2926 | $menu, |
2927 | $templatePath as xs:string) { |
2928 | let $doc := fn:parse-xml(file:read-text($templatePath)) |
2929 | @@ -1023,7 +1023,7 @@ |
2930 | : @param $examplePath string with the paths where the examples are kept separated by ; . |
2931 | : @return The created XHTML page. |
2932 | :) |
2933 | -declare %private %ann:sequential function xqdoc2html:doc( |
2934 | +declare %private %an:sequential function xqdoc2html:doc( |
2935 | $xqdoc, |
2936 | $menu, |
2937 | $templatePath as xs:string, |
2938 | @@ -1068,7 +1068,7 @@ |
2939 | : @param $xqdocXhtmlPath location where the resulting Xhtml will be saved on disk. |
2940 | : @return The 'body' of the XHTML. |
2941 | :) |
2942 | -declare %private %ann:nondeterministic function xqdoc2html:body( |
2943 | +declare %private %an:nondeterministic function xqdoc2html:body( |
2944 | $xqdoc, |
2945 | $xqdocXhtmlPath as xs:string) |
2946 | { |
2947 | @@ -1181,7 +1181,7 @@ |
2948 | : @param $indexCollector the modules names part of the left menu. |
2949 | : @return the XHTML for the 'Module Resources'. |
2950 | :) |
2951 | -declare %private %ann:nondeterministic function xqdoc2html:module-resources( |
2952 | +declare %private %an:nondeterministic function xqdoc2html:module-resources( |
2953 | $xqdocXhtmlPath as xs:string, |
2954 | $moduleUri as xs:string) |
2955 | { |
2956 | @@ -1321,14 +1321,14 @@ |
2957 | let $name := $variable/xqdoc:uri/text() |
2958 | let $type := $variable/xqdoc:comment/xqdoc:custom[@tag="type"]/text() |
2959 | let $isExternal := $variable/xqdoc:comment/xqdoc:custom[@tag="isExternal"]/text() |
2960 | - let $ann := string-join((for $annotation in $variable/xqdoc:annotations/xqdoc:annotation |
2961 | + let $an := string-join((for $annotation in $variable/xqdoc:annotations/xqdoc:annotation |
2962 | return data($annotation/@localname), |
2963 | if($isExternal) then "external" else ""," ")," ") |
2964 | |
2965 | where (count($variable/xqdoc:annotations/xqdoc:annotation[@localname="private"]) = 0) |
2966 | order by $name |
2967 | return (<tr> |
2968 | - <td>{xqdoc2html:add-images($ann)}</td> |
2969 | + <td>{xqdoc2html:add-images($an)}</td> |
2970 | <td>${$name} |
2971 | {if(exists($type)) then concat(" as ",$type) else ""} |
2972 | {if(exists($isExternal)) then " external" else ()}<br/> |
2973 | @@ -1464,7 +1464,7 @@ |
2974 | : @param $xqdocXhtmlPath location where the resulting Xhtml will be saved on disk. |
2975 | : @return the XHTML for the function details. |
2976 | :) |
2977 | -declare %private %ann:nondeterministic function xqdoc2html:functions($functions, $xqdocXhtmlPath) { |
2978 | +declare %private %an:nondeterministic function xqdoc2html:functions($functions, $xqdocXhtmlPath) { |
2979 | if(count($functions)) then ( |
2980 | <div class="section"><span id="functions">Functions</span></div>, |
2981 | for $function in $functions |
2982 | @@ -1682,7 +1682,7 @@ |
2983 | : @param $xqdocXhtmlPath location where the resulting Xhtml will be saved on disk. |
2984 | : @return the XHTML for the function 'example' annotations. |
2985 | :) |
2986 | -declare %private %ann:nondeterministic function xqdoc2html:annotations-example($comment, $xqdocXhtmlPath) { |
2987 | +declare %private %an:nondeterministic function xqdoc2html:annotations-example($comment, $xqdocXhtmlPath) { |
2988 | let $example := $comment//xqdoc:custom[@tag="example"] |
2989 | return |
2990 | if (count($example) = 0) then () |
2991 | @@ -1784,7 +1784,7 @@ |
2992 | : @param $templatePath the path to the main.html template. |
2993 | : @return The content of the function index page. |
2994 | :) |
2995 | -declare %private %ann:sequential function xqdoc2html:generate-function-index-xhtml( |
2996 | +declare %private %an:sequential function xqdoc2html:generate-function-index-xhtml( |
2997 | $indexFunctionLeft, |
2998 | $templatePath as xs:string, |
2999 | $functionIndexPath as xs:string |
3000 | @@ -1815,7 +1815,7 @@ |
3001 | } |
3002 | }; |
3003 | |
3004 | -declare %private %ann:sequential function xqdoc2html:collect-entry ( |
3005 | +declare %private %an:sequential function xqdoc2html:collect-entry ( |
3006 | $href as xs:string, |
3007 | $name as xs:string, |
3008 | $structure as xs:string, |
3009 | @@ -1829,7 +1829,7 @@ |
3010 | moduleURI="{$moduleURI}" /> as last into $xqdoc2html:menuEntries; |
3011 | }; |
3012 | |
3013 | -declare %private %ann:sequential function xqdoc2html:collect-menu-entries() |
3014 | +declare %private %an:sequential function xqdoc2html:collect-menu-entries() |
3015 | { |
3016 | for $docNode in dml:collection(xs:QName("xqdoc2html:collection")) |
3017 | let $module := $docNode/xqdoc:xqdoc/xqdoc:module, |
3018 | @@ -1859,7 +1859,7 @@ |
3019 | : @param $moduleUri module URI. |
3020 | : @return $table after the subcategory together with the modules were added to it. |
3021 | :) |
3022 | -declare %private %ann:sequential function xqdoc2html:create-module-helper( |
3023 | +declare %private %an:sequential function xqdoc2html:create-module-helper( |
3024 | $table, |
3025 | $category as xs:string, |
3026 | $currentCategory as xs:string |
3027 | @@ -1910,7 +1910,7 @@ |
3028 | (:~ |
3029 | : Recursive helper |
3030 | :) |
3031 | -declare %private %ann:sequential function xqdoc2html:create-module-table-rec( |
3032 | +declare %private %an:sequential function xqdoc2html:create-module-table-rec( |
3033 | $level1 as xs:string*, |
3034 | $leveln as xs:string*, |
3035 | $curentCat as xs:string, |
3036 | @@ -1956,7 +1956,7 @@ |
3037 | : @param $moduleUri module URI. |
3038 | : @return $root after the subcategories were added to it. |
3039 | :) |
3040 | -declare %private %ann:sequential function xqdoc2html:create-module-table( |
3041 | +declare %private %an:sequential function xqdoc2html:create-module-table( |
3042 | $level1 as xs:string*, |
3043 | $root) |
3044 | { |
3045 | @@ -1986,7 +1986,7 @@ |
3046 | }; |
3047 | |
3048 | (: |
3049 | -declare %private %ann:sequential function xqdoc2html:create-specialized-left-menu( |
3050 | +declare %private %an:sequential function xqdoc2html:create-specialized-left-menu( |
3051 | $generalLeftMenu, |
3052 | $moduleUri as xs:string) |
3053 | { |
3054 | @@ -2030,7 +2030,7 @@ |
3055 | : @param $zorbaVersion Zorba version. |
3056 | : @return The content of the new index.html. |
3057 | :) |
3058 | -declare %private %ann:sequential function xqdoc2html:generate-index-html( |
3059 | +declare %private %an:sequential function xqdoc2html:generate-index-html( |
3060 | $templatePath as xs:string, |
3061 | $menu, |
3062 | $modules, |
3063 | |
3064 | === modified file 'modules/org/expath/ns/file.xq' |
3065 | --- modules/org/expath/ns/file.xq 2012-04-11 20:22:52 +0000 |
3066 | +++ modules/org/expath/ns/file.xq 2012-04-27 13:22:48 +0000 |
3067 | @@ -24,7 +24,7 @@ |
3068 | module namespace file = "http://expath.org/ns/file"; |
3069 | |
3070 | import schema namespace output = "http://www.w3.org/2010/xslt-xquery-serialization"; |
3071 | -declare namespace ann = "http://www.zorba-xquery.com/annotations"; |
3072 | +declare namespace an = "http://www.zorba-xquery.com/annotations"; |
3073 | declare namespace ver = "http://www.zorba-xquery.com/options/versioning"; |
3074 | declare option ver:module-version "2.0"; |
3075 | |
3076 | @@ -46,7 +46,7 @@ |
3077 | : @error file:FOFL0004 If <pre>$file</pre> points to a directory. |
3078 | : @error file:FOFL9999 If any other error occurs. |
3079 | :) |
3080 | -declare %ann:sequential function file:append( |
3081 | +declare %an:sequential function file:append( |
3082 | $file as xs:string, |
3083 | $content as item()*, |
3084 | $serializer-params as element(output:serialization-parameters)? |
3085 | @@ -67,7 +67,7 @@ |
3086 | : @error file:FOFL0004 If <pre>$file</pre> points to a directory. |
3087 | : @error file:FOFL9999 If any other error occurs. |
3088 | :) |
3089 | -declare %ann:sequential function file:append-binary( |
3090 | +declare %an:sequential function file:append-binary( |
3091 | $file as xs:string, |
3092 | $content as xs:base64Binary* |
3093 | ) as empty-sequence() external; |
3094 | @@ -81,7 +81,7 @@ |
3095 | : @error file:FOFL0004 If <pre>$file</pre> points to a directory. |
3096 | : @error file:FOFL9999 If any other error occurs. |
3097 | :) |
3098 | -declare %private %ann:sequential function file:append-text( |
3099 | +declare %private %an:sequential function file:append-text( |
3100 | $file as xs:string, |
3101 | $content as xs:string* |
3102 | ) as empty-sequence() external; |
3103 | @@ -99,7 +99,7 @@ |
3104 | : parent directory does not exist either. |
3105 | : @error file:FOFL9999 If any other error occurs. |
3106 | :) |
3107 | -declare %ann:nondeterministic %ann:sequential function file:copy( |
3108 | +declare %an:nondeterministic %an:sequential function file:copy( |
3109 | $source as xs:string, |
3110 | $destination as xs:string |
3111 | ) as empty-sequence() |
3112 | @@ -126,7 +126,7 @@ |
3113 | : @error file:FOFL0004 If <pre>$sourceFile</pre> points to a directory. |
3114 | : @error file:FOFL9999 If any other error occurs. |
3115 | :) |
3116 | -declare %private %ann:sequential function file:copy-file-impl( |
3117 | +declare %private %an:sequential function file:copy-file-impl( |
3118 | $sourceFile as xs:string, |
3119 | $destination as xs:string |
3120 | ) as empty-sequence() external; |
3121 | @@ -143,7 +143,7 @@ |
3122 | : parent directory does not exist either. |
3123 | : @error file:FOFL9999 If any other error occurs. |
3124 | :) |
3125 | -declare %private %ann:nondeterministic %ann:sequential function file:copy-directory-impl( |
3126 | +declare %private %an:nondeterministic %an:sequential function file:copy-directory-impl( |
3127 | $sourceDir as xs:string, |
3128 | $destination as xs:string |
3129 | ) as empty-sequence() |
3130 | @@ -182,7 +182,7 @@ |
3131 | : @error file:FOFL0003 If <pre>$destination</pre> directory does not exist. |
3132 | : @error file:FOFL9999 If any other error occurs. |
3133 | :) |
3134 | -declare %private %ann:nondeterministic %ann:sequential function file:copy-directory-content( |
3135 | +declare %private %an:nondeterministic %an:sequential function file:copy-directory-content( |
3136 | $sourceDir as xs:string, |
3137 | $destination as xs:string |
3138 | ) as empty-sequence() |
3139 | @@ -208,7 +208,7 @@ |
3140 | : existing file. |
3141 | : @error file:FOFL9999 If any other error occurs. |
3142 | :) |
3143 | -declare %ann:sequential function file:create-directory( |
3144 | +declare %an:sequential function file:create-directory( |
3145 | $dir as xs:string |
3146 | ) as empty-sequence() external; |
3147 | |
3148 | @@ -223,7 +223,7 @@ |
3149 | : @error file:FOFL0001 If the <pre>$path</pre> path does not exist. |
3150 | : @error file:FOFL9999 If any other error occurs. |
3151 | :) |
3152 | -declare %ann:nondeterministic %ann:sequential function file:delete( |
3153 | +declare %an:nondeterministic %an:sequential function file:delete( |
3154 | $path as xs:string |
3155 | ) as empty-sequence() |
3156 | { |
3157 | @@ -244,7 +244,7 @@ |
3158 | : @error file:FOFL0001 If the <pre>$file</pre> path does not exist. |
3159 | : @error file:FOFL9999 If any other error occurs. |
3160 | :) |
3161 | -declare %private %ann:sequential function file:delete-file-impl( |
3162 | +declare %private %an:sequential function file:delete-file-impl( |
3163 | $file as xs:string |
3164 | ) as empty-sequence() external; |
3165 | |
3166 | @@ -257,7 +257,7 @@ |
3167 | : @error file:FOFL0003 If <pre>$dir</pre> does not point to a directory. |
3168 | : @error file:FOFL9999 If any other error occurs. |
3169 | :) |
3170 | -declare %private %ann:nondeterministic %ann:sequential function file:delete-directory-impl( |
3171 | +declare %private %an:nondeterministic %an:sequential function file:delete-directory-impl( |
3172 | $dir as xs:string |
3173 | ) as empty-sequence() |
3174 | { |
3175 | @@ -278,7 +278,7 @@ |
3176 | : @param $path The path/URI to test for existence. |
3177 | : @return true if the path/URI points to an existing file system item. |
3178 | :) |
3179 | -declare %ann:nondeterministic function file:exists( |
3180 | +declare %an:nondeterministic function file:exists( |
3181 | $path as xs:string |
3182 | ) as xs:boolean external; |
3183 | |
3184 | @@ -289,7 +289,7 @@ |
3185 | : @param $dir The path/URI to test. |
3186 | : @return true if the path/URI points to a directory. |
3187 | :) |
3188 | -declare %ann:nondeterministic function file:is-directory( |
3189 | +declare %an:nondeterministic function file:is-directory( |
3190 | $dir as xs:string |
3191 | ) as xs:boolean external; |
3192 | |
3193 | @@ -299,7 +299,7 @@ |
3194 | : @param $dir The path/URI to test. |
3195 | : @return true if the path/URI points to a file. |
3196 | :) |
3197 | -declare %ann:nondeterministic function file:is-file( |
3198 | +declare %an:nondeterministic function file:is-file( |
3199 | $file as xs:string |
3200 | ) as xs:boolean external; |
3201 | |
3202 | @@ -316,7 +316,7 @@ |
3203 | : directory does not exist either. |
3204 | : @error file:FOFL9999 If any other error occurs. |
3205 | :) |
3206 | -declare %ann:sequential function file:move( |
3207 | +declare %an:sequential function file:move( |
3208 | $source as xs:string, |
3209 | $destination as xs:string |
3210 | ) as empty-sequence() |
3211 | @@ -335,7 +335,7 @@ |
3212 | : @error file:FOFL0004 If <pre>$source</pre> points to a directory. |
3213 | : @error file:FOFL9999 If any other error occurs. |
3214 | :) |
3215 | -declare %ann:nondeterministic function file:read-binary( |
3216 | +declare %an:nondeterministic function file:read-binary( |
3217 | $file as xs:string |
3218 | ) as xs:base64Binary external; |
3219 | |
3220 | @@ -352,7 +352,7 @@ |
3221 | : @error file:FOFL0004 If <pre>$source</pre> points to a directory. |
3222 | : @error file:FOFL9999 If any other error occurs. |
3223 | :) |
3224 | -declare %ann:nondeterministic function file:read-text( |
3225 | +declare %an:nondeterministic function file:read-text( |
3226 | $file as xs:string |
3227 | ) as xs:string |
3228 | { |
3229 | @@ -374,7 +374,7 @@ |
3230 | : @error file:FOFL0006 If <pre>$encoding</pre> is not supported. |
3231 | : @error file:FOFL9999 If any other error occurs. |
3232 | :) |
3233 | -declare %ann:nondeterministic function file:read-text( |
3234 | +declare %an:nondeterministic function file:read-text( |
3235 | $file as xs:string, |
3236 | $encoding as xs:string |
3237 | ) as xs:string external; |
3238 | @@ -392,7 +392,7 @@ |
3239 | : @error file:FOFL0004 If <pre>$source</pre> points to a directory. |
3240 | : @error file:FOFL9999 If any other error occurs. |
3241 | :) |
3242 | -declare %ann:nondeterministic function file:read-text-lines( |
3243 | +declare %an:nondeterministic function file:read-text-lines( |
3244 | $file as xs:string |
3245 | ) as xs:string* |
3246 | { |
3247 | @@ -419,14 +419,10 @@ |
3248 | : @error file:FOFL0006 If <pre>$encoding</pre> is not supported. |
3249 | : @error file:FOFL9999 If any other error occurs. |
3250 | :) |
3251 | -declare %ann:nondeterministic function file:read-text-lines( |
3252 | +declare %an:nondeterministic function file:read-text-lines( |
3253 | $file as xs:string, |
3254 | $encoding as xs:string |
3255 | -) as xs:string* |
3256 | -{ |
3257 | - let $content := file:read-text($file, $encoding) |
3258 | - return fn:tokenize($content, "\n") |
3259 | -}; |
3260 | +) as xs:string* external; |
3261 | |
3262 | (:~ |
3263 | : This is an internal function that copies an entire source directory to an |
3264 | @@ -437,7 +433,7 @@ |
3265 | : @param $destinationDir The existing destination directory. |
3266 | : @return The empty sequence. |
3267 | :) |
3268 | -declare %private %ann:nondeterministic %ann:sequential function file:copy-directory( |
3269 | +declare %private %an:nondeterministic %an:sequential function file:copy-directory( |
3270 | $sourceDir as xs:string, |
3271 | $destinationDir as xs:string |
3272 | ) as empty-sequence() |
3273 | @@ -476,7 +472,7 @@ |
3274 | : @error file:FOFL0004 If <pre>$file</pre> points to a directory. |
3275 | : @error file:FOFL9999 If any other error occurs. |
3276 | :) |
3277 | -declare %ann:sequential function file:write( |
3278 | +declare %an:sequential function file:write( |
3279 | $file as xs:string, |
3280 | $content as item()*, |
3281 | $serializer-params as element(output:serialization-parameters)? |
3282 | @@ -497,7 +493,7 @@ |
3283 | : @error file:FOFL0004 If <pre>$file</pre> points to a directory. |
3284 | : @error file:FOFL9999 If any other error occurs. |
3285 | :) |
3286 | -declare %ann:sequential function file:write-binary( |
3287 | +declare %an:sequential function file:write-binary( |
3288 | $file as xs:string, |
3289 | $content as xs:base64Binary* |
3290 | ) as empty-sequence() external; |
3291 | @@ -511,7 +507,7 @@ |
3292 | : @error file:FOFL0004 If <pre>$file</pre> points to a directory. |
3293 | : @error file:FOFL9999 If any other error occurs. |
3294 | :) |
3295 | -declare %ann:sequential function file:write-binary( |
3296 | +declare %an:sequential function file:write-binary( |
3297 | $file as xs:string, |
3298 | $content as xs:base64Binary* |
3299 | ) as empty-sequence() external; |
3300 | @@ -528,7 +524,7 @@ |
3301 | : @error file:FOFL0004 If <pre>$file</pre> points to a directory. |
3302 | : @error file:FOFL9999 If any other error occurs. |
3303 | :) |
3304 | -declare %private %ann:sequential function file:write-text( |
3305 | +declare %private %an:sequential function file:write-text( |
3306 | $file as xs:string, |
3307 | $content as xs:string* |
3308 | ) as empty-sequence() external; |
3309 | @@ -544,7 +540,7 @@ |
3310 | : @error file:FOFL0003 If <pre>$dir</pre> does not point to an existing directory. |
3311 | : @error file:FOFL9999 If any other error occurs. |
3312 | :) |
3313 | -declare %ann:nondeterministic function file:list( |
3314 | +declare %an:nondeterministic function file:list( |
3315 | $dir as xs:string |
3316 | ) as xs:string* external; |
3317 | |
3318 | @@ -563,7 +559,7 @@ |
3319 | : @error file:FOFL0003 If <pre>$dir</pre> does not point to an existing directory. |
3320 | : @error file:FOFL9999 If any other error occurs. |
3321 | :) |
3322 | -declare %ann:nondeterministic function file:list( |
3323 | +declare %an:nondeterministic function file:list( |
3324 | $path as xs:string, |
3325 | $recursive as xs:boolean |
3326 | ) as xs:string* |
3327 | @@ -600,7 +596,7 @@ |
3328 | : @error file:FOFL0003 If <pre>$dir</pre> does not point to an existing directory. |
3329 | : @error file:FOFL9999 If any other error occurs. |
3330 | :) |
3331 | -declare %ann:nondeterministic function file:list( |
3332 | +declare %an:nondeterministic function file:list( |
3333 | $path as xs:string, |
3334 | $recursive as xs:boolean, |
3335 | $pattern as xs:string |
3336 | @@ -641,7 +637,7 @@ |
3337 | : @error file:FOFL0001 If the <pre>$path</pre> does not exist. |
3338 | : @error file:FOFL9999 If any other error occurs. |
3339 | :) |
3340 | -declare %ann:nondeterministic function file:last-modified( |
3341 | +declare %an:nondeterministic function file:last-modified( |
3342 | $path as xs:string |
3343 | ) as xs:dateTime external; |
3344 | |
3345 | @@ -654,7 +650,7 @@ |
3346 | : @error file:FOFL0004 If the <pre>$file</pre> points to a directory. |
3347 | : @error file:FOFL9999 If any other error occurs. |
3348 | :) |
3349 | -declare %ann:nondeterministic function file:size( |
3350 | +declare %an:nondeterministic function file:size( |
3351 | $file as xs:string |
3352 | ) as xs:integer external; |
3353 | |
3354 | |
3355 | === modified file 'modules/org/expath/ns/file.xq.src/file.cpp' |
3356 | --- modules/org/expath/ns/file.xq.src/file.cpp 2012-04-11 20:22:52 +0000 |
3357 | +++ modules/org/expath/ns/file.xq.src/file.cpp 2012-04-27 13:22:48 +0000 |
3358 | @@ -223,6 +223,124 @@ |
3359 | |
3360 | //***************************************************************************** |
3361 | |
3362 | +ReadTextLinesFunction::ReadTextLinesFunction(const FileModule* aModule) |
3363 | + : FileFunction(aModule) |
3364 | +{ |
3365 | +} |
3366 | + |
3367 | +ItemSequence_t |
3368 | +ReadTextLinesFunction::evaluate( |
3369 | + const ExternalFunction::Arguments_t& aArgs, |
3370 | + const StaticContext* aSctxCtx, |
3371 | + const DynamicContext* aDynCtx) const |
3372 | +{ |
3373 | + String lFileStr = getFilePathString(aArgs, 0); |
3374 | + File_t lFile = File::createFile(lFileStr.c_str()); |
3375 | + String lEncoding("UTF-8"); |
3376 | + |
3377 | + // preconditions |
3378 | + if (!lFile->exists()) { |
3379 | + raiseFileError("FOFL0001", "A file does not exist at this path", lFile->getFilePath()); |
3380 | + } |
3381 | + if (lFile->isDirectory()) { |
3382 | + raiseFileError("FOFL0004", "The given path points to a directory", lFile->getFilePath()); |
3383 | + } |
3384 | + |
3385 | + lEncoding = getEncodingArg(aArgs, 1); |
3386 | + |
3387 | + return ItemSequence_t(new LinesItemSequence(lFile, lEncoding, this)); |
3388 | +} |
3389 | + |
3390 | +ReadTextLinesFunction::LinesItemSequence::LinesItemSequence( |
3391 | + const File_t& aFile, |
3392 | + const String& aEncoding, |
3393 | + const ReadTextLinesFunction* aFunc) |
3394 | + : theFile(aFile), |
3395 | + theEncoding(aEncoding), |
3396 | + theFunc(aFunc) |
3397 | +{ |
3398 | +} |
3399 | + |
3400 | +Iterator_t |
3401 | +ReadTextLinesFunction::LinesItemSequence::getIterator() |
3402 | +{ |
3403 | + return new ReadTextLinesFunction::LinesItemSequence::LinesIterator( |
3404 | + theFile, theEncoding, theFunc |
3405 | + ); |
3406 | +} |
3407 | + |
3408 | +ReadTextLinesFunction::LinesItemSequence::LinesIterator::LinesIterator( |
3409 | + const File_t& aFile, |
3410 | + const String& aEncoding, |
3411 | + const ReadTextLinesFunction* aFunc) |
3412 | + : theFile(aFile), |
3413 | + theEncoding(aEncoding), |
3414 | + theFunc(aFunc), |
3415 | + theStream(0) |
3416 | +{ |
3417 | +} |
3418 | + |
3419 | +ReadTextLinesFunction::LinesItemSequence::LinesIterator::~LinesIterator() |
3420 | +{ |
3421 | + delete theStream; |
3422 | +} |
3423 | + |
3424 | +void |
3425 | +ReadTextLinesFunction::LinesItemSequence::LinesIterator::open() |
3426 | +{ |
3427 | + if ( transcode::is_necessary( theEncoding.c_str() ) ) |
3428 | + { |
3429 | + try |
3430 | + { |
3431 | + theStream = new transcode::stream<std::ifstream>(theEncoding.c_str()); |
3432 | + } |
3433 | + catch (std::invalid_argument const& e) |
3434 | + { |
3435 | + theFunc->raiseFileError("FOFL0006", "Unsupported encoding", theEncoding.c_str()); |
3436 | + } |
3437 | + } |
3438 | + else |
3439 | + { |
3440 | + theStream = new std::ifstream(); |
3441 | + } |
3442 | + theFile->openInputStream(*theStream, false, true); |
3443 | +} |
3444 | + |
3445 | +bool |
3446 | +ReadTextLinesFunction::LinesItemSequence::LinesIterator::next(Item& aRes) |
3447 | +{ |
3448 | + if (!theStream || !theStream->good()) |
3449 | + return false; |
3450 | + |
3451 | + std::string lStr; |
3452 | + getline(*theStream, lStr); |
3453 | + |
3454 | + if (theStream->bad()) |
3455 | + { |
3456 | + return false; |
3457 | + } |
3458 | + else |
3459 | + { |
3460 | + aRes = theFunc->theModule->getItemFactory()->createString(lStr); |
3461 | + return true; |
3462 | + } |
3463 | +} |
3464 | + |
3465 | +void |
3466 | +ReadTextLinesFunction::LinesItemSequence::LinesIterator::close() |
3467 | +{ |
3468 | + delete theStream; |
3469 | + theStream = 0; |
3470 | +} |
3471 | + |
3472 | +bool |
3473 | +ReadTextLinesFunction::LinesItemSequence::LinesIterator::isOpen() const |
3474 | +{ |
3475 | + return theStream != 0; |
3476 | +} |
3477 | + |
3478 | +//***************************************************************************** |
3479 | + |
3480 | ExistsFunction::ExistsFunction(const FileModule* aModule) |
3481 | : FileFunction(aModule) |
3482 | { |
3483 | |
3484 | === modified file 'modules/org/expath/ns/file.xq.src/file.h' |
3485 | --- modules/org/expath/ns/file.xq.src/file.h 2012-04-11 20:22:52 +0000 |
3486 | +++ modules/org/expath/ns/file.xq.src/file.h 2012-04-27 13:22:48 +0000 |
3487 | @@ -316,6 +316,70 @@ |
3488 | |
3489 | //***************************************************************************** |
3490 | |
3491 | + class ReadTextLinesFunction : public FileFunction |
3492 | + { |
3493 | + public: |
3494 | + ReadTextLinesFunction(const FileModule* aModule); |
3495 | + |
3496 | + virtual String |
3497 | + getLocalName() const { return "read-text-lines"; } |
3498 | + |
3499 | + virtual ItemSequence_t |
3500 | + evaluate(const ExternalFunction::Arguments_t& args, |
3501 | + const StaticContext* aSctxCtx, |
3502 | + const DynamicContext* aDynCtx) const; |
3503 | + |
3504 | + protected: |
3505 | + class LinesItemSequence : public ItemSequence |
3506 | + { |
3507 | + protected: |
3508 | + File_t theFile; |
3509 | + String theEncoding; |
3510 | + const ReadTextLinesFunction* theFunc; |
3511 | + |
3512 | + class LinesIterator : public Iterator |
3513 | + { |
3514 | + protected: |
3515 | + const File_t& theFile; |
3516 | + const String& theEncoding; |
3517 | + const ReadTextLinesFunction* theFunc; |
3518 | + |
3519 | + std::ifstream* theStream; |
3520 | + |
3521 | + public: |
3522 | + LinesIterator( |
3523 | + const File_t&, |
3524 | + const String&, |
3525 | + const ReadTextLinesFunction*); |
3526 | + |
3527 | + virtual ~LinesIterator(); |
3528 | + |
3529 | + virtual void |
3530 | + open(); |
3531 | + |
3532 | + virtual bool |
3533 | + next(Item&); |
3534 | + |
3535 | + virtual void |
3536 | + close(); |
3537 | + |
3538 | + virtual bool |
3539 | + isOpen() const; |
3540 | + }; |
3541 | + |
3542 | + public: |
3543 | + LinesItemSequence( |
3544 | + const File_t& aFile, |
3545 | + const String& aEncoding, |
3546 | + const ReadTextLinesFunction*); |
3547 | + |
3548 | + Iterator_t |
3549 | + getIterator(); |
3550 | + }; |
3551 | + }; |
3552 | + |
3553 | +//***************************************************************************** |
3554 | + |
3555 | class WriteTextFunction : public WriterFileFunction |
3556 | { |
3557 | public: |
3558 | |
3559 | === modified file 'modules/org/expath/ns/file.xq.src/file_module.cpp' |
3560 | --- modules/org/expath/ns/file.xq.src/file_module.cpp 2012-04-11 20:22:52 +0000 |
3561 | +++ modules/org/expath/ns/file.xq.src/file_module.cpp 2012-04-27 13:22:48 +0000 |
3562 | @@ -46,6 +46,8 @@ |
3563 | lFunc = new ReadBinaryFunction(this); |
3564 | } else if (aLocalname == "read-text") { |
3565 | lFunc = new ReadTextFunction(this); |
3566 | + } else if (aLocalname == "read-text-lines") { |
3567 | + lFunc = new ReadTextLinesFunction(this); |
3568 | } else if (aLocalname == "exists") { |
3569 | lFunc = new ExistsFunction(this); |
3570 | } else if (aLocalname == "is-directory") { |
3571 | |
3572 | === modified file 'modules/org/jsoniq/www/functions.xq' |
3573 | --- modules/org/jsoniq/www/functions.xq 2012-03-23 21:17:48 +0000 |
3574 | +++ modules/org/jsoniq/www/functions.xq 2012-04-27 13:22:48 +0000 |
3575 | @@ -1,3 +1,22 @@ |
3576 | +xquery version "1.0"; |
3577 | + |
3578 | +(: |
3579 | + : Copyright 2006-2012 The FLWOR Foundation. |
3580 | + : |
3581 | + : Licensed under the Apache License, Version 2.0 (the "License"); |
3582 | + : you may not use this file except in compliance with the License. |
3583 | + : You may obtain a copy of the License at |
3584 | + : |
3585 | + : http://www.apache.org/licenses/LICENSE-2.0 |
3586 | + : |
3587 | + : Unless required by applicable law or agreed to in writing, software |
3588 | + : distributed under the License is distributed on an "AS IS" BASIS, |
3589 | + : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
3590 | + : See the License for the specific language governing permissions and |
3591 | + : limitations under the License. |
3592 | +:) |
3593 | + |
3594 | + |
3595 | (:~ |
3596 | : This module provides the functions defined by the JSONiq specification, |
3597 | : sections 1.7 (Functions) and 1.10 (Update Primitives). JSONiq extends |
3598 | @@ -8,7 +27,9 @@ |
3599 | : for details. |
3600 | : |
3601 | : This module depends on having the JSONiq feature enabled in Zorba, |
3602 | - : ie, Zorba must be compiled with ZORBA_WITH_JSON. |
3603 | + : i.e., Zorba must be compiled with ZORBA_WITH_JSON. |
3604 | + : |
3605 | + : @author Markos Zaharioudakis, Matthias Brantner |
3606 | :) |
3607 | module namespace jn = "http://www.jsoniq.org/functions"; |
3608 | |
3609 | |
3610 | === modified file 'modules/org/jsoniq/www/pregenerated/errors.xq' |
3611 | --- modules/org/jsoniq/www/pregenerated/errors.xq 2012-04-03 04:05:17 +0000 |
3612 | +++ modules/org/jsoniq/www/pregenerated/errors.xq 2012-04-27 13:22:48 +0000 |
3613 | @@ -81,6 +81,7 @@ |
3614 | declare variable $jerr:JNTY0007 as xs:QName := fn:QName($jerr:NS, "jerr:JNTY0007"); |
3615 | |
3616 | (:~ |
3617 | + :error raised by node constructor or updating expression indicating that a JSON item cannot appear in the corresponding content sequence |
3618 | :) |
3619 | declare variable $jerr:JNTY0011 as xs:QName := fn:QName($jerr:NS, "jerr:JNTY0011"); |
3620 | |
3621 | |
3622 | === modified file 'modules/w3c/pregenerated/xqt-errors.xq' |
3623 | --- modules/w3c/pregenerated/xqt-errors.xq 2012-04-11 20:22:52 +0000 |
3624 | +++ modules/w3c/pregenerated/xqt-errors.xq 2012-04-27 13:22:48 +0000 |
3625 | @@ -1240,6 +1240,24 @@ |
3626 | |
3627 | (:~ |
3628 | : |
3629 | + : Identifier cannot be used to retrive a resource containing text |
3630 | + : |
3631 | + : @see http://www.w3.org/2005/xqt-errors |
3632 | +:) |
3633 | +declare variable $err:FOUT1170 as xs:QName := fn:QName($err:NS, "err:FOUT1170"); |
3634 | + |
3635 | +(:~ |
3636 | + : |
3637 | + : Retrieved resource contains octets that cannot be decoded into Unicode |
3638 | + : using the specified encoding, the resulting characters are not |
3639 | + : permitted XML characters or requested encoding not supported |
3640 | + : |
3641 | + : @see http://www.w3.org/2005/xqt-errors |
3642 | +:) |
3643 | +declare variable $err:FOUT1190 as xs:QName := fn:QName($err:NS, "err:FOUT1190"); |
3644 | + |
3645 | +(:~ |
3646 | + : |
3647 | : It is a static error if an updating expression is used in any position |
3648 | : other than one of the following: |
3649 | : - The topmost expression in the body of a query. |
3650 | |
3651 | === modified file 'modules/w3c/xpath_functions.xq' |
3652 | --- modules/w3c/xpath_functions.xq 2012-04-11 20:22:52 +0000 |
3653 | +++ modules/w3c/xpath_functions.xq 2012-04-27 13:22:48 +0000 |
3654 | @@ -994,4 +994,49 @@ |
3655 | (:~ |
3656 | : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-string">fn:string</a> |
3657 | :) |
3658 | -declare function fn:string($arg as item()?) as xs:string external; |
3659 | \ No newline at end of file |
3660 | +declare function fn:string($arg as item()?) as xs:string external; |
3661 | + |
3662 | +(:~ |
3663 | + : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-available-environment-variables">fn:available-environment-variables</a> |
3664 | + :) |
3665 | +declare function fn:available-environment-variables() as xs:string* external; |
3666 | + |
3667 | +(:~ |
3668 | + : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-environment-variable">fn:environment-variable</a> |
3669 | + :) |
3670 | +declare function fn:environment-variable($arg as xs:string) as xs:string? external; |
3671 | + |
3672 | +(:~ |
3673 | + : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-unparsed-text">fn:unparsed-text</a> |
3674 | + :) |
3675 | +declare function fn:unparsed-text($href as xs:string?) as xs:string? external; |
3676 | + |
3677 | +(:~ |
3678 | + : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-unparsed-text">fn:unparsed-text</a> |
3679 | + :) |
3680 | +declare function fn:unparsed-text($href as xs:string?, $encoding as xs:string) as xs:string? external; |
3681 | + |
3682 | +(:~ |
3683 | + : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-unparsed-text-available">fn:unparsed-text-available</a> |
3684 | + :) |
3685 | +declare function fn:unparsed-text-available($href as xs:string?) as xs:boolean external; |
3686 | + |
3687 | +(:~ |
3688 | + : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-unparsed-text-lines">fn:unparsed-text-lines</a> |
3689 | + :) |
3690 | +declare function fn:unparsed-text-lines( $href as xs:string?, $encoding as xs:string) as xs:string* external; |
3691 | + |
3692 | +(:~ |
3693 | + : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-unparsed-text-available">fn:unparsed-text-available</a> |
3694 | + :) |
3695 | +declare function fn:unparsed-text-available( $href as xs:string?, $encoding as xs:string) as xs:boolean external; |
3696 | + |
3697 | +(:~ |
3698 | + : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-uri-collection">fn:uri-collection</a> |
3699 | + :) |
3700 | +declare function fn:uri-collection() as xs:anyURI* external; |
3701 | + |
3702 | +(:~ |
3703 | + : @see for semantics please check <a href="http://www.w3.org/TR/xpath-functions-30/#func-uri-collection">fn:uri-collection</a> |
3704 | + :) |
3705 | +declare function fn:uri-collection($arg as xs:string?) as xs:anyURI* external; |
3706 | |
3707 | === modified file 'schemas/CMakeLists.txt' |
3708 | --- schemas/CMakeLists.txt 2012-04-11 20:22:52 +0000 |
3709 | +++ schemas/CMakeLists.txt 2012-04-27 13:22:48 +0000 |
3710 | @@ -19,6 +19,18 @@ |
3711 | DECLARE_ZORBA_SCHEMA(URI "http://www.w3.org/2010/xslt-xquery-serialization" |
3712 | FILE xslt-xquery-serialization.xsd) |
3713 | |
3714 | +# XDM and PUL |
3715 | +DECLARE_ZORBA_SCHEMA(URI "http://www.zorba-xquery.com/schemas/pul" |
3716 | + FILE pul.xsd) |
3717 | +DECLARE_ZORBA_SCHEMA(URI "http://www.zorba-xquery.com/schemas/complete-pul" |
3718 | + FILE complete-pul.xsd) |
3719 | +DECLARE_ZORBA_SCHEMA(URI "http://www.zorba-xquery.com/schemas/xdm" |
3720 | + FILE xdm.xsd) |
3721 | + |
3722 | +# XQueryX |
3723 | +DECLARE_ZORBA_SCHEMA(URI "http://www.w3.org/2005/XQueryX" |
3724 | +FILE XQueryX.xsd) |
3725 | + |
3726 | # The following are DTDs, not schemas, but (currently at least) we |
3727 | # only ever load them when an imported schema file references them |
3728 | # (which, in turn, only happens in error cases - see bug 921624). So, |
3729 | |
3730 | === added file 'schemas/XQueryX.xsd' |
3731 | --- schemas/XQueryX.xsd 1970-01-01 00:00:00 +0000 |
3732 | +++ schemas/XQueryX.xsd 2012-04-27 13:22:48 +0000 |
3733 | @@ -0,0 +1,1962 @@ |
3734 | +<?xml version="1.0"?> |
3735 | +<!-- ================================================================================ --> |
3736 | +<!-- NOTES TO READERS OF THIS SCHEMA: --> |
3737 | +<!-- The default value for both minOccurs and maxOccurs is "1". --> |
3738 | +<!-- The XQueryX schema has been designed to provide the ability to extend definitions --> |
3739 | +<!-- of top-level elements in extensions such as Full-Text and the Update Facility. --> |
3740 | +<!-- The nature of the modification is to define named complex types and redefine --> |
3741 | +<!-- those top-level elements in terms of the named complex types. --> |
3742 | +<!-- ================================================================================ --> |
3743 | +<!-- Changes from Recommendation (edition 1): --> |
3744 | +<!-- * Element defs using anon complex types changed to use named types (bug #4924) --> |
3745 | +<!-- * In Example 4, replaced xqx:parentheziedExpr with xqx:sequenceExpr (bug #4963) --> |
3746 | +<!-- * In XSLT stylesheet, deleted template for xqx:parenthesizedExpr (bug #4963) --> |
3747 | +<!-- * Replaced link to grammar applet with correct link (bug #5323) --> |
3748 | +<!-- * In XSLT stylesheet, corrected template for xqx:namespaceDeclaration (bug #5343) --> |
3749 | +<!-- Changes from Recommendation (edition 2): --> |
3750 | +<!-- * Added support for new Windowing clause in FLWOR expression --> |
3751 | +<!-- * Added support for new Group By Clause in FLWOR expression --> |
3752 | +<!-- * Added support for new Count Clause in FLWOR expression --> |
3753 | +<!-- * Added support for keyword "outer" on for expression --> |
3754 | +<!-- * Modified structure of FLWOR clause per "simplified FLWOR expressions" --> |
3755 | +<!-- * Modified validation syntax per Bugzilla Bug 5472 --> |
3756 | +<!-- * Modified function declaration so that external functions can be nondeterminstic --> |
3757 | +<!-- * Modified variable declaration so external variables can have an initial value --> |
3758 | +<!-- * Added support for new try-catch expression --> |
3759 | +<!-- * Added support for new decimal formatting declaration --> |
3760 | +<!-- * Added support for encoding in the version declaration --> |
3761 | +<!-- * Added support for new context item declaration --> |
3762 | +<!-- * Added support for computed namespace constructor --> |
3763 | +<!-- * Made changes triggered by Bugzilla Bugs 6309, 6310, and 6311 --> |
3764 | +<!-- * Modified errlist syntax per Bugzilla Bug 7053 --> |
3765 | +<!-- * Added support for public/private functions --> |
3766 | +<!-- * Replaced "outer for" support with support for "allowing empty" --> |
3767 | +<!-- * Added support for higher-order functions --> |
3768 | +<!-- * Added support for value-based "switch" expression --> |
3769 | +<!-- * Use pattern to prohibit "#)" in pragma contents per Bugzilla Bug 2711 --> |
3770 | +<!-- * Changed functionItemExpr child element QName to be functionName for consistency --> |
3771 | +<!-- * Replaced "public", "private", and "[non]deterministic" with %-annotations --> |
3772 | +<!-- * Added EQName to permit "URI-literal":NCNAME as alternative to NCName:NCName --> |
3773 | +<!-- * Changed type of atomicType to EQName, so it's really atomicOrUnionType --> |
3774 | +<!-- ================================================================================ --> |
3775 | +<!-- Errata applied: --> |
3776 | +<!-- XQX.E1 - Editorial (Bugzilla Bug 4924) --> |
3777 | +<!-- XQX.E7 - Substantive (Bugzilla Bug 2711) --> |
3778 | +<!-- ================================================================================ --> |
3779 | +<!-- Modifications: --> |
3780 | +<!-- 2008-07-30 - Add XQuery 1.1 grouping and windowing support --> |
3781 | +<!-- 2008-09-18 - Add XQuery 1.1 count and outer-for support, simplified FLWOR --> |
3782 | +<!-- 2008-09-27 - Add validation type, nondeterministic function declarations, --> |
3783 | +<!-- initial values for external variables, try-catch expression --> |
3784 | +<!-- 2008-11-25 - Add support for number formatting, Snelson's version declaration --> |
3785 | +<!-- proposal, context item declaration, computed namespace constructor,--> |
3786 | +<!-- fixes for validate expression, and change to allow the count --> |
3787 | +<!-- clause to only be an intermediate expression --> |
3788 | +<!-- 2009-01-13 - Bugs 6309 and 6310 (fixes to details of certain windowing clauses --> |
3789 | +<!-- 2009-03-03 - tumblingWindowClause syntax now matches slidingWindowClause syntax --> |
3790 | +<!-- 2009-09-06 - Modified errlist syntax per Bugzilla Bug 7053 --> |
3791 | +<!-- 2009-10-09 - Added support for private/public functions --> |
3792 | +<!-- Replace "outer for" with "allowing empty" --> |
3793 | +<!-- 2009-10-22 - Add support for higher-order functions & switch expression --> |
3794 | +<!-- 2010-04-06 - Changed functionItemExpr child QName -> functionName (consistency) --> |
3795 | +<!-- 2010-05-10 - Added %-annotation support for varDecl and functionDecl --> |
3796 | +<!-- 2010-06-23 - Added support for partial function application --> |
3797 | +<!-- 2011-02-02 - Added support for EQNames and atomicOrUnionType --> |
3798 | +<!-- 2011-05-04 - Updated structure of catch component of try-catch expression --> |
3799 | +<!-- 2011-05-04 - Updated validationexpr, mode/type alternatives, type is EQName --> |
3800 | +<!-- ================================================================================ --> |
3801 | + |
3802 | +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
3803 | + xmlns="http://www.w3.org/2005/XQueryX" |
3804 | + targetNamespace="http://www.w3.org/2005/XQueryX" |
3805 | + elementFormDefault="qualified" attributeFormDefault="qualified"> |
3806 | + |
3807 | + |
3808 | +<!-- A few helper declarations --> |
3809 | + <xsd:complexType name="emptyContent"/> |
3810 | + |
3811 | + <xsd:element name="NCName" type="xsd:NCName"/> |
3812 | + |
3813 | + <xsd:complexType name="QName"> |
3814 | + <xsd:simpleContent> |
3815 | + <xsd:extension base="xsd:NCName"> |
3816 | + <xsd:attribute name="prefix" type="xsd:NCName" use="optional"/> |
3817 | + </xsd:extension> |
3818 | + </xsd:simpleContent> |
3819 | + </xsd:complexType> |
3820 | + |
3821 | + <xsd:complexType name="EQName"> |
3822 | + <xsd:simpleContent> |
3823 | + <xsd:extension base="xsd:NCName"> |
3824 | + <xsd:attribute name="prefix" type="xsd:NCName" use="optional"/> |
3825 | + <xsd:attribute name="URI" type="xsd:string" use="optional"/> |
3826 | + </xsd:extension> |
3827 | + </xsd:simpleContent> |
3828 | + </xsd:complexType> |
3829 | + |
3830 | +<!-- The base expression class --> |
3831 | + <xsd:complexType name="expr"/> |
3832 | + |
3833 | + <xsd:element name="expr" type="expr" abstract="true"/> |
3834 | + |
3835 | + |
3836 | +<!-- A list of expressions --> |
3837 | + <xsd:complexType name="exprList"> |
3838 | + <xsd:sequence> |
3839 | + <xsd:element ref="expr" minOccurs="0" maxOccurs="unbounded"/> |
3840 | + </xsd:sequence> |
3841 | + </xsd:complexType> |
3842 | + |
3843 | +<!-- A list of expressions or placeholders --> |
3844 | +<!-- 2010-06-23 - Added support for partial function application --> |
3845 | + <xsd:complexType name="exprOrPlaceholderList"> |
3846 | + <xsd:sequence> |
3847 | + <xsd:choice minOccurs="0" maxOccurs="unbounded"> |
3848 | + <xsd:element ref="expr"/> |
3849 | + <xsd:element name="argumentPlaceholder" type="emptyContent"/> |
3850 | + </xsd:choice> |
3851 | + </xsd:sequence> |
3852 | + </xsd:complexType> |
3853 | + |
3854 | +<!-- A type to be used by elements that comprise an optional expr --> |
3855 | + <xsd:complexType name="exprWrapperOptional"> |
3856 | + <xsd:sequence> |
3857 | + <xsd:element ref="expr" minOccurs="0"/> |
3858 | + </xsd:sequence> |
3859 | + </xsd:complexType> |
3860 | + |
3861 | +<!-- Simple wrapper class --> |
3862 | + <xsd:complexType name="exprWrapper"> |
3863 | + <xsd:sequence> |
3864 | + <xsd:element ref="expr"/> |
3865 | + </xsd:sequence> |
3866 | + </xsd:complexType> |
3867 | + |
3868 | +<!-- constant expressions. We have 4 different subclasses for this --> |
3869 | + <xsd:complexType name="constantExpr"> |
3870 | + <xsd:complexContent> |
3871 | + <xsd:extension base="expr"> |
3872 | + <xsd:sequence> |
3873 | + <xsd:element name="value" type="xsd:anyType"/> |
3874 | + </xsd:sequence> |
3875 | + </xsd:extension> |
3876 | + </xsd:complexContent> |
3877 | + </xsd:complexType> |
3878 | + |
3879 | + <xsd:element name="constantExpr" type="constantExpr" abstract="true" |
3880 | + substitutionGroup="expr"/> |
3881 | + |
3882 | + |
3883 | + <xsd:complexType name="integerConstantExpr"> |
3884 | + <xsd:complexContent> |
3885 | + <xsd:restriction base="constantExpr"> |
3886 | + <xsd:sequence> |
3887 | + <xsd:element name="value" type="xsd:integer"/> |
3888 | + </xsd:sequence> |
3889 | + </xsd:restriction> |
3890 | + </xsd:complexContent> |
3891 | + </xsd:complexType> |
3892 | + |
3893 | + <xsd:element name="integerConstantExpr" type="integerConstantExpr" |
3894 | + substitutionGroup="constantExpr"/> |
3895 | + |
3896 | + |
3897 | + <xsd:complexType name="decimalConstantExpr"> |
3898 | + <xsd:complexContent> |
3899 | + <xsd:restriction base="constantExpr"> |
3900 | + <xsd:sequence> |
3901 | + <xsd:element name="value" type="xsd:decimal"/> |
3902 | + </xsd:sequence> |
3903 | + </xsd:restriction> |
3904 | + </xsd:complexContent> |
3905 | + </xsd:complexType> |
3906 | + |
3907 | + <xsd:element name="decimalConstantExpr" type="decimalConstantExpr" |
3908 | + substitutionGroup="constantExpr"/> |
3909 | + |
3910 | + |
3911 | + <xsd:complexType name="doubleConstantExpr"> |
3912 | + <xsd:complexContent> |
3913 | + <xsd:restriction base="constantExpr"> |
3914 | + <xsd:sequence> |
3915 | + <xsd:element name="value" type="xsd:double"/> |
3916 | + </xsd:sequence> |
3917 | + </xsd:restriction> |
3918 | + </xsd:complexContent> |
3919 | + </xsd:complexType> |
3920 | + |
3921 | + <xsd:element name="doubleConstantExpr" type="doubleConstantExpr" |
3922 | + substitutionGroup="constantExpr"/> |
3923 | + |
3924 | + |
3925 | + <xsd:complexType name="stringConstantExpr"> |
3926 | + <xsd:complexContent> |
3927 | + <xsd:restriction base="constantExpr"> |
3928 | + <xsd:sequence> |
3929 | + <xsd:element name="value" type="xsd:string"/> |
3930 | + </xsd:sequence> |
3931 | + </xsd:restriction> |
3932 | + </xsd:complexContent> |
3933 | + </xsd:complexType> |
3934 | + |
3935 | + <xsd:element name="stringConstantExpr" type="stringConstantExpr" |
3936 | + substitutionGroup="constantExpr"/> |
3937 | + |
3938 | + |
3939 | +<!-- Variables --> |
3940 | + <xsd:complexType name="varRef"> |
3941 | + <xsd:complexContent> |
3942 | + <xsd:extension base="expr"> |
3943 | + <xsd:sequence> |
3944 | + <xsd:element name="name" type="EQName"/> |
3945 | + </xsd:sequence> |
3946 | + </xsd:extension> |
3947 | + </xsd:complexContent> |
3948 | + </xsd:complexType> |
3949 | + |
3950 | + <xsd:element name="varRef" type="varRef" substitutionGroup="expr"/> |
3951 | + |
3952 | + |
3953 | +<!-- root and context-item expressions --> |
3954 | +<!-- rootExpr deleted per Bugzilla Bug #2523 --> |
3955 | + <xsd:complexType name="contextItemExpr"> |
3956 | + <xsd:complexContent> |
3957 | + <xsd:extension base="expr"/> |
3958 | + </xsd:complexContent> |
3959 | + </xsd:complexType> |
3960 | + |
3961 | + <xsd:element name="contextItemExpr" type="contextItemExpr" |
3962 | + substitutionGroup="expr"/> |
3963 | + |
3964 | + |
3965 | +<!-- Pragmas and extension expressions --> |
3966 | +<!-- 2010-01-01, JM replaced pragmaContents elem def'n with one that has a pattern --> |
3967 | + <xsd:complexType name="pragma"> |
3968 | + <xsd:sequence> |
3969 | + <xsd:element name="pragmaName" type="EQName"/> |
3970 | + <xsd:element name="pragmaContents"> |
3971 | + <xsd:simpleType> |
3972 | + <xsd:restriction base="xsd:string"> |
3973 | + <xsd:pattern value="(([^#]|#+[^\)#])*#*)"/> |
3974 | + </xsd:restriction> |
3975 | + </xsd:simpleType> |
3976 | + </xsd:element> |
3977 | + </xsd:sequence> |
3978 | + </xsd:complexType> |
3979 | + |
3980 | + <xsd:element name="pragma" type="pragma"/> |
3981 | + |
3982 | + |
3983 | + <xsd:complexType name="extensionExpr"> |
3984 | + <xsd:complexContent> |
3985 | + <xsd:extension base="expr"> |
3986 | + <xsd:sequence> |
3987 | + <xsd:element ref="pragma" maxOccurs="unbounded"/> |
3988 | + <xsd:element name="argExpr" type="exprWrapper" minOccurs="0"/> |
3989 | + </xsd:sequence> |
3990 | + </xsd:extension> |
3991 | + </xsd:complexContent> |
3992 | + </xsd:complexType> |
3993 | + |
3994 | + <xsd:element name="extensionExpr" type="extensionExpr" |
3995 | + substitutionGroup="expr"/> |
3996 | + |
3997 | + |
3998 | +<!-- Function call expressions --> |
3999 | +<!-- 2010-06-23 - Added support for partial function application --> |
4000 | + <xsd:complexType name="functionCallExpr"> |
4001 | + <xsd:complexContent> |
4002 | + <xsd:extension base="expr"> |
4003 | + <xsd:sequence> |
4004 | + <xsd:element name="functionName" type="EQName"/> |
4005 | + <xsd:element name="arguments" type="exprOrPlaceholderList" minOccurs="0"/> |
4006 | + </xsd:sequence> |
4007 | + </xsd:extension> |
4008 | + </xsd:complexContent> |
4009 | + </xsd:complexType> |
4010 | + |
4011 | + <xsd:element name="functionCallExpr" type="functionCallExpr" |
4012 | + substitutionGroup="expr"/> |
4013 | + |
4014 | + |
4015 | +<!-- Constructor functions --> |
4016 | + <xsd:complexType name="constructorFunctionExpr"> |
4017 | + <xsd:complexContent> |
4018 | + <xsd:extension base="expr"> |
4019 | + <xsd:sequence> |
4020 | + <xsd:element name="typeName" type="EQName"/> |
4021 | + <xsd:element name="argExpr" type="exprWrapper"/> |
4022 | + </xsd:sequence> |
4023 | + </xsd:extension> |
4024 | + </xsd:complexContent> |
4025 | + </xsd:complexType> |
4026 | + |
4027 | + <xsd:element name="constructorFunctionExpr" type="constructorFunctionExpr" |
4028 | + substitutionGroup="expr"/> |
4029 | + |
4030 | + |
4031 | +<!-- Sequence expressions --> |
4032 | + <xsd:complexType name="sequenceExpr"> |
4033 | + <xsd:complexContent> |
4034 | + <xsd:extension base="expr"> |
4035 | + <xsd:sequence> |
4036 | + <xsd:element ref="expr" minOccurs="0" maxOccurs="unbounded"/> |
4037 | + </xsd:sequence> |
4038 | + </xsd:extension> |
4039 | + </xsd:complexContent> |
4040 | + </xsd:complexType> |
4041 | + |
4042 | + <xsd:element name="sequenceExpr" type="sequenceExpr" substitutionGroup="expr"/> |
4043 | + |
4044 | + |
4045 | + <xsd:complexType name="rangeSequenceExpr"> |
4046 | + <xsd:complexContent> |
4047 | + <xsd:extension base="expr"> |
4048 | + <xsd:sequence> |
4049 | + <xsd:element name="startExpr" type="exprWrapper"/> |
4050 | + <xsd:element name="endExpr" type="exprWrapper"/> |
4051 | + </xsd:sequence> |
4052 | + </xsd:extension> |
4053 | + </xsd:complexContent> |
4054 | + </xsd:complexType> |
4055 | + |
4056 | + <xsd:element name="rangeSequenceExpr" type="rangeSequenceExpr" |
4057 | + substitutionGroup="expr"/> |
4058 | + |
4059 | + |
4060 | +<!-- Builtin operator expressions --> |
4061 | + <xsd:complexType name="operatorExpr"> |
4062 | + <xsd:complexContent> |
4063 | + <xsd:extension base="expr"/> |
4064 | + </xsd:complexContent> |
4065 | + </xsd:complexType> |
4066 | + |
4067 | + |
4068 | + <xsd:complexType name="unaryOperatorExpr"> |
4069 | + <xsd:complexContent> |
4070 | + <xsd:extension base="operatorExpr"> |
4071 | + <xsd:sequence> |
4072 | + <xsd:element name="operand" type="exprWrapper"/> |
4073 | + </xsd:sequence> |
4074 | + </xsd:extension> |
4075 | + </xsd:complexContent> |
4076 | + </xsd:complexType> |
4077 | + |
4078 | + |
4079 | + <xsd:complexType name="binaryOperatorExpr"> |
4080 | + <xsd:complexContent> |
4081 | + <xsd:extension base="operatorExpr"> |
4082 | + <xsd:sequence> |
4083 | + <xsd:element name="firstOperand" type="exprWrapper"/> |
4084 | + <xsd:element name="secondOperand" type="exprWrapper"/> |
4085 | + </xsd:sequence> |
4086 | + </xsd:extension> |
4087 | + </xsd:complexContent> |
4088 | + </xsd:complexType> |
4089 | + |
4090 | + |
4091 | + <xsd:element name="operatorExpr" type="operatorExpr" |
4092 | + abstract="true" substitutionGroup="expr"/> |
4093 | + |
4094 | + <xsd:element name="arithmeticOp" type="operatorExpr" |
4095 | + abstract="true" substitutionGroup="operatorExpr"/> |
4096 | + |
4097 | + <xsd:element name="addOp" type="binaryOperatorExpr" |
4098 | + substitutionGroup="arithmeticOp"/> |
4099 | + |
4100 | + <xsd:element name="subtractOp" type="binaryOperatorExpr" |
4101 | + substitutionGroup="arithmeticOp"/> |
4102 | + |
4103 | + <xsd:element name="multiplyOp" type="binaryOperatorExpr" |
4104 | + substitutionGroup="arithmeticOp"/> |
4105 | + |
4106 | + <xsd:element name="divOp" type="binaryOperatorExpr" |
4107 | + substitutionGroup="arithmeticOp"/> |
4108 | + |
4109 | + <xsd:element name="idivOp" type="binaryOperatorExpr" |
4110 | + substitutionGroup="arithmeticOp"/> |
4111 | + |
4112 | + <xsd:element name="modOp" type="binaryOperatorExpr" |
4113 | + substitutionGroup="arithmeticOp"/> |
4114 | + |
4115 | + <xsd:element name="unaryMinusOp" type="unaryOperatorExpr" |
4116 | + substitutionGroup="arithmeticOp"/> |
4117 | + |
4118 | + <xsd:element name="unaryPlusOp" type="unaryOperatorExpr" |
4119 | + substitutionGroup="arithmeticOp"/> |
4120 | + |
4121 | + <xsd:element name="comparisonOp" type="binaryOperatorExpr" abstract="true" |
4122 | + substitutionGroup="operatorExpr"/> |
4123 | + |
4124 | + <xsd:element name="valueComparisonOp" type="binaryOperatorExpr" abstract="true" |
4125 | + substitutionGroup="operatorExpr"/> |
4126 | + |
4127 | + <xsd:element name="eqOp" type="binaryOperatorExpr" |
4128 | + substitutionGroup="valueComparisonOp"/> |
4129 | + |
4130 | + <xsd:element name="neOp" type="binaryOperatorExpr" |
4131 | + substitutionGroup="valueComparisonOp"/> |
4132 | + |
4133 | + <xsd:element name="gtOp" type="binaryOperatorExpr" |
4134 | + substitutionGroup="valueComparisonOp"/> |
4135 | + |
4136 | + <xsd:element name="geOp" type="binaryOperatorExpr" |
4137 | + substitutionGroup="valueComparisonOp"/> |
4138 | + |
4139 | + <xsd:element name="ltOp" type="binaryOperatorExpr" |
4140 | + substitutionGroup="valueComparisonOp"/> |
4141 | + |
4142 | + <xsd:element name="leOp" type="binaryOperatorExpr" |
4143 | + substitutionGroup="valueComparisonOp"/> |
4144 | + |
4145 | + <xsd:element name="generalComparisonOp" type="binaryOperatorExpr" abstract="true" |
4146 | + substitutionGroup="operatorExpr"/> |
4147 | + |
4148 | + <xsd:element name="equalOp" type="binaryOperatorExpr" |
4149 | + substitutionGroup="generalComparisonOp"/> |
4150 | + |
4151 | + <xsd:element name="notEqualOp" type="binaryOperatorExpr" |
4152 | + substitutionGroup="generalComparisonOp"/> |
4153 | + |
4154 | + <xsd:element name="lessThanOp" type="binaryOperatorExpr" |
4155 | + substitutionGroup="generalComparisonOp"/> |
4156 | + |
4157 | + <xsd:element name="lessThanOrEqualOp" type="binaryOperatorExpr" |
4158 | + substitutionGroup="generalComparisonOp"/> |
4159 | + |
4160 | + <xsd:element name="greaterThanOp" type="binaryOperatorExpr" |
4161 | + substitutionGroup="generalComparisonOp"/> |
4162 | + |
4163 | + <xsd:element name="greaterThanOrEqualOp" type="binaryOperatorExpr" |
4164 | + substitutionGroup="generalComparisonOp"/> |
4165 | + |
4166 | + <xsd:element name="nodeComparisonOp" type="binaryOperatorExpr" abstract="true" |
4167 | + substitutionGroup="operatorExpr"/> |
4168 | + |
4169 | + <xsd:element name="isOp" type="binaryOperatorExpr" |
4170 | + substitutionGroup="nodeComparisonOp"/> |
4171 | + |
4172 | + <xsd:element name="orderComparisonOp" type="binaryOperatorExpr" abstract="true" |
4173 | + substitutionGroup="operatorExpr"/> |
4174 | + |
4175 | + <xsd:element name="nodeBeforeOp" type="binaryOperatorExpr" |
4176 | + substitutionGroup="orderComparisonOp"/> |
4177 | + |
4178 | + <xsd:element name="nodeAfterOp" type="binaryOperatorExpr" |
4179 | + substitutionGroup="orderComparisonOp"/> |
4180 | + |
4181 | + <xsd:element name="logicalOp" type="binaryOperatorExpr" abstract="true" |
4182 | + substitutionGroup="operatorExpr"/> |
4183 | + |
4184 | + <xsd:element name="andOp" type="binaryOperatorExpr" |
4185 | + substitutionGroup="logicalOp"/> |
4186 | + |
4187 | + <xsd:element name="orOp" type="binaryOperatorExpr" |
4188 | + substitutionGroup="logicalOp"/> |
4189 | + |
4190 | + <xsd:element name="setOp" type="binaryOperatorExpr" |
4191 | + abstract="true" substitutionGroup="operatorExpr"/> |
4192 | + |
4193 | + <xsd:element name="unionOp" type="binaryOperatorExpr" |
4194 | + substitutionGroup="setOp"/> |
4195 | + |
4196 | + <xsd:element name="intersectOp" type="binaryOperatorExpr" |
4197 | + substitutionGroup="setOp"/> |
4198 | + |
4199 | + <xsd:element name="exceptOp" type="binaryOperatorExpr" |
4200 | + substitutionGroup="setOp"/> |
4201 | + |
4202 | + |
4203 | +<!-- Basic typenames --> |
4204 | +<!-- By changing the type attribute from QName to EQName, this is now atomicOrUnionType --> |
4205 | +<!-- However, for backwards compatibility w/XQueryX 1.0, the name had to stay the same--> |
4206 | + <xsd:element name="atomicType" type="EQName" substitutionGroup="itemType"/> |
4207 | + |
4208 | + |
4209 | +<!-- Used in castable expression and cast expression --> |
4210 | + <xsd:complexType name="singleType"> |
4211 | + <xsd:sequence> |
4212 | + <xsd:element ref="atomicType"/> |
4213 | + <xsd:element name="optional" type="emptyContent" minOccurs="0"/> |
4214 | + </xsd:sequence> |
4215 | + </xsd:complexType> |
4216 | + |
4217 | + <xsd:element name="singleType" type="singleType"/> |
4218 | + |
4219 | + |
4220 | +<!-- Item type schema types and elements --> |
4221 | + <xsd:element name="itemType" abstract="true"/> |
4222 | + |
4223 | + |
4224 | + <xsd:complexType name="emptyItemTypeContent"/> |
4225 | + |
4226 | + <xsd:element name="anyItemType" type="emptyItemTypeContent" |
4227 | + substitutionGroup="itemType"/> |
4228 | + |
4229 | + |
4230 | + <xsd:simpleType name="occurrenceIndicator"> |
4231 | + <xsd:restriction base="xsd:string"> |
4232 | + <xsd:enumeration value="?"/> |
4233 | + <xsd:enumeration value="*"/> |
4234 | + <xsd:enumeration value="+"/> |
4235 | + </xsd:restriction> |
4236 | + </xsd:simpleType> |
4237 | + |
4238 | + |
4239 | +<!-- Sequence type --> |
4240 | + <xsd:complexType name="sequenceType"> |
4241 | + <xsd:choice> |
4242 | + <xsd:element name="voidSequenceType" type="emptyContent"/> |
4243 | + <xsd:sequence> |
4244 | + <xsd:element ref="itemType"/> |
4245 | + <xsd:element name="occurrenceIndicator" type="occurrenceIndicator" |
4246 | + minOccurs="0"/> |
4247 | + </xsd:sequence> |
4248 | + </xsd:choice> |
4249 | + </xsd:complexType> |
4250 | + |
4251 | + <xsd:element name="sequenceType" type="sequenceType"/> |
4252 | + |
4253 | + <xsd:element name="typeDeclaration" type="sequenceType"/> |
4254 | + |
4255 | + |
4256 | +<!-- Represents a "typed" variable (for clause, let clause etc) --> |
4257 | + <xsd:complexType name="typedVariableBinding"> |
4258 | + <xsd:sequence> |
4259 | + <xsd:element name="varName" type="EQName"/> |
4260 | + <xsd:element ref="typeDeclaration" minOccurs="0"/> |
4261 | + </xsd:sequence> |
4262 | + </xsd:complexType> |
4263 | + |
4264 | + <xsd:element name="typedVariableBinding" type="typedVariableBinding"/> |
4265 | + |
4266 | + |
4267 | +<!-- Represents an untyped variable for the "at" clause in a for clause --> |
4268 | + <xsd:element name="positionalVariableBinding" type="EQName"/> |
4269 | + |
4270 | + <xsd:element name="variableBinding" type="EQName"/> |
4271 | + |
4272 | + |
4273 | +<!-- Represents all variable bindings in a for or let clause except typed and --> |
4274 | +<!-- positional variable bindings --> |
4275 | + <xsd:element name="forLetClauseItemExtensions" abstract="true"/> |
4276 | + |
4277 | + |
4278 | +<!-- Major syntax productions: FLWOR clause components --> |
4279 | +<!-- for clause --> |
4280 | + <xsd:complexType name="forClauseItem"> |
4281 | + <xsd:sequence> |
4282 | + <xsd:element ref="typedVariableBinding"/> |
4283 | + <xsd:element name="allowingEmpty" type="emptyContent" |
4284 | + minOccurs="0"/> |
4285 | + <xsd:element ref="positionalVariableBinding" minOccurs="0" maxOccurs="1"/> |
4286 | + <xsd:element ref="forLetClauseItemExtensions" minOccurs="0" |
4287 | + maxOccurs="unbounded"/> |
4288 | + <xsd:element name="forExpr" type="exprWrapper"/> |
4289 | + </xsd:sequence> |
4290 | + </xsd:complexType> |
4291 | + |
4292 | + <xsd:element name="forClauseItem" type="forClauseItem"/> |
4293 | + |
4294 | + |
4295 | + <xsd:complexType name="forClause"> |
4296 | + <xsd:sequence> |
4297 | + <xsd:element ref="forClauseItem" minOccurs="1" maxOccurs="unbounded"/> |
4298 | + </xsd:sequence> |
4299 | + </xsd:complexType> |
4300 | + |
4301 | + <xsd:element name="forClause" type="forClause"/> |
4302 | + |
4303 | + |
4304 | +<!-- let clause --> |
4305 | + <xsd:complexType name="letClauseItem"> |
4306 | + <xsd:sequence> |
4307 | + <xsd:choice> |
4308 | + <xsd:sequence> |
4309 | + <xsd:element ref="typedVariableBinding"/> |
4310 | + <xsd:element ref="forLetClauseItemExtensions" |
4311 | + minOccurs="0" maxOccurs="unbounded"/> |
4312 | + </xsd:sequence> |
4313 | + <xsd:element ref="forLetClauseItemExtensions" |
4314 | + minOccurs="0" maxOccurs="unbounded"/> |
4315 | + </xsd:choice> |
4316 | + <xsd:element name="letExpr" type="exprWrapper"/> |
4317 | + </xsd:sequence> |
4318 | + </xsd:complexType> |
4319 | + |
4320 | + <xsd:element name="letClauseItem" type="letClauseItem"/> |
4321 | + |
4322 | + |
4323 | + <xsd:complexType name="letClause"> |
4324 | + <xsd:sequence> |
4325 | + <xsd:element ref="letClauseItem" maxOccurs="unbounded"/> |
4326 | + </xsd:sequence> |
4327 | + </xsd:complexType> |
4328 | + |
4329 | + <xsd:element name="letClause" type="letClause"/> |
4330 | + |
4331 | + |
4332 | +<!-- This is the windowClause (part of FLWOR expression) --> |
4333 | +<!-- It corresponds to the following XQuery grammar --> |
4334 | +<!-- WindowClause ::= "for" (TumblingWindowClause | SlidingWindowClause) --> |
4335 | + <xsd:complexType name="windowClause"> |
4336 | + <xsd:choice> |
4337 | + <xsd:element ref="tumblingWindowClause"/> |
4338 | + <xsd:element ref="slidingWindowClause"/> |
4339 | + </xsd:choice> |
4340 | + </xsd:complexType> |
4341 | + |
4342 | + <xsd:element name="windowClause" type="windowClause"/> |
4343 | + |
4344 | + |
4345 | +<!-- This is the tumblingWindowClause --> |
4346 | +<!-- It corresponds to the following XQuery grammar --> |
4347 | +<!-- TumblingWindowClause ::= "tumbling" "window" "$" VarName TypeDeclaration? --> |
4348 | +<!-- "in" ExprSingle WindowStartCondition WindowEndCondition? --> |
4349 | + <xsd:complexType name="tumblingWindowClause"> |
4350 | + <xsd:sequence> |
4351 | + <xsd:element ref="typedVariableBinding"/> |
4352 | + <xsd:element name="bindingSequence" type="exprWrapper"/> |
4353 | + <xsd:element ref="windowStartCondition"/> |
4354 | + <xsd:element ref="windowEndCondition" minOccurs="0"/> |
4355 | + </xsd:sequence> |
4356 | + </xsd:complexType> |
4357 | + |
4358 | + <xsd:element name="tumblingWindowClause" type="tumblingWindowClause"/> |
4359 | + |
4360 | + |
4361 | +<!-- This is the slidingWindowClause --> |
4362 | +<!-- It corresponds to the following XQuery grammar --> |
4363 | +<!-- SlidingWindowClause ::= "sliding" "window" "$" VarName TypeDeclaration? --> |
4364 | +<!-- "in" ExprSingle WindowStartCondition WindowEndCondition --> |
4365 | + <xsd:complexType name="slidingWindowClause"> |
4366 | + <xsd:sequence> |
4367 | + <xsd:element ref="typedVariableBinding"/> |
4368 | + <xsd:element name="bindingSequence" type="exprWrapper"/> |
4369 | + <xsd:element ref="windowStartCondition"/> |
4370 | + <xsd:element ref="windowEndCondition"/> |
4371 | + </xsd:sequence> |
4372 | + </xsd:complexType> |
4373 | + |
4374 | + <xsd:element name="slidingWindowClause" type="slidingWindowClause"/> |
4375 | + |
4376 | + |
4377 | +<!-- windowStartCondition --> |
4378 | +<!-- Corresponds to the following XQuery grammar --> |
4379 | +<!-- WindowStartCondition ::= "start" WindowVars "when" ExprSingle --> |
4380 | + <xsd:complexType name="windowStartCondition"> |
4381 | + <xsd:sequence> |
4382 | + <xsd:element ref="windowVars" minOccurs="0"/> |
4383 | + <xsd:element name="winStartExpr" type="exprWrapper"/> |
4384 | + </xsd:sequence> |
4385 | + </xsd:complexType> |
4386 | + |
4387 | + <xsd:element name="windowStartCondition" type="windowStartCondition"/> |
4388 | + |
4389 | + |
4390 | +<!-- windowEndCondition --> |
4391 | +<!-- Corresponds to the following XQuery grammar --> |
4392 | +<!-- WindowEndCondition ::= "only"? "end" WindowVars "when" ExprSingle --> |
4393 | + <xsd:complexType name="windowEndCondition"> |
4394 | + <xsd:sequence> |
4395 | + <xsd:element ref="windowVars" minOccurs="0"/> |
4396 | + <xsd:element name="winEndExpr" type="exprWrapper"/> |
4397 | + </xsd:sequence> |
4398 | + <xsd:attribute name="onlyEnd" type="xsd:boolean" default="false"/> |
4399 | + </xsd:complexType> |
4400 | + |
4401 | + <xsd:element name="windowEndCondition" type="windowEndCondition"/> |
4402 | + |
4403 | + |
4404 | +<!-- windowVars --> |
4405 | +<!-- Corresponds to the following XQuery grammar --> |
4406 | +<!-- WindowVars ::= ("$" \)? PositionalVar? ("previous" "$" PreviousItem)? --> |
4407 | +<!-- ("next" "$" NextItem)? --> |
4408 | + <xsd:complexType name="windowVars"> |
4409 | + <xsd:sequence> |
4410 | + <xsd:element name="currentItem" type="EQName" minOccurs="0"/> |
4411 | + <xsd:element ref="positionalVariableBinding" minOccurs="0"/> |
4412 | + <xsd:element name="previousItem" type="EQName" minOccurs="0"/> |
4413 | + <xsd:element name="nextItem" type="EQName" minOccurs="0"/> |
4414 | + </xsd:sequence> |
4415 | + </xsd:complexType> |
4416 | + |
4417 | + <xsd:element name="windowVars" type="windowVars"/> |
4418 | + |
4419 | + |
4420 | +<!-- countClause (part of FLWOR expression) --> |
4421 | + <xsd:complexType name="countClause"> |
4422 | + <xsd:sequence> |
4423 | + <xsd:element ref="varRef"/> |
4424 | + </xsd:sequence> |
4425 | + </xsd:complexType> |
4426 | + |
4427 | + <xsd:element name="countClause" type="countClause"/> |
4428 | + |
4429 | + |
4430 | +<!-- whereClause (part of FLWOR expression) --> |
4431 | + <xsd:element name="whereClause" type="exprWrapper"/> |
4432 | + |
4433 | + |
4434 | +<!-- groupByClause (part of FLWOR expression) --> |
4435 | +<!-- Corresponds to the following XQuery syntax --> |
4436 | +<!-- GroupByClause ::= "group" "by" GroupingSpecList --> |
4437 | +<!-- GroupingSpecList ::= GroupingSpec ("," GroupingSpec)* --> |
4438 | + <xsd:complexType name="groupByClause"> |
4439 | + <xsd:sequence maxOccurs="unbounded"> |
4440 | + <xsd:element ref="groupingSpec"/> |
4441 | + </xsd:sequence> |
4442 | + </xsd:complexType> |
4443 | + |
4444 | + <xsd:element name="groupByClause" type="groupByClause"/> |
4445 | + |
4446 | + |
4447 | +<!-- Corresponds to the following XQuery syntax --> |
4448 | +<!-- GroupingSpec ::= "$" VarName ("collation" URILiteral)? --> |
4449 | + <xsd:complexType name="groupingSpec"> |
4450 | + <xsd:sequence> |
4451 | + <xsd:element name="varName" type="EQName"/> |
4452 | + <xsd:element name="collation" type="xsd:string" minOccurs="0"/> |
4453 | + </xsd:sequence> |
4454 | + </xsd:complexType> |
4455 | + |
4456 | + <xsd:element name="groupingSpec" type="groupingSpec"/> |
4457 | + |
4458 | + |
4459 | +<!-- order by clause --> |
4460 | + <xsd:simpleType name="emptyOrderingMode"> |
4461 | + <xsd:restriction base="xsd:string"> |
4462 | + <xsd:enumeration value="empty greatest"/> |
4463 | + <xsd:enumeration value="empty least"/> |
4464 | + </xsd:restriction> |
4465 | + </xsd:simpleType> |
4466 | + |
4467 | + <xsd:simpleType name="orderingKind"> |
4468 | + <xsd:restriction base="xsd:string"> |
4469 | + <xsd:enumeration value="ascending"/> |
4470 | + <xsd:enumeration value="descending"/> |
4471 | + </xsd:restriction> |
4472 | + </xsd:simpleType> |
4473 | + |
4474 | + |
4475 | + <xsd:complexType name="orderModifier"> |
4476 | + <xsd:sequence> |
4477 | + <xsd:element name="orderingKind" type="orderingKind" minOccurs="0"/> |
4478 | + <xsd:element name="emptyOrderingMode" type="emptyOrderingMode" minOccurs="0"/> |
4479 | + <xsd:element name="collation" type="xsd:string" minOccurs="0"/> |
4480 | + </xsd:sequence> |
4481 | + </xsd:complexType> |
4482 | + |
4483 | + <xsd:element name="orderModifier" type="orderModifier"/> |
4484 | + |
4485 | + |
4486 | + <xsd:complexType name="orderBySpec"> |
4487 | + <xsd:sequence> |
4488 | + <xsd:element name="orderByExpr" type="exprWrapper"/> |
4489 | + <xsd:element ref="orderModifier" minOccurs="0"/> |
4490 | + </xsd:sequence> |
4491 | + </xsd:complexType> |
4492 | + |
4493 | + <xsd:element name="orderBySpec" type="orderBySpec"/> |
4494 | + |
4495 | + |
4496 | + <xsd:complexType name="orderByClause"> |
4497 | + <xsd:sequence> |
4498 | + <xsd:element name="stable" type="emptyContent" minOccurs="0"/> |
4499 | + <xsd:element ref="orderBySpec" maxOccurs="unbounded"/> |
4500 | + </xsd:sequence> |
4501 | + </xsd:complexType> |
4502 | + |
4503 | + <xsd:element name="orderByClause" type="orderByClause"/> |
4504 | + |
4505 | + |
4506 | +<!-- return clause --> |
4507 | + <xsd:element name="returnClause" type="exprWrapper"/> |
4508 | + |
4509 | + |
4510 | +<!-- This is the XQuery 1.1 flwor expression --> |
4511 | +<!-- Corresponds to the following XQuery syntax: --> |
4512 | +<!-- 1.1 FLWORExpr ::= (ForClause | LetClause | WindowClause) --> |
4513 | +<!-- (ForClause | LetClause | WindowClause | CountClause | --> |
4514 | +<!-- WhereClause | GroupByClause | OrderByClause)* --> |
4515 | +<!-- ReturnClause --> |
4516 | + <xsd:complexType name="flworExpr"> |
4517 | + <xsd:complexContent> |
4518 | + <xsd:extension base="expr"> |
4519 | + <xsd:sequence> |
4520 | + <xsd:choice> |
4521 | + <xsd:element ref="forClause"/> |
4522 | + <xsd:element ref="letClause"/> |
4523 | + <xsd:element ref="windowClause"/> |
4524 | + </xsd:choice> |
4525 | + <xsd:sequence> |
4526 | + <xsd:choice minOccurs="0" maxOccurs="unbounded"> |
4527 | + <xsd:element ref="forClause"/> |
4528 | + <xsd:element ref="letClause"/> |
4529 | + <xsd:element ref="windowClause"/> |
4530 | + <xsd:element ref="countClause"/> |
4531 | + <xsd:element ref="whereClause"/> |
4532 | + <xsd:element ref="groupByClause"/> |
4533 | + <xsd:element ref="orderByClause"/> |
4534 | + </xsd:choice> |
4535 | + <xsd:element ref="returnClause"/> |
4536 | + </xsd:sequence> |
4537 | + </xsd:sequence> |
4538 | + </xsd:extension> |
4539 | + </xsd:complexContent> |
4540 | + </xsd:complexType> |
4541 | + |
4542 | + <xsd:element name="flworExpr" type="flworExpr" substitutionGroup="expr"/> |
4543 | + |
4544 | + |
4545 | +<!-- conditional expressions --> |
4546 | + <xsd:complexType name="ifThenElseExpr"> |
4547 | + <xsd:complexContent> |
4548 | + <xsd:extension base="expr"> |
4549 | + <xsd:sequence> |
4550 | + <xsd:element name="ifClause" type="exprWrapper"/> |
4551 | + <xsd:element name="thenClause" type="exprWrapper"/> |
4552 | + <xsd:element name="elseClause" type="exprWrapper"/> |
4553 | + </xsd:sequence> |
4554 | + </xsd:extension> |
4555 | + </xsd:complexContent> |
4556 | + </xsd:complexType> |
4557 | + |
4558 | + <xsd:element name="ifThenElseExpr" type="ifThenElseExpr" |
4559 | + substitutionGroup="expr"/> |
4560 | + |
4561 | + |
4562 | +<!-- The following clauses describe quantified expressions --> |
4563 | + <xsd:simpleType name="quantifier"> |
4564 | + <xsd:restriction base="xsd:NMTOKEN"> |
4565 | + <xsd:enumeration value="some"/> |
4566 | + <xsd:enumeration value="every"/> |
4567 | + </xsd:restriction> |
4568 | + </xsd:simpleType> |
4569 | + |
4570 | + |
4571 | + <xsd:complexType name="quantifiedExprInClause"> |
4572 | + <xsd:sequence> |
4573 | + <xsd:element ref="typedVariableBinding"/> |
4574 | + <xsd:element name="sourceExpr" type="exprWrapper"/> |
4575 | + </xsd:sequence> |
4576 | + </xsd:complexType> |
4577 | + |
4578 | + <xsd:element name="quantifiedExprInClause" type="quantifiedExprInClause"/> |
4579 | + |
4580 | + |
4581 | + <xsd:complexType name="quantifiedExpr"> |
4582 | + <xsd:complexContent> |
4583 | + <xsd:extension base="expr"> |
4584 | + <xsd:sequence> |
4585 | + <xsd:element name="quantifier" type="quantifier"/> |
4586 | + <xsd:element ref="quantifiedExprInClause" maxOccurs="unbounded"/> |
4587 | + <xsd:element name="predicateExpr" type="exprWrapper"/> |
4588 | + </xsd:sequence> |
4589 | + </xsd:extension> |
4590 | + </xsd:complexContent> |
4591 | + </xsd:complexType> |
4592 | + |
4593 | + <xsd:element name="quantifiedExpr" type="quantifiedExpr" |
4594 | + substitutionGroup="expr"/> |
4595 | + |
4596 | + |
4597 | +<!-- handle the switch expression --> |
4598 | +<!-- Note: no substitutionGroup as we cannot use this anywhere except within switch --> |
4599 | + <xsd:complexType name="switchExprCaseClause"> |
4600 | + <xsd:complexContent> |
4601 | + <xsd:extension base="expr"> |
4602 | + <xsd:sequence> |
4603 | + <xsd:element name="switchCaseExpr" type="exprWrapper" maxOccurs="unbounded"/> |
4604 | + <xsd:element name="resultExpr" type="exprWrapper"/> |
4605 | + </xsd:sequence> |
4606 | + </xsd:extension> |
4607 | + </xsd:complexContent> |
4608 | + </xsd:complexType> |
4609 | + |
4610 | + <xsd:element name="switchExprCaseClause" |
4611 | + type="switchExprCaseClause"/> |
4612 | + |
4613 | + |
4614 | +<!-- Note: no substitutionGroup as we cannot use this anywhere except within switch --> |
4615 | + <xsd:complexType name="switchExprDefaultClause"> |
4616 | + <xsd:complexContent> |
4617 | + <xsd:extension base="expr"> |
4618 | + <xsd:sequence> |
4619 | + <xsd:element name="resultExpr" type="exprWrapper"/> |
4620 | + </xsd:sequence> |
4621 | + </xsd:extension> |
4622 | + </xsd:complexContent> |
4623 | + </xsd:complexType> |
4624 | + |
4625 | + <xsd:element name="switchExprDefaultClause" |
4626 | + type="switchExprDefaultClause"/> |
4627 | + |
4628 | + |
4629 | + <xsd:complexType name="switchExpr"> |
4630 | + <xsd:complexContent> |
4631 | + <xsd:extension base="expr"> |
4632 | + <xsd:sequence> |
4633 | + <xsd:element name="argExpr" type="exprWrapper"/> |
4634 | + <xsd:element ref="switchExprCaseClause" maxOccurs="unbounded"/> |
4635 | + <xsd:element ref="switchExprDefaultClause"/> |
4636 | + </xsd:sequence> |
4637 | + </xsd:extension> |
4638 | + </xsd:complexContent> |
4639 | + </xsd:complexType> |
4640 | + |
4641 | + <xsd:element name="switchExpr" type="switchExpr" |
4642 | + substitutionGroup="expr"/> |
4643 | + |
4644 | + |
4645 | +<!-- handle the typeswitch expression --> |
4646 | +<!-- Note: no substitutionGroup as we cannot use this anywhere except within typeswitch --> |
4647 | + <xsd:complexType name="typeswitchExprCaseClause"> |
4648 | + <xsd:complexContent> |
4649 | + <xsd:extension base="expr"> |
4650 | + <xsd:sequence> |
4651 | + <xsd:element ref="variableBinding" minOccurs="0"/> |
4652 | + <xsd:element ref="sequenceType"/> |
4653 | + <xsd:element name="resultExpr" type="exprWrapper"/> |
4654 | + </xsd:sequence> |
4655 | + </xsd:extension> |
4656 | + </xsd:complexContent> |
4657 | + </xsd:complexType> |
4658 | + |
4659 | + <xsd:element name="typeswitchExprCaseClause" |
4660 | + type="typeswitchExprCaseClause"/> |
4661 | + |
4662 | + |
4663 | +<!-- Note: no substitutionGroup as we cannot use this anywhere except within typeswitch --> |
4664 | + <xsd:complexType name="typeswitchExprDefaultClause"> |
4665 | + <xsd:complexContent> |
4666 | + <xsd:extension base="expr"> |
4667 | + <xsd:sequence> |
4668 | + <xsd:element ref="variableBinding" minOccurs="0"/> |
4669 | + <xsd:element name="resultExpr" type="exprWrapper"/> |
4670 | + </xsd:sequence> |
4671 | + </xsd:extension> |
4672 | + </xsd:complexContent> |
4673 | + </xsd:complexType> |
4674 | + |
4675 | + <xsd:element name="typeswitchExprDefaultClause" |
4676 | + type="typeswitchExprDefaultClause"/> |
4677 | + |
4678 | + |
4679 | + <xsd:complexType name="typeswitchExpr"> |
4680 | + <xsd:complexContent> |
4681 | + <xsd:extension base="expr"> |
4682 | + <xsd:sequence> |
4683 | + <xsd:element name="argExpr" type="exprWrapper"/> |
4684 | + <xsd:element ref="typeswitchExprCaseClause" maxOccurs="unbounded"/> |
4685 | + <xsd:element ref="typeswitchExprDefaultClause"/> |
4686 | + </xsd:sequence> |
4687 | + </xsd:extension> |
4688 | + </xsd:complexContent> |
4689 | + </xsd:complexType> |
4690 | + |
4691 | + <xsd:element name="typeswitchExpr" type="typeswitchExpr" |
4692 | + substitutionGroup="expr"/> |
4693 | + |
4694 | + |
4695 | +<!-- TryCatchExpression --> |
4696 | +<!-- Corresponds to the following XQuery syntax --> |
4697 | +<!-- TryCatchExpression ::= TryClause CatchClause+ --> |
4698 | +<!-- TryClause ::= "{" TryTargetExpr "}" --> |
4699 | +<!-- TryTargetExpr ::= Expr --> |
4700 | + <xsd:complexType name="tryCatchExpr"> |
4701 | + <xsd:complexContent> |
4702 | + <xsd:extension base="expr"> |
4703 | + <xsd:sequence> |
4704 | + <xsd:element name="tryClause" type="exprWrapper"/> |
4705 | + <xsd:element ref="catchClause" maxOccurs="unbounded"/> |
4706 | + </xsd:sequence> |
4707 | + </xsd:extension> |
4708 | + </xsd:complexContent> |
4709 | + </xsd:complexType> |
4710 | + |
4711 | + <xsd:element name="tryCatchExpr" type="tryCatchExpr" |
4712 | + substitutionGroup="expr"/> |
4713 | + |
4714 | + |
4715 | +<!-- CatchClause (part of the TryCatchExpression) --> |
4716 | +<!-- Corresponds to the following XQuery syntax --> |
4717 | +<!-- CatchClause ::= "catch" CatchErrorList "{" Expr "}" --> |
4718 | + <xsd:complexType name="catchClause"> |
4719 | + <xsd:sequence> |
4720 | + <xsd:element ref="catchErrorList"/> |
4721 | + <xsd:element name="catchExpr" type="exprWrapper"/> |
4722 | + </xsd:sequence> |
4723 | + </xsd:complexType> |
4724 | + |
4725 | + <xsd:element name="catchClause" type="catchClause"/> |
4726 | + |
4727 | + |
4728 | +<!-- CatchErrorList (part of the TryCatchExpression) --> |
4729 | +<!-- Corresponds to the following XQuery syntax --> |
4730 | +<!-- CatchErrorList ::= NameTest ( "|" NameTest )* --> |
4731 | +<!-- (remembering that NameTest is either QName or Wildcard) --> |
4732 | + <xsd:complexType name="catchErrorList"> |
4733 | + <xsd:sequence maxOccurs="unbounded"> |
4734 | + <xsd:choice> |
4735 | + <xsd:element ref="nameTest"/> |
4736 | + <xsd:element ref="Wildcard"/> |
4737 | + </xsd:choice> |
4738 | + </xsd:sequence> |
4739 | + </xsd:complexType> |
4740 | + |
4741 | + <xsd:element name="catchErrorList" type="catchErrorList"/> |
4742 | + |
4743 | + |
4744 | +<!-- instance-of expressions --> |
4745 | + <xsd:complexType name="instanceOfExpr"> |
4746 | + <xsd:complexContent> |
4747 | + <xsd:extension base="expr"> |
4748 | + <xsd:sequence> |
4749 | + <xsd:element name="argExpr" type="exprWrapper"/> |
4750 | + <xsd:element ref="sequenceType"/> |
4751 | + </xsd:sequence> |
4752 | + </xsd:extension> |
4753 | + </xsd:complexContent> |
4754 | + </xsd:complexType> |
4755 | + |
4756 | + <xsd:element name="instanceOfExpr" type="instanceOfExpr" |
4757 | + substitutionGroup="expr"/> |
4758 | + |
4759 | + |
4760 | +<!-- treat-as expressions --> |
4761 | + <xsd:complexType name="treatExpr"> |
4762 | + <xsd:complexContent> |
4763 | + <xsd:extension base="expr"> |
4764 | + <xsd:sequence> |
4765 | + <xsd:element name="argExpr" type="exprWrapper"/> |
4766 | + <xsd:element ref="sequenceType"/> |
4767 | + </xsd:sequence> |
4768 | + </xsd:extension> |
4769 | + </xsd:complexContent> |
4770 | + </xsd:complexType> |
4771 | + |
4772 | + <xsd:element name="treatExpr" type="treatExpr" |
4773 | + substitutionGroup="expr"/> |
4774 | + |
4775 | + |
4776 | +<!-- castable and cast expressions --> |
4777 | + <xsd:complexType name="castableExpr"> |
4778 | + <xsd:complexContent> |
4779 | + <xsd:extension base="expr"> |
4780 | + <xsd:sequence> |
4781 | + <xsd:element name="argExpr" type="exprWrapper"/> |
4782 | + <xsd:element ref="singleType"/> |
4783 | + </xsd:sequence> |
4784 | + </xsd:extension> |
4785 | + </xsd:complexContent> |
4786 | + </xsd:complexType> |
4787 | + |
4788 | + <xsd:element name="castableExpr" type="castableExpr" |
4789 | + substitutionGroup="expr"/> |
4790 | + |
4791 | + |
4792 | + <xsd:complexType name="castExpr"> |
4793 | + <xsd:complexContent> |
4794 | + <xsd:extension base="expr"> |
4795 | + <xsd:sequence> |
4796 | + <xsd:element name="argExpr" type="exprWrapper"/> |
4797 | + <xsd:element ref="singleType"/> |
4798 | + </xsd:sequence> |
4799 | + </xsd:extension> |
4800 | + </xsd:complexContent> |
4801 | + </xsd:complexType> |
4802 | + |
4803 | + <xsd:element name="castExpr" type="castExpr" |
4804 | + substitutionGroup="expr"/> |
4805 | + |
4806 | + |
4807 | +<!-- Validate expressions --> |
4808 | + <xsd:simpleType name="validationMode"> |
4809 | + <xsd:restriction base="xsd:NMTOKEN"> |
4810 | + <xsd:enumeration value="lax"/> |
4811 | + <xsd:enumeration value="strict"/> |
4812 | + </xsd:restriction> |
4813 | + </xsd:simpleType> |
4814 | + |
4815 | + <xsd:complexType name="validateExpr"> |
4816 | + <xsd:complexContent> |
4817 | + <xsd:extension base="expr"> |
4818 | + <xsd:sequence> |
4819 | + <xsd:choice> |
4820 | + <xsd:element name="validationMode" type="validationMode" minOccurs="0"/> |
4821 | + <xsd:element name="typeName" type="EQName" minOccurs="0"/> |
4822 | + </xsd:choice> |
4823 | + <xsd:element name="argExpr" type="exprWrapper"/> |
4824 | + </xsd:sequence> |
4825 | + </xsd:extension> |
4826 | + </xsd:complexContent> |
4827 | + </xsd:complexType> |
4828 | + |
4829 | + <xsd:element name="validateExpr" type="validateExpr" |
4830 | + substitutionGroup="expr"/> |
4831 | + |
4832 | + |
4833 | +<!-- Direct constructors. Only elementConstructor for now --> |
4834 | +<!-- Note the absence of constructors corresponding to --> |
4835 | +<!-- the directCommentConstructor and the directPIConstructor --> |
4836 | +<!-- productions in the XQuery grammar. This is because they are --> |
4837 | +<!-- trivially identical to the computed variants --> |
4838 | + |
4839 | +<!-- attributeConstructor is no longer a subclass of expr --> |
4840 | + <xsd:complexType name="attributeConstructor"> |
4841 | + <xsd:sequence> |
4842 | + <xsd:element name="attributeName" type="QName"/> |
4843 | + <xsd:choice> |
4844 | + <xsd:element name="attributeValueExpr" type="exprList"/> |
4845 | + <xsd:element name="attributeValue" type="xsd:string"/> |
4846 | + </xsd:choice> |
4847 | + </xsd:sequence> |
4848 | + </xsd:complexType> |
4849 | + |
4850 | + <xsd:complexType name="namespaceDeclaration"> |
4851 | + <xsd:sequence> |
4852 | + <xsd:element name="prefix" type="xsd:NCName" minOccurs="0"/> |
4853 | + <xsd:element name="uri" type="xsd:string"/> |
4854 | + </xsd:sequence> |
4855 | + </xsd:complexType> |
4856 | + |
4857 | + |
4858 | +<!-- element constructors --> |
4859 | + <xsd:complexType name="attributeList"> |
4860 | + <xsd:sequence> |
4861 | + <xsd:choice maxOccurs="unbounded"> |
4862 | + <xsd:element name="attributeConstructor" type="attributeConstructor"/> |
4863 | + <xsd:element name="namespaceDeclaration" type="namespaceDeclaration"/> |
4864 | + </xsd:choice> |
4865 | + </xsd:sequence> |
4866 | + </xsd:complexType> |
4867 | + |
4868 | + <xsd:element name="attributeList" type="attributeList"/> |
4869 | + |
4870 | + |
4871 | + <xsd:element name="elementContent" type="exprList"/> |
4872 | + |
4873 | + |
4874 | + <xsd:complexType name="elementConstructor"> |
4875 | + <xsd:complexContent> |
4876 | + <xsd:extension base="expr"> |
4877 | + <xsd:sequence> |
4878 | + <xsd:element name="tagName" type="QName"/> |
4879 | + <xsd:element ref="attributeList" minOccurs="0"/> |
4880 | + <xsd:element ref="elementContent" minOccurs="0"/> |
4881 | + </xsd:sequence> |
4882 | + </xsd:extension> |
4883 | + </xsd:complexContent> |
4884 | + </xsd:complexType> |
4885 | + |
4886 | + <xsd:element name="elementConstructor" type="elementConstructor" |
4887 | + substitutionGroup="expr"/> |
4888 | + |
4889 | + |
4890 | +<!-- computed constructors --> |
4891 | +<!-- computed element constructor --> |
4892 | + <xsd:complexType name="computedElementConstructor"> |
4893 | + <xsd:complexContent> |
4894 | + <xsd:extension base="expr"> |
4895 | + <xsd:sequence> |
4896 | + <xsd:choice> |
4897 | + <xsd:element name="tagName" type="EQName"/> |
4898 | + <xsd:element name="tagNameExpr" type="exprWrapper"/> |
4899 | + </xsd:choice> |
4900 | + <xsd:element name="contentExpr" type="exprWrapper" minOccurs="0"/> |
4901 | + </xsd:sequence> |
4902 | + </xsd:extension> |
4903 | + </xsd:complexContent> |
4904 | + </xsd:complexType> |
4905 | + |
4906 | + <xsd:element name="computedElementConstructor" type="computedElementConstructor" |
4907 | + substitutionGroup="expr"/> |
4908 | + |
4909 | + |
4910 | +<!-- computed attribute constructor --> |
4911 | + <xsd:complexType name="computedAttributeConstructor"> |
4912 | + <xsd:complexContent> |
4913 | + <xsd:extension base="expr"> |
4914 | + <xsd:sequence> |
4915 | + <xsd:choice> |
4916 | + <xsd:element name="tagName" type="EQName"/> |
4917 | + <xsd:element name="tagNameExpr" type="exprWrapper"/> |
4918 | + </xsd:choice> |
4919 | + <xsd:element name="valueExpr" type="exprWrapper" minOccurs="0"/> |
4920 | + </xsd:sequence> |
4921 | + </xsd:extension> |
4922 | + </xsd:complexContent> |
4923 | + </xsd:complexType> |
4924 | + |
4925 | + <xsd:element name="computedAttributeConstructor" type="computedAttributeConstructor" |
4926 | + substitutionGroup="expr"/> |
4927 | + |
4928 | + |
4929 | +<!-- computed document constructor --> |
4930 | + <xsd:complexType name="computedDocumentConstructor"> |
4931 | + <xsd:complexContent> |
4932 | + <xsd:extension base="expr"> |
4933 | + <xsd:sequence> |
4934 | + <xsd:element name="argExpr" type="exprWrapper"/> |
4935 | + </xsd:sequence> |
4936 | + </xsd:extension> |
4937 | + </xsd:complexContent> |
4938 | + </xsd:complexType> |
4939 | + |
4940 | + <xsd:element name="computedDocumentConstructor" type="computedDocumentConstructor" |
4941 | + substitutionGroup="expr"/> |
4942 | + |
4943 | + |
4944 | +<!-- computed text constructor --> |
4945 | + <xsd:complexType name="computedTextConstructor"> |
4946 | + <xsd:complexContent> |
4947 | + <xsd:extension base="expr"> |
4948 | + <xsd:sequence> |
4949 | + <xsd:element name="argExpr" type="exprWrapper" minOccurs="0"/> |
4950 | + </xsd:sequence> |
4951 | + </xsd:extension> |
4952 | + </xsd:complexContent> |
4953 | + </xsd:complexType> |
4954 | + |
4955 | + <xsd:element name="computedTextConstructor" type="computedTextConstructor" |
4956 | + substitutionGroup="expr"/> |
4957 | + |
4958 | + |
4959 | +<!-- computed comment constructor --> |
4960 | + <xsd:complexType name="computedCommentConstructor"> |
4961 | + <xsd:complexContent> |
4962 | + <xsd:extension base="expr"> |
4963 | + <xsd:sequence> |
4964 | + <xsd:element name="argExpr" type="exprWrapper"/> |
4965 | + </xsd:sequence> |
4966 | + </xsd:extension> |
4967 | + </xsd:complexContent> |
4968 | + </xsd:complexType> |
4969 | + |
4970 | + <xsd:element name="computedCommentConstructor" type="computedCommentConstructor" |
4971 | + substitutionGroup="expr"/> |
4972 | + |
4973 | + |
4974 | +<!-- computed namespace constructor --> |
4975 | + <xsd:complexType name="computedNamespaceConstructor"> |
4976 | + <xsd:complexContent> |
4977 | + <xsd:extension base="expr"> |
4978 | + <xsd:sequence> |
4979 | + <xsd:choice> |
4980 | + <xsd:element name="prefix" type="xsd:NCName"/> |
4981 | + <xsd:element name="prefixExpr" type="exprWrapper"/> |
4982 | + </xsd:choice> |
4983 | + <xsd:element name="URIExpr" type="exprWrapper" minOccurs="0"/> |
4984 | + </xsd:sequence> |
4985 | + </xsd:extension> |
4986 | + </xsd:complexContent> |
4987 | + </xsd:complexType> |
4988 | + |
4989 | + <xsd:element name="computedNamespaceConstructor" type="computedNamespaceConstructor" |
4990 | + substitutionGroup="expr"/> |
4991 | + |
4992 | + |
4993 | +<!-- computed processing instruction constructor --> |
4994 | + <xsd:complexType name="computedPIConstructor"> |
4995 | + <xsd:complexContent> |
4996 | + <xsd:extension base="expr"> |
4997 | + <xsd:sequence> |
4998 | + <xsd:choice> |
4999 | + <xsd:element name="piTarget" type="xsd:NCName"/> |
5000 | + <xsd:element name="piTargetExpr" type="exprWrapper"/> |
Validation queue starting for merge proposal. zorbatest. lambda. nu:8080/ remotequeue/ jsoniq- plan_serializat ion-2012- 04-17T10- 36-14.691Z/ log.html
Log at: http://