← Back to team overview

zorba-coders team mailing list archive

[Merge] lp:~zorba-coders/zorba/bug-882320-functx into lp:zorba

 

Chris Hillery has proposed merging lp:~zorba-coders/zorba/bug-882320-functx into lp:zorba.

Commit message:
Remove trailing / from FunctX module namespace URI.

Requested reviews:
  Sorin Marian Nasoi (sorin.marian.nasoi)
  Chris Hillery (ceejatec)
Related bugs:
  Bug #882320 in Zorba: "functx namespace is wrong, it should not end with slash '/'"
  https://bugs.launchpad.net/zorba/+bug/882320

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-882320-functx/+merge/179346


-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-882320-functx/+merge/179346
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'doc/code/headers_svg/zorba_headers_dependencies.xqi'
--- doc/code/headers_svg/zorba_headers_dependencies.xqi	2013-02-07 17:24:36 +0000
+++ doc/code/headers_svg/zorba_headers_dependencies.xqi	2013-08-09 07:44:32 +0000
@@ -22,7 +22,7 @@
 import module namespace file = "http://expath.org/ns/file";;
 import module namespace dot = "http://www.zorba-xquery.com/modules/image/graphviz";;
 import module namespace html = "http://www.zorba-xquery.com/modules/converters/html";;
-import module namespace functx = "http://www.functx.com/";;
+import module namespace functx = "http://www.functx.com";;
 
 declare namespace an = "http://www.zorba-xquery.com/annotations";;
 

=== modified file 'doc/zorba/xqdoc/src/zorba_module_dependencies.xqy'
--- doc/zorba/xqdoc/src/zorba_module_dependencies.xqy	2013-06-15 20:57:44 +0000
+++ doc/zorba/xqdoc/src/zorba_module_dependencies.xqy	2013-08-09 07:44:32 +0000
@@ -24,7 +24,7 @@
 declare namespace zm = "http://www.zorba-xquery.com/manifest";;
 
 import module namespace file        = "http://expath.org/ns/file";;
-import module namespace functx      = "http://www.functx.com/";;
+import module namespace functx      = "http://www.functx.com";;
 
 import module namespace dot   = "http://www.zorba-xquery.com/modules/image/graphviz";;
 import module namespace xqd   = "http://www.zorba-xquery.com/modules/xqdoc";;

=== modified file 'modules/com/zorba-xquery/www/modules/xqdoc/batch.xq'
--- modules/com/zorba-xquery/www/modules/xqdoc/batch.xq	2013-08-06 14:15:41 +0000
+++ modules/com/zorba-xquery/www/modules/xqdoc/batch.xq	2013-08-09 07:44:32 +0000
@@ -26,7 +26,7 @@
  :)
 module namespace batch = "http://www.zorba-xquery.com/modules/xqdoc/batch";;
 
-import module namespace functx = "http://www.functx.com/";;
+import module namespace functx = "http://www.functx.com";;
 
 import module namespace file = "http://expath.org/ns/file";;
 

=== modified file 'modules/functx/CMakeLists.txt'
--- modules/functx/CMakeLists.txt	2013-02-07 17:24:36 +0000
+++ modules/functx/CMakeLists.txt	2013-08-09 07:44:32 +0000
@@ -12,4 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-DECLARE_ZORBA_MODULE(FILE functx.xq URI "http://www.functx.com/";)
+DECLARE_ZORBA_MODULE(FILE functx.xq URI "http://www.functx.com";)

=== modified file 'modules/functx/functx.xq'
--- modules/functx/functx.xq	2013-06-15 20:57:44 +0000
+++ modules/functx/functx.xq	2013-08-09 07:44:32 +0000
@@ -27,7 +27,7 @@
  : @see     http://www.xqueryfunctions.com
  : @project FunctX
  :) 
