Loading rxq/config.xqm +0 −20 Original line number Diff line number Diff line Loading @@ -218,22 +218,6 @@ declare function max.config:getProjectLayoutTemplate($projectId) { (:Returns XSL for route list:) declare function max.config:getRouteListXSL($project as xs:string){ let $xsl := string(doc($max.config:CONFIGURATION_FILE)//edition[@xml:id=$project]/routeList/@xsl) return if($xsl) then max.util:maxHome() || $xsl else () }; declare function max.config:getRouteEntriesXSL($project as xs:string, $routeDoc as xs:string){ let $xsl := string(doc($max.config:CONFIGURATION_FILE)//edition[@xml:id=$project]/routeList/route[@document=$routeDoc]/@xsl) return if($xsl) then max.util:maxHome() || $xsl else () }; (: Returns project's default XSLT to apply on text :) Loading @@ -242,10 +226,6 @@ declare function max.config:getDefaultTextXSL($project as xs:string) as xs:strin return max.util:maxHome() || "/ui/xsl/" || $env || "/" || $env || ".xsl" }; (:Returns UI addon directory list:) declare function max.config:getUIAddonDirectories($project){ doc($max.config:CONFIGURATION_FILE)//edition[@xml:id=$project]//uiAddon/@dirName }; (: Returns all required xslt addons (plugins + text hook + alignment) Loading rxq/cons.xqm +0 −6 Original line number Diff line number Diff line Loading @@ -51,12 +51,6 @@ declare variable $max.cons:AUTO_TOC := "auto"; declare variable $max.cons:CUSTOM_TOC := "custom"; declare variable $max.cons:STATIC_HTML_TOC := "static"; (:ROUTE LIST types:) (: declare variable $max.cons:CONFIG_LIST_ROUTE_TYPE := "listing"; declare variable $max.cons:HTML_FILE_ROUTE_TYPE := "html"; declare variable $max.cons:XQUERY_ROUTE_TYPE := "xquery"; declare variable $max.cons:DEFAULT_ROUTE_TYPE := "default"; :) (:context Key properties:) declare variable $max.cons:PROJECT_CONTEXT_KEY := "project"; declare variable $max.cons:BASE_URI_CONTEXT_KEY := "baseURI"; Loading rxq/html.xqm +3 −3 Original line number Diff line number Diff line Loading @@ -28,11 +28,11 @@ as element(html) {max.html:render($projectId, $pageId, $wrapped, ())}; declare function max.html:render( $projectId as xs:string, $pageId as xs:string, $wrapped as element()+, $content as element()+, $fragmentId as xs:string ? ) as element(html) { let $head := max.html:generateHTMLHead($projectId, $wrapped) let $head := max.html:generateHTMLHead($projectId, $content) let $jsImports := max.html:generateAllJSImports($projectId, $pageId, $fragmentId) let $menu := max.html:buildMenu($projectId, $pageId, $fragmentId) let $targetId := if ($fragmentId) Loading @@ -56,7 +56,7 @@ declare function max.html:render( 'navigationSelect' : $navigationSelect, 'textOptions' : $textOptions, 'head' : $head, 'content' : $wrapped, 'content' : $content, 'footer' : max.html:getFooter($projectId), 'jsImports' : $jsImports, 'data' : max.config:getProjectData($projectId) Loading rxq/util.xqm +0 −41 Original line number Diff line number Diff line Loading @@ -15,19 +15,6 @@ declare function max.util:rawFile($path) as item()+{ }; (: : Returns the mime-type for the specified file. : @param $name file name : @return mime type :) (: declare function max.util:mime-type( $name as xs:string ) as xs:string { Q{java:org.basex.io.MimeTypes}get($name) }; :) declare function max.util:query($query, $bindings){ xquery:eval($query, $bindings) }; Loading Loading @@ -164,12 +151,6 @@ declare function max.util:list-db-resources($project){ }; (::) (:Lists all DB resources (recursively):) (::) (:declare function max.util:list-db-resources-as-map($dbName){:) (: max.util:list-db-resources-as-map($dbName, ""):) (:};:) (: Lists all DB resources (recursively) + add href prefix on each hyperlinks Loading Loading @@ -199,28 +180,6 @@ declare function max.util:list-db-resources($projectId, $dbName, $baseURI, $xmln (: Lists all DB resources (recursively) as map :) (:declare function max.util:list-db-resources-as-map($dbName, $dir as xs:string){:) (: for $d in db:dir($dbName, $dir):) (: let $subDirs := max.util:list-db-resources-as-map($dbName, $dir||'/'||$d):) (: return:) (: let $fullPath := substring-after($dir || '/' || $d/text(),'/'):) (: return:) (: if(ends-with($d/text(),'.xml')):) (: then map{:) (: 'file' : $d/text(),:) (: 'title': max.util:teiDocTitle($dbName, $fullPath),:) (: 'fullPath': $fullPath:) (: }:) (: else:) (: map{:) (: 'file' : $d/text(),:) (: 'fullPath': $fullPath,:) (: 'title': max.util:teiDocTitle($dbName, $fullPath),:) (: 'dirs' : max.util:list-db-resources-as-map($dbName, $dir||'/'||$d)}:) (:};:) declare function max.util:getDocTitle($dbName, $docPath, $xmlns){ switch ($xmlns) Loading rxq/toc.xqm +21 −21 File changed.Contains only whitespace changes. Show changes Loading
rxq/config.xqm +0 −20 Original line number Diff line number Diff line Loading @@ -218,22 +218,6 @@ declare function max.config:getProjectLayoutTemplate($projectId) { (:Returns XSL for route list:) declare function max.config:getRouteListXSL($project as xs:string){ let $xsl := string(doc($max.config:CONFIGURATION_FILE)//edition[@xml:id=$project]/routeList/@xsl) return if($xsl) then max.util:maxHome() || $xsl else () }; declare function max.config:getRouteEntriesXSL($project as xs:string, $routeDoc as xs:string){ let $xsl := string(doc($max.config:CONFIGURATION_FILE)//edition[@xml:id=$project]/routeList/route[@document=$routeDoc]/@xsl) return if($xsl) then max.util:maxHome() || $xsl else () }; (: Returns project's default XSLT to apply on text :) Loading @@ -242,10 +226,6 @@ declare function max.config:getDefaultTextXSL($project as xs:string) as xs:strin return max.util:maxHome() || "/ui/xsl/" || $env || "/" || $env || ".xsl" }; (:Returns UI addon directory list:) declare function max.config:getUIAddonDirectories($project){ doc($max.config:CONFIGURATION_FILE)//edition[@xml:id=$project]//uiAddon/@dirName }; (: Returns all required xslt addons (plugins + text hook + alignment) Loading
rxq/cons.xqm +0 −6 Original line number Diff line number Diff line Loading @@ -51,12 +51,6 @@ declare variable $max.cons:AUTO_TOC := "auto"; declare variable $max.cons:CUSTOM_TOC := "custom"; declare variable $max.cons:STATIC_HTML_TOC := "static"; (:ROUTE LIST types:) (: declare variable $max.cons:CONFIG_LIST_ROUTE_TYPE := "listing"; declare variable $max.cons:HTML_FILE_ROUTE_TYPE := "html"; declare variable $max.cons:XQUERY_ROUTE_TYPE := "xquery"; declare variable $max.cons:DEFAULT_ROUTE_TYPE := "default"; :) (:context Key properties:) declare variable $max.cons:PROJECT_CONTEXT_KEY := "project"; declare variable $max.cons:BASE_URI_CONTEXT_KEY := "baseURI"; Loading
rxq/html.xqm +3 −3 Original line number Diff line number Diff line Loading @@ -28,11 +28,11 @@ as element(html) {max.html:render($projectId, $pageId, $wrapped, ())}; declare function max.html:render( $projectId as xs:string, $pageId as xs:string, $wrapped as element()+, $content as element()+, $fragmentId as xs:string ? ) as element(html) { let $head := max.html:generateHTMLHead($projectId, $wrapped) let $head := max.html:generateHTMLHead($projectId, $content) let $jsImports := max.html:generateAllJSImports($projectId, $pageId, $fragmentId) let $menu := max.html:buildMenu($projectId, $pageId, $fragmentId) let $targetId := if ($fragmentId) Loading @@ -56,7 +56,7 @@ declare function max.html:render( 'navigationSelect' : $navigationSelect, 'textOptions' : $textOptions, 'head' : $head, 'content' : $wrapped, 'content' : $content, 'footer' : max.html:getFooter($projectId), 'jsImports' : $jsImports, 'data' : max.config:getProjectData($projectId) Loading
rxq/util.xqm +0 −41 Original line number Diff line number Diff line Loading @@ -15,19 +15,6 @@ declare function max.util:rawFile($path) as item()+{ }; (: : Returns the mime-type for the specified file. : @param $name file name : @return mime type :) (: declare function max.util:mime-type( $name as xs:string ) as xs:string { Q{java:org.basex.io.MimeTypes}get($name) }; :) declare function max.util:query($query, $bindings){ xquery:eval($query, $bindings) }; Loading Loading @@ -164,12 +151,6 @@ declare function max.util:list-db-resources($project){ }; (::) (:Lists all DB resources (recursively):) (::) (:declare function max.util:list-db-resources-as-map($dbName){:) (: max.util:list-db-resources-as-map($dbName, ""):) (:};:) (: Lists all DB resources (recursively) + add href prefix on each hyperlinks Loading Loading @@ -199,28 +180,6 @@ declare function max.util:list-db-resources($projectId, $dbName, $baseURI, $xmln (: Lists all DB resources (recursively) as map :) (:declare function max.util:list-db-resources-as-map($dbName, $dir as xs:string){:) (: for $d in db:dir($dbName, $dir):) (: let $subDirs := max.util:list-db-resources-as-map($dbName, $dir||'/'||$d):) (: return:) (: let $fullPath := substring-after($dir || '/' || $d/text(),'/'):) (: return:) (: if(ends-with($d/text(),'.xml')):) (: then map{:) (: 'file' : $d/text(),:) (: 'title': max.util:teiDocTitle($dbName, $fullPath),:) (: 'fullPath': $fullPath:) (: }:) (: else:) (: map{:) (: 'file' : $d/text(),:) (: 'fullPath': $fullPath,:) (: 'title': max.util:teiDocTitle($dbName, $fullPath),:) (: 'dirs' : max.util:list-db-resources-as-map($dbName, $dir||'/'||$d)}:) (:};:) declare function max.util:getDocTitle($dbName, $docPath, $xmlns){ switch ($xmlns) Loading