Loading Makefile +6 −7 Original line number Diff line number Diff line #BASEX_ARCHIVE_URL=https://files.basex.org/releases/11.7/BaseX117.zip BASEX_ARCHIVE_URL=https://files.basex.org/releases/12.2/BaseX122.zip SRC_DIR=${CURDIR}/src DEV_WEBAPP_DIR=${SRC_DIR}/main/webapp install-basex: # BaseX & dépendances: Téléchargement, installation et définition du mot de passe admin @if [ -d '.max/basex' ]; then\ echo 'Installation de BaseX : OK.';\ Loading @@ -17,8 +16,8 @@ install-basex: # BaseX & dépendances: Téléchargement, installation et défini cd ..;\ echo 'Création de la base "max".';\ ./.max/basex/bin/basex -c"CREATE DB max";\ echo 'Création du fichier de configuration par défaut "config.xml"';\ cp src/resources/config.xml.sample config.xml;\ #echo 'Création du fichier de configuration par défaut "config.xml"';\ #cp src/resources/config.xml.sample config.xml;\ echo 'Installation de BaseX terminée.';\ fi .PHONY: install-basex Loading @@ -28,9 +27,9 @@ install: install-basex ## Installation de MaX @if [ -d '.max/basex/webapp/max' ]; then\ echo 'Installation de MaX : OK.';\ else\ #ln -s $(SRC_DIR)/main/ .max/basex/webapp/max;\ echo 'Mise à jour du répertoire WEBPATH';\ sed -i -E "s#^[[:space:]]*(WEBPATH)[[:space:]]*=.*#\1=${DEV_WEBAPP_DIR}#" .max/basex/.basex;\ ln -s $(DEV_WEBAPP_DIR)/max .max/basex/webapp/max;\ #echo 'Mise à jour du répertoire WEBPATH';\ #sed -i -E "s#^[[:space:]]*(WEBPATH)[[:space:]]*=.*#\1=${DEV_WEBAPP_DIR}#" .max/basex/.basex;\ echo 'Installation des modules dans le REPO BaseX';\ mkdir .max/basex/repo/max;\ ln -s $(SRC_DIR)/main/core .max/basex/repo/max/max;\ Loading fixtures/autoroute/test.xq +1 −1 Original line number Diff line number Diff line xquery version "3.0"; import module namespace templating = 'https://certic.unicaen.fr/max/templating' at '../.max/basex/webapp/max/core/templating.xqm'; import module namespace templating = 'https://certic.unicaen.fr/max/templating'; declare variable $lang external; Loading fixtures/content_html/en/index.html +1 −1 Original line number Diff line number Diff line <div> <h2>Home</h2> <h2>Welcome to MaX</h2> <p>This is home page content (file <code>content_html/en/index.html</code>).</p> <ul> <li>Download <a href="/sources.zip">sources</a></li> Loading fixtures/content_html/fr/index.html +7 −1 Original line number Diff line number Diff line <div> <h2>Accueil</h2> <h2>Bienvenue dans MaX</h2> <p>Ceci est le contenu de la page d'accueil (fichier <code>content_html/fr/index.html</code>).</p> <ul> <li>Télécharger les <a href="/sources.zip">sources</a></li> <li>Un exemple <a href="/{$lang}/test.html">d'autoroute</a></li> </ul> <p> Retrouvez la documentation de MaX à l'adresse suivante: <a href="https://www.certic.unicaen.fr/max-v2/"> https://www.certic.unicaen.fr/max-v2/ </a> </p> </div> No newline at end of file src/main/core/templating.xqm +4 −1 Original line number Diff line number Diff line Loading @@ -163,7 +163,10 @@ declare function templating:post-render($render as element()) as element(){ let $f := fn($result, $bundle) { try { let $xqueryFile := utils:get-bundles-path() || $bundle || '/post-render.xq' return xquery:eval(xs:anyURI($xqueryFile), map {'html': $result}) return if (file:exists($xqueryFile)) then xquery:eval(xs:anyURI($xqueryFile), map {'html': $result}) else $result } catch err:FODC0002 {$result} catch err:FOUT1170 {$result} Loading Loading
Makefile +6 −7 Original line number Diff line number Diff line #BASEX_ARCHIVE_URL=https://files.basex.org/releases/11.7/BaseX117.zip BASEX_ARCHIVE_URL=https://files.basex.org/releases/12.2/BaseX122.zip SRC_DIR=${CURDIR}/src DEV_WEBAPP_DIR=${SRC_DIR}/main/webapp install-basex: # BaseX & dépendances: Téléchargement, installation et définition du mot de passe admin @if [ -d '.max/basex' ]; then\ echo 'Installation de BaseX : OK.';\ Loading @@ -17,8 +16,8 @@ install-basex: # BaseX & dépendances: Téléchargement, installation et défini cd ..;\ echo 'Création de la base "max".';\ ./.max/basex/bin/basex -c"CREATE DB max";\ echo 'Création du fichier de configuration par défaut "config.xml"';\ cp src/resources/config.xml.sample config.xml;\ #echo 'Création du fichier de configuration par défaut "config.xml"';\ #cp src/resources/config.xml.sample config.xml;\ echo 'Installation de BaseX terminée.';\ fi .PHONY: install-basex Loading @@ -28,9 +27,9 @@ install: install-basex ## Installation de MaX @if [ -d '.max/basex/webapp/max' ]; then\ echo 'Installation de MaX : OK.';\ else\ #ln -s $(SRC_DIR)/main/ .max/basex/webapp/max;\ echo 'Mise à jour du répertoire WEBPATH';\ sed -i -E "s#^[[:space:]]*(WEBPATH)[[:space:]]*=.*#\1=${DEV_WEBAPP_DIR}#" .max/basex/.basex;\ ln -s $(DEV_WEBAPP_DIR)/max .max/basex/webapp/max;\ #echo 'Mise à jour du répertoire WEBPATH';\ #sed -i -E "s#^[[:space:]]*(WEBPATH)[[:space:]]*=.*#\1=${DEV_WEBAPP_DIR}#" .max/basex/.basex;\ echo 'Installation des modules dans le REPO BaseX';\ mkdir .max/basex/repo/max;\ ln -s $(SRC_DIR)/main/core .max/basex/repo/max/max;\ Loading
fixtures/autoroute/test.xq +1 −1 Original line number Diff line number Diff line xquery version "3.0"; import module namespace templating = 'https://certic.unicaen.fr/max/templating' at '../.max/basex/webapp/max/core/templating.xqm'; import module namespace templating = 'https://certic.unicaen.fr/max/templating'; declare variable $lang external; Loading
fixtures/content_html/en/index.html +1 −1 Original line number Diff line number Diff line <div> <h2>Home</h2> <h2>Welcome to MaX</h2> <p>This is home page content (file <code>content_html/en/index.html</code>).</p> <ul> <li>Download <a href="/sources.zip">sources</a></li> Loading
fixtures/content_html/fr/index.html +7 −1 Original line number Diff line number Diff line <div> <h2>Accueil</h2> <h2>Bienvenue dans MaX</h2> <p>Ceci est le contenu de la page d'accueil (fichier <code>content_html/fr/index.html</code>).</p> <ul> <li>Télécharger les <a href="/sources.zip">sources</a></li> <li>Un exemple <a href="/{$lang}/test.html">d'autoroute</a></li> </ul> <p> Retrouvez la documentation de MaX à l'adresse suivante: <a href="https://www.certic.unicaen.fr/max-v2/"> https://www.certic.unicaen.fr/max-v2/ </a> </p> </div> No newline at end of file
src/main/core/templating.xqm +4 −1 Original line number Diff line number Diff line Loading @@ -163,7 +163,10 @@ declare function templating:post-render($render as element()) as element(){ let $f := fn($result, $bundle) { try { let $xqueryFile := utils:get-bundles-path() || $bundle || '/post-render.xq' return xquery:eval(xs:anyURI($xqueryFile), map {'html': $result}) return if (file:exists($xqueryFile)) then xquery:eval(xs:anyURI($xqueryFile), map {'html': $result}) else $result } catch err:FODC0002 {$result} catch err:FOUT1170 {$result} Loading