-module namespace  functx = "http://www.functx.com/"; ;
+module namespace  functx = "http://www.functx.com"; ;
 
 (:~
  : Adds attributes to XML elements 

=== modified file 'scripts/sanity_checks/conformance_xqftts.xqi'
--- scripts/sanity_checks/conformance_xqftts.xqi	2013-02-07 17:24:36 +0000
+++ scripts/sanity_checks/conformance_xqftts.xqi	2013-08-09 07:44:32 +0000
@@ -19,7 +19,7 @@
 module namespace conf  = "http://www.zorba-xquery.com/modules/conformance";;
 
 import module namespace file = "http://expath.org/ns/file";;
-import module namespace functx = "http://www.functx.com/";;
+import module namespace functx = "http://www.functx.com";;
 
 import module namespace dml = "http://www.zorba-xquery.com/modules/store/static/collections/dml";;
 import module namespace ddl = "http://www.zorba-xquery.com/modules/store/static/collections/ddl";;

=== modified file 'scripts/sanity_checks/conformance_xqts.xqi'
--- scripts/sanity_checks/conformance_xqts.xqi	2013-02-07 17:24:36 +0000
+++ scripts/sanity_checks/conformance_xqts.xqi	2013-08-09 07:44:32 +0000
@@ -19,7 +19,7 @@
 module namespace conf  = "http://www.zorba-xquery.com/modules/conformance";;
 
 import module namespace file = "http://expath.org/ns/file";;
-import module namespace functx = "http://www.functx.com/";;
+import module namespace functx = "http://www.functx.com";;
 
 import module namespace dml = "http://www.zorba-xquery.com/modules/store/static/collections/dml";;
 import module namespace ddl = "http://www.zorba-xquery.com/modules/store/static/collections/ddl";;

=== modified file 'scripts/sanity_checks/conformance_xquts.xqi'
--- scripts/sanity_checks/conformance_xquts.xqi	2013-02-07 17:24:36 +0000
+++ scripts/sanity_checks/conformance_xquts.xqi	2013-08-09 07:44:32 +0000
@@ -19,7 +19,7 @@
 module namespace conf  = "http://www.zorba-xquery.com/modules/conformance";;
 
 import module namespace file = "http://expath.org/ns/file";;
-import module namespace functx = "http://www.functx.com/";;
+import module namespace functx = "http://www.functx.com";;
 
 import module namespace dml = "http://www.zorba-xquery.com/modules/store/static/collections/dml";;
 import module namespace ddl = "http://www.zorba-xquery.com/modules/store/static/collections/ddl";;

=== modified file 'src/context/default_uri_mappers.cpp'
--- src/context/default_uri_mappers.cpp	2013-08-02 21:35:01 +0000
+++ src/context/default_uri_mappers.cpp	2013-08-09 07:44:32 +0000
@@ -68,8 +68,13 @@
   URI lUri(aUri);
   zstring lPath = lUri.get_encoded_path();
   bool lChanged = false;
+  if (lPath.length() == 0) {
+    // If URI has *no* path component (eg. "http://www.functx.com"; with no
+    // trailing slash), provide a path of "/".
+    lPath.append("/");
+  }
   if (ascii::ends_with(lPath, "/")) {
-    // If URI ends with /, append "index.<extension>".
+    // If URI's path component ends with /, append "index.<extension>".
     lPath.append("index");
     lPath.append(lExtension);
     lChanged = true;

=== modified file 'test/fots_driver/fots-driver.xq'
--- test/fots_driver/fots-driver.xq	2013-08-07 08:08:22 +0000
+++ test/fots_driver/fots-driver.xq	2013-08-09 07:44:32 +0000
@@ -23,7 +23,7 @@
   "http://www.zorba-xquery.com/fots-driver";;
 
 import module namespace functx =
-  "http://www.functx.com/";;
+  "http://www.functx.com";;
 
 import module namespace datetime  =
   "http://www.zorba-xquery.com/modules/datetime";;

=== modified file 'test/fots_driver/reporting.xq'
--- test/fots_driver/reporting.xq	2013-08-06 01:09:07 +0000
+++ test/fots_driver/reporting.xq	2013-08-09 07:44:32 +0000
@@ -32,7 +32,7 @@
 import module namespace fots-err =
   "http://www.zorba-xquery.com/fots-driver/errors"; at "errors.xq";
 import module namespace functx =
-  "http://www.functx.com/";;
+  "http://www.functx.com";;
 
 declare namespace err =
   "http://www.w3.org/2005/xqt-errors";;

=== modified file 'test/rbkt/ExpQueryResults/zorba/xqdoc/collindex.xml.res'
--- test/rbkt/ExpQueryResults/zorba/xqdoc/collindex.xml.res	2012-09-24 08:06:53 +0000
+++ test/rbkt/ExpQueryResults/zorba/xqdoc/collindex.xml.res	2013-08-09 07:44:32 +0000
@@ -12,7 +12,7 @@
       <xqdoc:namespace prefix="cil" uri="http://www.zorba-xquery.com/collindex"; isSchema="false"/>
       <xqdoc:namespace prefix="ddl" uri="http://www.zorba-xquery.com/modules/store/static/collections/ddl"; isSchema="false"/>
       <xqdoc:namespace prefix="dml" uri="http://www.zorba-xquery.com/modules/store/static/collections/dml"; isSchema="false"/>
-      <xqdoc:namespace prefix="functx" uri="http://www.functx.com/"; isSchema="false"/>
+      <xqdoc:namespace prefix="functx" uri="http://www.functx.com"; isSchema="false"/>
       <xqdoc:namespace prefix="idml" uri="http://www.zorba-xquery.com/modules/store/static/indexes/dml"; isSchema="false"/>
       <xqdoc:namespace prefix="req" uri="http://www.28msec.com/modules/http/request"; isSchema="false"/>
       <xqdoc:namespace prefix="resp" uri="http://www.28msec.com/modules/http/response"; isSchema="false"/>
@@ -20,7 +20,7 @@
   </xqdoc:module>
   <xqdoc:imports>
     <xqdoc:import type="library">
-      <xqdoc:uri>http://www.functx.com/</xqdoc:uri>
+      <xqdoc:uri>http://www.functx.com</xqdoc:uri>
     </xqdoc:import>
     <xqdoc:import type="library">
       <xqdoc:uri>http://www.28msec.com/modules/http/request</xqdoc:uri>

=== modified file 'test/rbkt/Queries/zorba/functx/substring-before-last.xq'
--- test/rbkt/Queries/zorba/functx/substring-before-last.xq	2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/functx/substring-before-last.xq	2013-08-09 07:44:32 +0000
@@ -1,3 +1,3 @@
-import module namespace functx = "http://www.functx.com/";;
+import module namespace functx = "http://www.functx.com";;
 
 functx:substring-before-last('abc-def-ghi', '-')
\ No newline at end of file

=== modified file 'test/rbkt/Queries/zorba/spec/xquery_1_0.xq'
--- test/rbkt/Queries/zorba/spec/xquery_1_0.xq	2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/spec/xquery_1_0.xq	2013-08-09 07:44:32 +0000
@@ -3,7 +3,7 @@
 import module namespace util = "http://www.zorba-xquery.com/util"; at "xquery_spec.xqi";
 
 import module namespace sctx = "http://www.zorba-xquery.com/modules/introspection/sctx";;
-import module namespace functx = "http://www.functx.com/";;
+import module namespace functx = "http://www.functx.com";;
 
 declare variable $xquery_version as xs:string := "1.0";
 

=== modified file 'test/rbkt/Queries/zorba/spec/xquery_3_0.xq'
--- test/rbkt/Queries/zorba/spec/xquery_3_0.xq	2012-02-01 09:29:01 +0000
+++ test/rbkt/Queries/zorba/spec/xquery_3_0.xq	2013-08-09 07:44:32 +0000
@@ -3,7 +3,7 @@
 import module namespace util = "http://www.zorba-xquery.com/util"; at "xquery_spec.xqi";
 
 import module namespace sctx = "http://www.zorba-xquery.com/modules/introspection/sctx";;
-import module namespace functx = "http://www.functx.com/";;
+import module namespace functx = "http://www.functx.com";;
 import module namespace file = "http://expath.org/ns/file";;
 
 import schema namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";;

=== modified file 'test/rbkt/Queries/zorba/string/AnalyzeString/http-client-doc.htm'
--- test/rbkt/Queries/zorba/string/AnalyzeString/http-client-doc.htm	2013-08-07 23:46:25 +0000
+++ test/rbkt/Queries/zorba/string/AnalyzeString/http-client-doc.htm	2013-08-09 07:44:32 +0000
@@ -694,7 +694,7 @@
               <span>www.functx.com</span>
               <ul>
                 <li>
-                  <a href="www.functx.com_index.html" title="http://www.functx.com/";>functx</a>
+                  <a href="www.functx.com_index.html" title="http://www.functx.com";>functx</a>
                   <sup>
                     <img src="images/ZCsmall.gif" alt="ZC" title="This module is part of Zorba core." />
                   </sup>

=== modified file 'test/rbkt/Queries/zorba/xqddf/test5.xqlib'
--- test/rbkt/Queries/zorba/xqddf/test5.xqlib	2013-02-07 17:24:36 +0000
+++ test/rbkt/Queries/zorba/xqddf/test5.xqlib	2013-08-09 07:44:32 +0000
@@ -1,6 +1,6 @@
 module namespace guestbook = "http://www.28msec.com/guestbook";;
 
-import module namespace functx = "http://www.functx.com/";;
+import module namespace functx = "http://www.functx.com";;
 
 import module namespace db = "http://www.zorba-xquery.com/modules/store/static/collections/dml";;
 

=== modified file 'test/rbkt/Queries/zorba/xqdoc/collindex.xqlib'
--- test/rbkt/Queries/zorba/xqdoc/collindex.xqlib	2012-09-24 07:30:21 +0000
+++ test/rbkt/Queries/zorba/xqdoc/collindex.xqlib	2013-08-09 07:44:32 +0000
@@ -4,7 +4,7 @@
 
 module namespace cil = "http://www.zorba-xquery.com/collindex";;
 
-import module namespace functx = "http://www.functx.com/";;
+import module namespace functx = "http://www.functx.com";;
 
 import module namespace req = "http://www.28msec.com/modules/http/request";;
 import module namespace resp = "http://www.28msec.com/modules/http/response";;

=== modified file 'test/rbkt/Queries/zorba/xqdoc/moduleDocumentation.xq'
--- test/rbkt/Queries/zorba/xqdoc/moduleDocumentation.xq	2013-08-07 05:28:39 +0000
+++ test/rbkt/Queries/zorba/xqdoc/moduleDocumentation.xq	2013-08-09 07:44:32 +0000
@@ -62,7 +62,7 @@
           return string-join(
              if(($moduleUri = "http://www.w3.org/2005/xpath-functions";) or
                 ($moduleUri = "http://www.w3.org/2005/xpath-functions/math";) or
-                ($moduleUri = "http://www.functx.com/";) or
+                ($moduleUri = "http://www.functx.com";) or
                 ($moduleUri = "http://www.w3.org/2005/xqt-errors";) or
                 ($moduleUri = "http://zorba.io/errors";) or
                 ($moduleUri = "http://zorba.io/warnings";) or
@@ -118,7 +118,7 @@
     (: Test for explicit XQuery Version :)
     if(($moduleUri = "http://www.w3.org/2005/xpath-functions";) or
        ($moduleUri = "http://www.w3.org/2005/xpath-functions/math";) or
-       ($moduleUri = "http://www.functx.com/";)) then ()
+       ($moduleUri = "http://www.functx.com";)) then ()
     else
       if (fn:not($hasXQueryVersion)) then
       fn:concat("

=== modified file 'test/rbkt/Queries/zorba/xqxq/query-plan2.xq'
--- test/rbkt/Queries/zorba/xqxq/query-plan2.xq	2013-03-22 23:09:40 +0000
+++ test/rbkt/Queries/zorba/xqxq/query-plan2.xq	2013-08-09 07:44:32 +0000
@@ -5,7 +5,7 @@
 declare namespace f = "http://www.zorba-xquery.com/features";;
 
 declare function resolver:url-resolver($namespace as xs:string, $entity as xs:string) {
-  if($namespace = 'http://test.xq')
+  if($namespace = 'http://test')
   then "module namespace test = 'http://test'; declare function test:foo(){'foo'};"
   else ()
 };

=== modified file 'test/rbkt/Queries/zorba/xqxq/url-module-resolver.xq'
--- test/rbkt/Queries/zorba/xqxq/url-module-resolver.xq	2013-03-13 21:14:37 +0000
+++ test/rbkt/Queries/zorba/xqxq/url-module-resolver.xq	2013-08-09 07:44:32 +0000
@@ -5,7 +5,7 @@
 declare namespace f = "http://www.zorba-xquery.com/features";;
 
 declare function resolver:url-resolver($namespace as xs:string, $entity as xs:string) {
-  if($namespace = 'http://test.xq')
+  if($namespace = 'http://test')
   then "module namespace test = 'http://test'; declare function test:foo(){'foo'};"
   else ()
 };

=== modified file 'test/zperf/src/timings.xq'
--- test/zperf/src/timings.xq	2013-02-07 17:24:36 +0000
+++ test/zperf/src/timings.xq	2013-08-09 07:44:32 +0000
@@ -16,7 +16,7 @@
 
 module namespace tims = 'http://www.example.com/timings';
 
-import module namespace functx = "http://www.functx.com/";; 
+import module namespace functx = "http://www.functx.com";; 
 
 declare namespace pdash = "http://www.28msec.com/pdash";;
 


References