From a76bdce5a554c0a0db2020e8add9d2bf6f011f26 Mon Sep 17 00:00:00 2001 From: Joe Wicentowski Date: Fri, 11 Jun 2021 16:57:06 -0400 Subject: [PATCH 1/3] Switch from shared-resources to templating --- pom.xml | 2 +- src/main/xar-resources/controller.xql | 15 --------------- .../data/repo/listings/listing-1.xml | 6 +++--- .../data/repo/listings/listing-2.xml | 2 +- .../data/templating/listings/listing-14.xml | 2 +- src/main/xar-resources/error-page.html | 3 --- src/main/xar-resources/modules/app.xql | 2 +- src/main/xar-resources/modules/config.xqm | 2 +- src/main/xar-resources/modules/docbook.xql | 2 +- src/main/xar-resources/modules/search.xql | 2 +- src/main/xar-resources/modules/view.xql | 4 ++-- src/main/xar-resources/templates/page.html | 4 ++-- xar-assembly.xml | 2 +- 13 files changed, 15 insertions(+), 33 deletions(-) diff --git a/pom.xml b/pom.xml index b944332d..779cff08 100644 --- a/pom.xml +++ b/pom.xml @@ -49,7 +49,7 @@ 1.8 5.3.0-SNAPSHOT - 0.8.4 + 1.0.2 v14.17.0 6.14.13 diff --git a/src/main/xar-resources/controller.xql b/src/main/xar-resources/controller.xql index 3da4e2d3..f4750229 100755 --- a/src/main/xar-resources/controller.xql +++ b/src/main/xar-resources/controller.xql @@ -97,21 +97,6 @@ else - - (: Anything with /$shared/ in it points to the eXist main shared-resources app: :) - else - if (contains($exist:path, "/$shared/")) then - - - - - (: Shared images, css, etc. are contained in the top /resources/ collection. :) - (:else - if (starts-with($exist:path, "/resources/")) then - - - :) - (: Final catch-all: :) else diff --git a/src/main/xar-resources/data/repo/listings/listing-1.xml b/src/main/xar-resources/data/repo/listings/listing-1.xml index 33c0f79e..e74b2154 100644 --- a/src/main/xar-resources/data/repo/listings/listing-1.xml +++ b/src/main/xar-resources/data/repo/listings/listing-1.xml @@ -1,10 +1,10 @@ - + eXist-db Documentation https://www.github.com/exist-db/documentation - - + + diff --git a/src/main/xar-resources/data/repo/listings/listing-2.xml b/src/main/xar-resources/data/repo/listings/listing-2.xml index ab1dfb31..5bd51336 100644 --- a/src/main/xar-resources/data/repo/listings/listing-2.xml +++ b/src/main/xar-resources/data/repo/listings/listing-2.xml @@ -1 +1 @@ - + diff --git a/src/main/xar-resources/data/templating/listings/listing-14.xml b/src/main/xar-resources/data/templating/listings/listing-14.xml index 432057bb..5bd51336 100644 --- a/src/main/xar-resources/data/templating/listings/listing-14.xml +++ b/src/main/xar-resources/data/templating/listings/listing-14.xml @@ -1 +1 @@ - + diff --git a/src/main/xar-resources/error-page.html b/src/main/xar-resources/error-page.html index a7d36114..c1d9c020 100755 --- a/src/main/xar-resources/error-page.html +++ b/src/main/xar-resources/error-page.html @@ -2,7 +2,4 @@

An error has occurred

An error has been generated by the application.

-    
 
diff --git a/src/main/xar-resources/modules/app.xql b/src/main/xar-resources/modules/app.xql
index 7a3b63e0..ea0556df 100644
--- a/src/main/xar-resources/modules/app.xql
+++ b/src/main/xar-resources/modules/app.xql
@@ -2,7 +2,7 @@ xquery version "3.1";
 
 module namespace app = "http://exist-db.org/apps/docs/app";
 
-import module namespace templates = "http://exist-db.org/xquery/templates";
+import module namespace templates = "http://exist-db.org/xquery/html-templating";
 import module namespace config = "http://exist-db.org/xquery/apps/config" at "config.xqm";
 
 declare namespace expath = "http://expath.org/ns/pkg";
diff --git a/src/main/xar-resources/modules/config.xqm b/src/main/xar-resources/modules/config.xqm
index dbdf7597..357e52b7 100755
--- a/src/main/xar-resources/modules/config.xqm
+++ b/src/main/xar-resources/modules/config.xqm
@@ -9,7 +9,7 @@ xquery version "3.0";
 
 module namespace config = "http://exist-db.org/xquery/apps/config";
 
-import module namespace templates = "http://exist-db.org/xquery/templates";
+import module namespace templates = "http://exist-db.org/xquery/html-templating";
 
 declare namespace repo = "http://exist-db.org/xquery/repo";
 declare namespace expath = "http://expath.org/ns/pkg";
