diff -Nru zorba-1.4.0/bin/zorbacmd.cpp zorba-1.4.2/bin/zorbacmd.cpp --- zorba-1.4.0/bin/zorbacmd.cpp 2010-07-14 13:23:16.000000000 +0000 +++ zorba-1.4.2/bin/zorbacmd.cpp 2010-12-30 23:38:20.000000000 +0000 @@ -560,8 +560,12 @@ if (properties.noSerializer()) query->executeSAX(); - else + else { query->execute(outputStream, &lSerOptions); + if (properties.trailingNl()) { + outputStream << std::endl; + } + } timing.stopTimer(TimingInfo::EXEC_TIMER, i); @@ -675,8 +679,12 @@ { if (properties.noSerializer ()) query->executeSAX (); - else + else { query->execute(outputStream, &lSerOptions); + if (properties.trailingNl()) { + outputStream << std::endl; + } + } } } catch (zorba::QueryException& qe) diff -Nru zorba-1.4.0/bin/zorbacmdproperties_base.h zorba-1.4.2/bin/zorbacmdproperties_base.h --- zorba-1.4.0/bin/zorbacmdproperties_base.h 2010-07-14 13:23:16.000000000 +0000 +++ zorba-1.4.2/bin/zorbacmdproperties_base.h 2010-12-30 23:38:20.000000000 +0000 @@ -33,7 +33,7 @@ class ZorbaCMDPropertiesBase : public ::zorba::PropertiesBase { protected: const char **get_all_options () const { - 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-ports", "--debug", "--debug-server", "--debug-server-host", "--no-colors", "--no-logo", "--timeout", "--module-path", "--install-path", NULL }; + 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-ports", "--debug", "--debug-server", "--debug-server-host", "--no-colors", "--no-logo", "--timeout", "--module-path", "--install-path", "--trailing-nl", NULL }; return result; } bool theTiming; @@ -70,6 +70,7 @@ long theTimeout; std::string theModulePath; std::string theInstallPath; + bool theTrailingNl; void initialize () { theTiming = false; @@ -93,6 +94,7 @@ theNoColors = false; theNoLogo = false; theTimeout = -1; + theTrailingNl = false; } public: const bool &timing () const { return theTiming; } @@ -129,6 +131,7 @@ const long &timeout () const { return theTimeout; } const std::string &modulePath () const { return theModulePath; } const std::string &installPath () const { return theInstallPath; } + const bool &trailingNl () const { return theTrailingNl; } std::string load_argv (int argc, const char **argv) { if (argv == NULL) return ""; @@ -275,6 +278,9 @@ if ((*argv) [1] == '-' || (*argv) [2] == '\0') { d = 0; ++argv; } if (*argv == NULL) { result = "No value given for --install-path option"; break; } init_val (*argv, theInstallPath, d); } + else if (strcmp (*argv, "--trailing-nl") == 0) { + theTrailingNl = true; + } else if (strcmp (*argv, "--") == 0) { copy_args (++argv); break; @@ -325,6 +331,7 @@ "--timeout\nSpecify a timeout in seconds. After the specified time, the execution of the query will be aborted.\n\n" "--module-path\nModule paths added to the built-in resolver, i.e. where module imports are looking for modules.\n\n" "--install-path\nThe path where the modules are searched.\n\n" +"--trailing-nl\nOutput a trailing newline after the result of the query.\n\n" ; } diff -Nru zorba-1.4.0/bin/zorbacmdproperties.txt zorba-1.4.2/bin/zorbacmdproperties.txt --- zorba-1.4.0/bin/zorbacmdproperties.txt 2010-07-14 13:23:16.000000000 +0000 +++ zorba-1.4.2/bin/zorbacmdproperties.txt 2010-12-30 23:38:20.000000000 +0000 @@ -32,3 +32,4 @@ ("timeout", po::value()->default_value(-1), "Specify a timeout in seconds. After the specified time, the execution of the query will be aborted.") ("module-path", po::value(), "Module paths added to the built-in resolver, i.e. where module imports are looking for modules.") ("install-path", po::value(), "The path where the modules are searched.") +("trailing-nl", "Output a trailing newline after the result of the query.") diff -Nru zorba-1.4.0/ChangeLog zorba-1.4.2/ChangeLog --- zorba-1.4.0/ChangeLog 2010-07-14 13:23:17.000000000 +0000 +++ zorba-1.4.2/ChangeLog 2010-12-30 23:38:20.000000000 +0000 @@ -1,4 +1,10 @@ Zorba - The XQuery Processor +version 1.4.2 + * fix for building the static library (i.e. using the ZORBA_BUILD_STATIC_LIBRARY option). + * added the --trailing-nl option to the command-line interface that allows the user to specify whether a trailing newline should be added to the output or not. + * fixed the built-in search path for modules on Unix (/usr/local/include/zorba/modules instead of /usr/local/include/modules) + * fixed handling of PIs with no data + version 1.4 * added a datetime library module with nondeterministic functions * new nondeterministic read functions in the http-client module diff -Nru zorba-1.4.0/CMakeLists.txt zorba-1.4.2/CMakeLists.txt --- zorba-1.4.0/CMakeLists.txt 2010-07-14 13:23:16.000000000 +0000 +++ zorba-1.4.2/CMakeLists.txt 2010-12-30 23:38:20.000000000 +0000 @@ -388,7 +388,7 @@ # zorba versioning SET(ZORBA_MAJOR_NUMBER "1") SET(ZORBA_MINOR_NUMBER "4") -SET(ZORBA_PATCH_NUMBER "0") +SET(ZORBA_PATCH_NUMBER "2") CONFIGURE_FILE ( "${CMAKE_SOURCE_DIR}/zorba.spec.in" "${CMAKE_BINARY_DIR}/zorba.spec" @ONLY ) diff -Nru zorba-1.4.0/debian/changelog zorba-1.4.2/debian/changelog --- zorba-1.4.0/debian/changelog 2010-12-30 23:38:18.000000000 +0000 +++ zorba-1.4.2/debian/changelog 2010-12-30 23:38:20.000000000 +0000 @@ -1,7 +1,7 @@ -zorba (1.4.0-0cezar1.1) karmic; urgency=low +zorba (1.4.2-0cezar2) karmic; urgency=low - * Official zorba-1.4.0 Release. + * Official zorba-1.4.2 Release. * no other changes. * changed deb binary lib version dependencys - -- Cezar Cristian Andrei Tue, 3 August 2010 15:02:00 -0600 + -- Cezar Cristian Andrei Thu, 30 December 2010 17:00:00 -0600 diff -Nru zorba-1.4.0/debian/copyright zorba-1.4.2/debian/copyright --- zorba-1.4.0/debian/copyright 2010-12-30 23:38:18.000000000 +0000 +++ zorba-1.4.2/debian/copyright 2010-12-30 23:38:20.000000000 +0000 @@ -1,12 +1,11 @@ This package was debianized by Cezar Cristian Andrei on -Tue, 3 August 2010 15:02:00 -0600. +Thu, 30 December 2010 11:00:00 -0600. It was downloaded from http://zorbaxquery.org Upstream Author(s): Cezar Andrei cezar.andrei@gmail.com - Vinayak Borkar vborky@yahoo.com Matthias Brantner brantner@m-brantner.de Nicolae Brinza nbrinza@gmail.com William Candillon wcandillon@gmail.com @@ -14,13 +13,9 @@ David Graf davidagraf@gmail.com Dennis Knochenwefel dennis.knochenwefel@28msec.com Donald Kossmann donaldk@inf.ethz.ch - Paul Kunz paulfkunz@gmail.com Tim Kraska tim.kraska@inf.ethz.ch - Dan Muresan danmbox@gmail.com Sorin Nasoi spungi@gmail.com - Paul Pedersen Gabriel Petrovay gabipetrovay@gmail.com - Sam Rehman Daniel Turcanu Daniel.Turcanu@enea.com Markos Zaharioudakis markos_za@yahoo.com diff -Nru zorba-1.4.0/scripts/create-doc-tar.sh.in zorba-1.4.2/scripts/create-doc-tar.sh.in --- zorba-1.4.0/scripts/create-doc-tar.sh.in 2010-07-14 13:23:17.000000000 +0000 +++ zorba-1.4.2/scripts/create-doc-tar.sh.in 2010-12-30 23:38:20.000000000 +0000 @@ -11,6 +11,7 @@ mkdir /tmp/zorba-$ZORBA_VERSION/python mkdir /tmp/zorba-$ZORBA_VERSION/ruby mkdir /tmp/zorba-$ZORBA_VERSION/php + mkdir /tmp/zorba-$ZORBA_VERSION/java cp -r @CMAKE_BINARY_DIR@/doc/zorba/html /tmp/zorba-$ZORBA_VERSION/zorba/html cp -r @CMAKE_BINARY_DIR@/doc/zorba/xqdoc/xhtml /tmp/zorba-$ZORBA_VERSION/zorba/xqdoc/xhtml cp -r @CMAKE_BINARY_DIR@/doc/c/html /tmp/zorba-$ZORBA_VERSION/c/html @@ -18,5 +19,6 @@ cp -r @CMAKE_BINARY_DIR@/doc/python/html /tmp/zorba-$ZORBA_VERSION/python/html cp -r @CMAKE_BINARY_DIR@/doc/ruby/html /tmp/zorba-$ZORBA_VERSION/ruby/html cp -r @CMAKE_BINARY_DIR@/doc/php/html /tmp/zorba-$ZORBA_VERSION/php/html + cp -r @CMAKE_BINARY_DIR@/doc/java/html /tmp/zorba-$ZORBA_VERSION/java/html tar cvfz @CMAKE_BINARY_DIR@/doc/zorba-$ZORBA_VERSION.tar.gz /tmp/zorba-$ZORBA_VERSION rm -R /tmp/zorba-$ZORBA_VERSION diff -Nru zorba-1.4.0/src/CMakeLists.txt zorba-1.4.2/src/CMakeLists.txt --- zorba-1.4.0/src/CMakeLists.txt 2010-07-14 13:23:17.000000000 +0000 +++ zorba-1.4.2/src/CMakeLists.txt 2010-12-30 23:38:20.000000000 +0000 @@ -166,6 +166,9 @@ # Build the Zorba STATIC library # IF (ZORBA_BUILD_STATIC_LIBRARY) + # Set the ar append flag to "q" instead of "r", which could create incomplete archives by replacing the files with the same names + SET(CMAKE_C_ARCHIVE_APPEND " q ") + SET(CMAKE_CXX_ARCHIVE_APPEND " q ") ADD_LIBRARY(zorba_${ZORBA_STORE_NAME}_static STATIC ${ZORBA_SRCS} ${STORE_SRCS}) LIST(APPEND ZORBA_LIBRARY_INSTALL_LIST zorba_${ZORBA_STORE_NAME}_static) diff -Nru zorba-1.4.0/src/context/root_static_context_init.cpp.in zorba-1.4.2/src/context/root_static_context_init.cpp.in --- zorba-1.4.0/src/context/root_static_context_init.cpp.in 2010-07-14 13:23:17.000000000 +0000 +++ zorba-1.4.2/src/context/root_static_context_init.cpp.in 2010-12-30 23:38:20.000000000 +0000 @@ -7,7 +7,7 @@ "@CMAKE_BINARY_DIR@/modules/", "@CMAKE_SOURCE_DIR@/modules/", #ifndef WIN32 - "@CMAKE_INSTALL_PREFIX@/include/modules/", + "@CMAKE_INSTALL_PREFIX@/include/zorba/modules/", #else "C:/Program Files/Zorba XQuery Processor @ZORBA_MAJOR_NUMBER@.@ZORBA_MINOR_NUMBER@.@ZORBA_PATCH_NUMBER@/include/zorba/modules/", #endif diff -Nru zorba-1.4.0/src/store/naive/loader_fast.cpp zorba-1.4.2/src/store/naive/loader_fast.cpp --- zorba-1.4.0/src/store/naive/loader_fast.cpp 2010-07-14 13:23:17.000000000 +0000 +++ zorba-1.4.2/src/store/naive/loader_fast.cpp 2010-12-30 23:38:20.000000000 +0000 @@ -953,7 +953,10 @@ try { - xqpStringStore_t content = new xqpStringStore(reinterpret_cast(data)); + xqpStringStore_t content(new xqpStringStore("")); + if (data) + content = new xqpStringStore(reinterpret_cast(data)); + xqpStringStore_t target = new xqpStringStore(reinterpret_cast(targetp)); XmlNode* piNode diff -Nru zorba-1.4.0/test/rbkt/CMakeLists.txt zorba-1.4.2/test/rbkt/CMakeLists.txt --- zorba-1.4.0/test/rbkt/CMakeLists.txt 2010-07-14 13:23:17.000000000 +0000 +++ zorba-1.4.2/test/rbkt/CMakeLists.txt 2010-12-30 23:38:20.000000000 +0000 @@ -89,8 +89,9 @@ ADD_EXECUTABLE(testdriver_mt ${TESTDRIVER_MT_SRCS}) TARGET_LINK_LIBRARIES(testdriver_mt zorba_simplestore boost_filesystem-mt ${Boost_system_lib}) + IF (ZORBA_BUILD_STATIC_LIBRARY) - ADD_EXECUTABLE(testdriver_mt_static testdriver_mt.cpp) + ADD_EXECUTABLE(testdriver_mt_static ${TESTDRIVER_MT_SRCS}) SET_TARGET_PROPERTIES(testdriver_mt_static PROPERTIES COMPILE_DEFINITIONS BUILDING_ZORBA_STATIC) TARGET_LINK_LIBRARIES(testdriver_mt_static diff -Nru zorba-1.4.0/test/rbkt/Queries/zorba/xqdoc/moduleDocumentation.xq zorba-1.4.2/test/rbkt/Queries/zorba/xqdoc/moduleDocumentation.xq --- zorba-1.4.0/test/rbkt/Queries/zorba/xqdoc/moduleDocumentation.xq 2010-07-14 13:23:17.000000000 +0000 +++ zorba-1.4.2/test/rbkt/Queries/zorba/xqdoc/moduleDocumentation.xq 2010-12-30 23:38:20.000000000 +0000 @@ -66,7 +66,7 @@ else (), (: Test for documented parameters :) - if ($docParamCount ne $paramCount) then + if ($docParamCount ne $paramCount and not($module/xqdoc:uri eq "http://www.w3.org/2005/xpath-functions")) then concat("ERROR: ", $missing, " parameter(s) not documented Module: ", $module/xqdoc:uri, " Function: ", $function/xqdoc:name, "