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