Loading max.xq +11 −11 Changes for max.xq: 11 added lines, 11 removed lines. Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ declare option db:chop 'false'; declare %rest:GET %output:method("html") %rest:path( "/editions/{$project}") %rest:path( "/{$project}") function max:projectHome($project){ web:redirect(request:uri() || '/accueil') }; Loading @@ -47,7 +47,7 @@ declare %rest:GET %output:method("html") %output:indent("no") %rest:path( "editions/{$project}/{$page=[a-zA-Z0-9_]+}") %rest:path( "/{$project}/{$page=[a-zA-Z0-9_]+}") function max:page($project, $page){ try{ switch($page) Loading Loading @@ -91,7 +91,7 @@ declare %rest:GET %output:method("html") %output:indent("no") %rest:path("/editions/{$project}/sommaire/{$doc=[^plugins].*\.xml|.*\.svg}") %rest:path("/{$project}/sommaire/{$doc=[^plugins].*\.xml|.*\.svg}") function max:documentTOC($project,$doc){ max.html:render($project, "sommaire", max.toc:getDocumentTOC($project, $doc)) }; Loading @@ -101,7 +101,7 @@ declare %rest:GET %output:method("html") %output:indent("no") %rest:path("/editions/{$project}/{$routeDoc=[^plugins].*\.xml}/{$id}") %rest:path("/{$project}/{$routeDoc=[^plugins].*\.xml}/{$id}") function max:htmlFragmentWithNavigationBar($project, $routeDoc, $id){ let $dbPath := max.config:getProjectDBPath($project) Loading Loading @@ -140,7 +140,7 @@ declare %rest:GET %output:method("html") %output:indent("no") %rest:path("/editions/{$project}/{$routeDoc=[^plugins].*\.xml}/{$id}/target/{$targetId}/{$search}") %rest:path("/{$project}/{$routeDoc=[^plugins].*\.xml}/{$id}/target/{$targetId}/{$search}") function max:htmlFragmentAndTargetSearchWithNavigationBar($project, $routeDoc, $id, $targetId, $search){ Loading @@ -163,7 +163,7 @@ declare %rest:GET %output:method("html") %output:indent("no") %rest:path("/editions/{$project}/{$routeDoc=[^plugins].*\.xml}/focus/{$idFocus}") %rest:path("/{$project}/{$routeDoc=[^plugins].*\.xml}/focus/{$idFocus}") function max:htmlFragmentTargetIdWithNavigationBar($project, $routeDoc, $idFocus){ copy $c := max:getFullDocument($project, $routeDoc) modify ( Loading @@ -179,7 +179,7 @@ declare %rest:GET %output:method("html") %output:indent("no") %rest:path("/editions/{$project}/{$routeDoc=[^plugins].*\.xml}/focus/{$idPart}/{$idFocus}") %rest:path("/{$project}/{$routeDoc=[^plugins].*\.xml}/focus/{$idPart}/{$idFocus}") function max:htmlFragmentTargetPartAndIdWithNavigationBar($project, $routeDoc,$idPart, $idFocus){ copy $c := max:htmlFragmentWithNavigationBar($project, $routeDoc, $idPart) modify ( Loading @@ -192,7 +192,7 @@ function max:htmlFragmentTargetPartAndIdWithNavigationBar($project, $routeDoc,$i declare %rest:GET %output:method("html") %rest:path("/editions/{$project}/checkplugins") %rest:path("/{$project}/checkplugins") function max:checkPlugin($project){ let $plugins := max.config:getPluginNameList($project) return Loading Loading @@ -222,7 +222,7 @@ function max:checkPlugin($project){ declare %rest:GET %output:method("html") %rest:path("editions/{$project}/fragment/{$id}") %rest:path("/{$project}/fragment/{$id}") function max:getXMLByID($project, $id){ max.api:getXMLByID(max.config:getProjectDBPath($project), $id) }; Loading @@ -234,7 +234,7 @@ declare %rest:query-param("xsl", "{$xsl}") %rest:query-param("xslparams","{$xslparams}") %rest:query-param("wrap", "{$wrap}") %rest:path("editions/{$project}/fragment_html/{$id}") %rest:path("/{$project}/fragment_html/{$id}") function max:getHTMLByID($project, $id, $xsl, $xslparams as xs:string *, $wrap as xs:string ?)as element(){ let $xml := max.api:getXMLByID(max.config:getProjectDBPath($project), $id) let $xsltDoc := max.util:buildXSLTDoc( Loading Loading @@ -263,7 +263,7 @@ declare %rest:GET %output:method("html") %output:indent("no") %rest:path("/editions/{$project}/doc/{$doc=.*\.xml|.*\.svg}") %rest:path("/{$project}/doc/{$doc=.*\.xml|.*\.svg}") function max:getFullDocument($project, $doc){ let $xmlDoc := (doc(max.config:getProjectDBPath($project) || "/" || $doc)/*)[1] Loading plugins/search/search.xqm +4 −4 Changes for plugins/search/search.xqm: 4 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ declare variable $max.plugin.search:BACK_TO_TEXT_ID_PARAMETER := "backToTextID"; declare %rest:GET %output:method("html") %rest:path("/editions/{$project}/rechercher") %rest:path("/{$project}/rechercher") function max.plugin.search:searchPage($project){ let $routeList := for $d in collection( max.config:getProjectDBPath($project)) return base-uri($d) (:max.route:HTMLRouteList($project)//a/@href :) let $routeSelect := <select id='searchSelect'>{ Loading Loading @@ -54,7 +54,7 @@ function max.plugin.search:searchPage($project){ declare %rest:GET %output:method("html") %rest:path("editions/{$project}/search/report") %rest:path("/{$project}/search/report") function max.plugin.search:check($project){ let $pluginConfig := max.config:getPluginByName($project, $max.plugin.search:PLUGIN_ID) Loading @@ -79,7 +79,7 @@ declare %output:method("html") %rest:query-param("search", "{$search}") %rest:query-param("docs", "{$docs}") %rest:path("editions/{$project}/search") %rest:path("/{$project}/search") function max.plugin.search:plap($project,$search, $docs){ let $plugin := max.config:getPluginByName($project, $max.plugin.search:PLUGIN_ID) let $tag := string($plugin//parameter[@key=$max.plugin.search:TAG_PARAMETER]/@value) Loading Loading @@ -119,7 +119,7 @@ declare %rest:query-param("search", "{$search}") %rest:query-param("docs", "{$docs}") %rest:query-param("transform", "{$transform}", "no") %rest:path("editions/{$project}/deprecatedsearch") %rest:path("/{$project}/deprecatedsearch") function max.plugin.search:search($project, $search as xs:string, $docs as item()+, $transform as xs:string){ let $dbPath := max.config:getProjectDBPath($project) Loading rxq/alignment.xqm +3 −3 Changes for rxq/alignment.xqm: 3 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ import module namespace max.util = 'pddn/max/util' at 'util.xqm'; declare %rest:GET %output:method("html") %rest:path("/editions/{$project}/{$doc}/{$id1}/{$id2}") %rest:path("/{$project}/{$doc}/{$id1}/{$id2}") function max.alignment:alignedHTML($project, $doc, $id1, $id2){ let $dbPath := max.config:getProjectDBPath($project) let $xsltDoc := max.util:buildXSLTDoc( Loading Loading @@ -79,10 +79,10 @@ declare function max.alignment:buildFragmentLinkFromID($base, $project, $routeId return if(not($isAligned)) then $base || "/" || $project || "/" || $routeId || "/" || $fragmentID $base || $project || "/" || $routeId || "/" || $fragmentID else let $firstPrefix := max.config:getFirstAlignmentPrefix($routeId) let $secondPrefix := max.config:getSecondAlignmentPrefix($routeId) let $idPointer2 := $secondPrefix || substring-after($fragmentID, $firstPrefix) return $base || "/" || $project || "/" || $routeId || "/" || $fragmentID || "/" || $idPointer2 return $base || $project || "/" || $routeId || "/" || $fragmentID || "/" || $idPointer2 }; No newline at end of file rxq/cons.xqm +1 −1 Changes for rxq/cons.xqm: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ declare variable $max.cons:TEI := "tei"; declare variable $max.cons:EAD := "ead"; (: Base Dir:) declare variable $max.cons:BASE_DIR := "/editions"; declare variable $max.cons:BASE_DIR := "/"; declare variable $max.cons:PLUGINS_BASE_DIR := "/plugins"; (: route path name (in URLs):) Loading rxq/file.xqm +4 −4 Changes for rxq/file.xqm: 4 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ import module namespace max.util = 'pddn/max/util' at 'util.xqm'; : @return rest response and binary file :) declare %rest:path("editions/{$project}/plugins/{$pluginName}/{$file}") %rest:path("/{$project}/plugins/{$pluginName}/{$file}") function max.file:pluginFile( $project, $pluginName as xs:string, Loading @@ -23,7 +23,7 @@ function max.file:pluginFile( Project's UI file: css, js, image ... :) declare %rest:path("/editions/{$project}/ui/{$filePath=.*}") %rest:path("/{$project}/ui/{$filePath=.*}") function max.file:projectUIFile( $project as xs:string, $filePath as xs:string){ Loading @@ -37,7 +37,7 @@ function max.file:projectUIFile( Global ui css,images,f font, js ... file :) declare %rest:path("/editions/{$project=[a-zA-Z\_\-]+}/core/ui/{$filePath=.*}") %rest:path("/{$project=[a-zA-Z\_\-]+}/core/ui/{$filePath=.*}") function max.file:UIFile( $project as xs:string, $filePath as xs:string){ Loading @@ -52,7 +52,7 @@ function max.file:UIFile( uiAddon css or js file :) declare %rest:path("/editions/ui/uiAddons/{$uiAddonName}/{$file}") %rest:path("/ui/uiAddons/{$uiAddonName}/{$file}") function max.file:UIAddonFile( $uiAddonName as xs:string, $file as xs:string){ Loading Loading
max.xq +11 −11 Changes for max.xq: 11 added lines, 11 removed lines. Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ declare option db:chop 'false'; declare %rest:GET %output:method("html") %rest:path( "/editions/{$project}") %rest:path( "/{$project}") function max:projectHome($project){ web:redirect(request:uri() || '/accueil') }; Loading @@ -47,7 +47,7 @@ declare %rest:GET %output:method("html") %output:indent("no") %rest:path( "editions/{$project}/{$page=[a-zA-Z0-9_]+}") %rest:path( "/{$project}/{$page=[a-zA-Z0-9_]+}") function max:page($project, $page){ try{ switch($page) Loading Loading @@ -91,7 +91,7 @@ declare %rest:GET %output:method("html") %output:indent("no") %rest:path("/editions/{$project}/sommaire/{$doc=[^plugins].*\.xml|.*\.svg}") %rest:path("/{$project}/sommaire/{$doc=[^plugins].*\.xml|.*\.svg}") function max:documentTOC($project,$doc){ max.html:render($project, "sommaire", max.toc:getDocumentTOC($project, $doc)) }; Loading @@ -101,7 +101,7 @@ declare %rest:GET %output:method("html") %output:indent("no") %rest:path("/editions/{$project}/{$routeDoc=[^plugins].*\.xml}/{$id}") %rest:path("/{$project}/{$routeDoc=[^plugins].*\.xml}/{$id}") function max:htmlFragmentWithNavigationBar($project, $routeDoc, $id){ let $dbPath := max.config:getProjectDBPath($project) Loading Loading @@ -140,7 +140,7 @@ declare %rest:GET %output:method("html") %output:indent("no") %rest:path("/editions/{$project}/{$routeDoc=[^plugins].*\.xml}/{$id}/target/{$targetId}/{$search}") %rest:path("/{$project}/{$routeDoc=[^plugins].*\.xml}/{$id}/target/{$targetId}/{$search}") function max:htmlFragmentAndTargetSearchWithNavigationBar($project, $routeDoc, $id, $targetId, $search){ Loading @@ -163,7 +163,7 @@ declare %rest:GET %output:method("html") %output:indent("no") %rest:path("/editions/{$project}/{$routeDoc=[^plugins].*\.xml}/focus/{$idFocus}") %rest:path("/{$project}/{$routeDoc=[^plugins].*\.xml}/focus/{$idFocus}") function max:htmlFragmentTargetIdWithNavigationBar($project, $routeDoc, $idFocus){ copy $c := max:getFullDocument($project, $routeDoc) modify ( Loading @@ -179,7 +179,7 @@ declare %rest:GET %output:method("html") %output:indent("no") %rest:path("/editions/{$project}/{$routeDoc=[^plugins].*\.xml}/focus/{$idPart}/{$idFocus}") %rest:path("/{$project}/{$routeDoc=[^plugins].*\.xml}/focus/{$idPart}/{$idFocus}") function max:htmlFragmentTargetPartAndIdWithNavigationBar($project, $routeDoc,$idPart, $idFocus){ copy $c := max:htmlFragmentWithNavigationBar($project, $routeDoc, $idPart) modify ( Loading @@ -192,7 +192,7 @@ function max:htmlFragmentTargetPartAndIdWithNavigationBar($project, $routeDoc,$i declare %rest:GET %output:method("html") %rest:path("/editions/{$project}/checkplugins") %rest:path("/{$project}/checkplugins") function max:checkPlugin($project){ let $plugins := max.config:getPluginNameList($project) return Loading Loading @@ -222,7 +222,7 @@ function max:checkPlugin($project){ declare %rest:GET %output:method("html") %rest:path("editions/{$project}/fragment/{$id}") %rest:path("/{$project}/fragment/{$id}") function max:getXMLByID($project, $id){ max.api:getXMLByID(max.config:getProjectDBPath($project), $id) }; Loading @@ -234,7 +234,7 @@ declare %rest:query-param("xsl", "{$xsl}") %rest:query-param("xslparams","{$xslparams}") %rest:query-param("wrap", "{$wrap}") %rest:path("editions/{$project}/fragment_html/{$id}") %rest:path("/{$project}/fragment_html/{$id}") function max:getHTMLByID($project, $id, $xsl, $xslparams as xs:string *, $wrap as xs:string ?)as element(){ let $xml := max.api:getXMLByID(max.config:getProjectDBPath($project), $id) let $xsltDoc := max.util:buildXSLTDoc( Loading Loading @@ -263,7 +263,7 @@ declare %rest:GET %output:method("html") %output:indent("no") %rest:path("/editions/{$project}/doc/{$doc=.*\.xml|.*\.svg}") %rest:path("/{$project}/doc/{$doc=.*\.xml|.*\.svg}") function max:getFullDocument($project, $doc){ let $xmlDoc := (doc(max.config:getProjectDBPath($project) || "/" || $doc)/*)[1] Loading
plugins/search/search.xqm +4 −4 Changes for plugins/search/search.xqm: 4 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ declare variable $max.plugin.search:BACK_TO_TEXT_ID_PARAMETER := "backToTextID"; declare %rest:GET %output:method("html") %rest:path("/editions/{$project}/rechercher") %rest:path("/{$project}/rechercher") function max.plugin.search:searchPage($project){ let $routeList := for $d in collection( max.config:getProjectDBPath($project)) return base-uri($d) (:max.route:HTMLRouteList($project)//a/@href :) let $routeSelect := <select id='searchSelect'>{ Loading Loading @@ -54,7 +54,7 @@ function max.plugin.search:searchPage($project){ declare %rest:GET %output:method("html") %rest:path("editions/{$project}/search/report") %rest:path("/{$project}/search/report") function max.plugin.search:check($project){ let $pluginConfig := max.config:getPluginByName($project, $max.plugin.search:PLUGIN_ID) Loading @@ -79,7 +79,7 @@ declare %output:method("html") %rest:query-param("search", "{$search}") %rest:query-param("docs", "{$docs}") %rest:path("editions/{$project}/search") %rest:path("/{$project}/search") function max.plugin.search:plap($project,$search, $docs){ let $plugin := max.config:getPluginByName($project, $max.plugin.search:PLUGIN_ID) let $tag := string($plugin//parameter[@key=$max.plugin.search:TAG_PARAMETER]/@value) Loading Loading @@ -119,7 +119,7 @@ declare %rest:query-param("search", "{$search}") %rest:query-param("docs", "{$docs}") %rest:query-param("transform", "{$transform}", "no") %rest:path("editions/{$project}/deprecatedsearch") %rest:path("/{$project}/deprecatedsearch") function max.plugin.search:search($project, $search as xs:string, $docs as item()+, $transform as xs:string){ let $dbPath := max.config:getProjectDBPath($project) Loading
rxq/alignment.xqm +3 −3 Changes for rxq/alignment.xqm: 3 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ import module namespace max.util = 'pddn/max/util' at 'util.xqm'; declare %rest:GET %output:method("html") %rest:path("/editions/{$project}/{$doc}/{$id1}/{$id2}") %rest:path("/{$project}/{$doc}/{$id1}/{$id2}") function max.alignment:alignedHTML($project, $doc, $id1, $id2){ let $dbPath := max.config:getProjectDBPath($project) let $xsltDoc := max.util:buildXSLTDoc( Loading Loading @@ -79,10 +79,10 @@ declare function max.alignment:buildFragmentLinkFromID($base, $project, $routeId return if(not($isAligned)) then $base || "/" || $project || "/" || $routeId || "/" || $fragmentID $base || $project || "/" || $routeId || "/" || $fragmentID else let $firstPrefix := max.config:getFirstAlignmentPrefix($routeId) let $secondPrefix := max.config:getSecondAlignmentPrefix($routeId) let $idPointer2 := $secondPrefix || substring-after($fragmentID, $firstPrefix) return $base || "/" || $project || "/" || $routeId || "/" || $fragmentID || "/" || $idPointer2 return $base || $project || "/" || $routeId || "/" || $fragmentID || "/" || $idPointer2 }; No newline at end of file
rxq/cons.xqm +1 −1 Changes for rxq/cons.xqm: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ declare variable $max.cons:TEI := "tei"; declare variable $max.cons:EAD := "ead"; (: Base Dir:) declare variable $max.cons:BASE_DIR := "/editions"; declare variable $max.cons:BASE_DIR := "/"; declare variable $max.cons:PLUGINS_BASE_DIR := "/plugins"; (: route path name (in URLs):) Loading
rxq/file.xqm +4 −4 Changes for rxq/file.xqm: 4 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ import module namespace max.util = 'pddn/max/util' at 'util.xqm'; : @return rest response and binary file :) declare %rest:path("editions/{$project}/plugins/{$pluginName}/{$file}") %rest:path("/{$project}/plugins/{$pluginName}/{$file}") function max.file:pluginFile( $project, $pluginName as xs:string, Loading @@ -23,7 +23,7 @@ function max.file:pluginFile( Project's UI file: css, js, image ... :) declare %rest:path("/editions/{$project}/ui/{$filePath=.*}") %rest:path("/{$project}/ui/{$filePath=.*}") function max.file:projectUIFile( $project as xs:string, $filePath as xs:string){ Loading @@ -37,7 +37,7 @@ function max.file:projectUIFile( Global ui css,images,f font, js ... file :) declare %rest:path("/editions/{$project=[a-zA-Z\_\-]+}/core/ui/{$filePath=.*}") %rest:path("/{$project=[a-zA-Z\_\-]+}/core/ui/{$filePath=.*}") function max.file:UIFile( $project as xs:string, $filePath as xs:string){ Loading @@ -52,7 +52,7 @@ function max.file:UIFile( uiAddon css or js file :) declare %rest:path("/editions/ui/uiAddons/{$uiAddonName}/{$file}") %rest:path("/ui/uiAddons/{$uiAddonName}/{$file}") function max.file:UIAddonFile( $uiAddonName as xs:string, $file as xs:string){ Loading