diff --git a/src/main/xar-resources/modules/docbook.xql b/src/main/xar-resources/modules/docbook.xql
index 9ea85c66..20124c8e 100644
--- a/src/main/xar-resources/modules/docbook.xql
+++ b/src/main/xar-resources/modules/docbook.xql
@@ -5,7 +5,7 @@ xquery version "3.0";
 module namespace docbook="http://docbook.org/ns/docbook";
 
 import module namespace config="http://exist-db.org/xquery/apps/config" at "config.xqm";
-import module namespace templates="http://exist-db.org/xquery/templates" at "templates.xql";
+import module namespace templates="http://exist-db.org/xquery/html-templating";
 import module namespace dq="http://exist-db.org/xquery/documentation/search" at "search.xql";
 
 declare namespace db5="http://docbook.org/ns/docbook";
diff --git a/src/main/xar-resources/modules/search.xql b/src/main/xar-resources/modules/search.xql
index cc2179eb..a2d80440 100644
--- a/src/main/xar-resources/modules/search.xql
+++ b/src/main/xar-resources/modules/search.xql
@@ -11,7 +11,7 @@ import module namespace kwic = "http://exist-db.org/xquery/kwic";
 import module namespace util = "http://exist-db.org/xquery/util";
 
 declare namespace db5 = "http://docbook.org/ns/docbook";
-declare namespace templates = "http://exist-db.org/xquery/templates";
+declare namespace templates = "http://exist-db.org/xquery/html-templating";
 
 declare option exist:serialize "method=html media-type=text/html expand-xincludes=yes";
 
diff --git a/src/main/xar-resources/modules/view.xql b/src/main/xar-resources/modules/view.xql
index 7b4e78b7..b6836b46 100755
--- a/src/main/xar-resources/modules/view.xql
+++ b/src/main/xar-resources/modules/view.xql
@@ -1,13 +1,13 @@
 xquery version "3.0";
 
-import module namespace templates="http://exist-db.org/xquery/templates";
+import module namespace templates="http://exist-db.org/xquery/html-templating";
+import module namespace lib="http://exist-db.org/xquery/html-templating/lib";
 
 (: The following modules provide functions which will be called by the templating :)
 import module namespace dq="http://exist-db.org/xquery/documentation/search" at "search.xql";
 import module namespace docbook="http://docbook.org/ns/docbook" at "docbook.xql";
 import module namespace config="http://exist-db.org/xquery/apps/config" at "config.xqm";
 import module namespace review="http://exist-db.org/xquery/documentation/review" at "review.xql";
-import module namespace site="http://exist-db.org/apps/site-utils";
 import module namespace diag="http://exist-db.org/xquery/diagnostics" at "diagnostics.xql";
 import module namespace app="http://exist-db.org/apps/docs/app" at "app.xql";
 
diff --git a/src/main/xar-resources/templates/page.html b/src/main/xar-resources/templates/page.html
index f32ab8f7..1098980c 100755
--- a/src/main/xar-resources/templates/page.html
+++ b/src/main/xar-resources/templates/page.html
@@ -1,4 +1,4 @@
-
+
 
 
   ${project.name}
@@ -10,7 +10,7 @@
   
 
 
-
+
   
diff --git a/xar-assembly.xml b/xar-assembly.xml index 1340955a..75c8f18e 100644 --- a/xar-assembly.xml +++ b/xar-assembly.xml @@ -14,7 +14,7 @@ Applications Documentation - + pre-install.xql From dc77a8e467f6de758944d1fa69c178d8e9d36bc6 Mon Sep 17 00:00:00 2001 From: Joe Wicentowski Date: Fri, 11 Jun 2021 19:01:50 -0400 Subject: [PATCH 2/3] troubleshoot CI --- src/test/mocha/xqSuite.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/mocha/xqSuite.js b/src/test/mocha/xqSuite.js index 6457fd18..8859130d 100644 --- a/src/test/mocha/xqSuite.js +++ b/src/test/mocha/xqSuite.js @@ -12,8 +12,11 @@ describe('running XQsuite test …', function () { client .get(runner) .set('Accept', 'application/json') - .expect('content-type', 'application/json; charset=utf-8') + .expect('content-type', /json/) + .expect(200) .end(function (err, res) { // eslint-disable-line handle-callback-err + console.info('response body: ' + JSON.stringify(res.body)) + if (err) return done(err); try { console.group() console.group() From d1ddc1ad95384307ed4ebad603a7fe1470c66110 Mon Sep 17 00:00:00 2001 From: Adam Retter Date: Sat, 12 Jun 2021 16:12:08 +0200 Subject: [PATCH 3/3] Fix required EXPath dependency for tests --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 779cff08..b8a71d57 100644 --- a/pom.xml +++ b/pom.xml @@ -290,8 +290,8 @@ ${exist.version} - shared - ${shared-resources.version} + templating + ${templating.version}