Loading rxq/toc.xqm +22 −12 Original line number Diff line number Diff line Loading @@ -49,8 +49,17 @@ declare function max.toc:getDocumentTOC($project, $doc){ 'locale': max.i18n:getLang($project) }) let $docTitle := max.util:getDocTitle(max.config:getProjectDBPath($project),$doc, max.config:getXMLFormat($project)) let $docTitleXSL := max.util:getDocumentTitleTOCXSL($project) let $transformedDocTitle := copy $c := xslt:transform($docTitle, $docTitleXSL) modify ( rename node $c/*[1] as "h1" ) return $c let $tocXSL := max.util:getProjectDocumentTOCXSL($project) return let $tocHTML:= if(file:exists($tocXSL)) then xslt:transform($xml, Loading @@ -62,6 +71,7 @@ declare function max.toc:getDocumentTOC($project, $doc){ "docTitle": max.util:getDocTitle(max.config:getProjectDBPath($project),$doc, max.config:getXMLFormat($project)) })/*[1] else $xml return <div>{ $transformedDocTitle}{$tocHTML}</div> }; rxq/util.xqm +1 −1 Original line number Diff line number Diff line Loading @@ -256,7 +256,7 @@ declare function max.util:getProjectTOCXSL($projectId) { let $xsltFile := max.util:getResourceFilePath($projectId, "/ui/xsl/"|| $max.cons:TOC_XSL_FILENAME) return if(file:exists($xsltFile)) then $xsltFile else max.util:getResourceFilePath($projectId, "/ui/xsl/core/" || $max.cons:TOC_XSL_FILENAME) else max.util:getResourceFilePath($projectId, "/ui/xsl/"|| $xmlFormat || "/" || $max.cons:TOC_XSL_FILENAME) }; Loading ui/css/tei.css +1 −1 Original line number Diff line number Diff line Loading @@ -117,7 +117,7 @@ footer { } .max-doc-title{ span.max-doc-title{ display :inline-block; white-space: nowrap; overflow: hidden; Loading ui/xsl/tei/document_toc.xsl +1 −7 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:max="https://max.unicaen.fr" exclude-result-prefixes="tei"> exclude-result-prefixes="tei max"> <xsl:import href="../core/i18n.xsl"/> Loading @@ -14,13 +14,7 @@ <xsl:template match="/"> <div id="document-toc"> <h1> <em> <xsl:value-of select="max:i18n($project,'menu.sommaire',$locale)"/> - <xsl:value-of select="$docTitle"/> </em> </h1> <xsl:apply-templates/> </div> </xsl:template> Loading Loading
rxq/toc.xqm +22 −12 Original line number Diff line number Diff line Loading @@ -49,8 +49,17 @@ declare function max.toc:getDocumentTOC($project, $doc){ 'locale': max.i18n:getLang($project) }) let $docTitle := max.util:getDocTitle(max.config:getProjectDBPath($project),$doc, max.config:getXMLFormat($project)) let $docTitleXSL := max.util:getDocumentTitleTOCXSL($project) let $transformedDocTitle := copy $c := xslt:transform($docTitle, $docTitleXSL) modify ( rename node $c/*[1] as "h1" ) return $c let $tocXSL := max.util:getProjectDocumentTOCXSL($project) return let $tocHTML:= if(file:exists($tocXSL)) then xslt:transform($xml, Loading @@ -62,6 +71,7 @@ declare function max.toc:getDocumentTOC($project, $doc){ "docTitle": max.util:getDocTitle(max.config:getProjectDBPath($project),$doc, max.config:getXMLFormat($project)) })/*[1] else $xml return <div>{ $transformedDocTitle}{$tocHTML}</div> };
rxq/util.xqm +1 −1 Original line number Diff line number Diff line Loading @@ -256,7 +256,7 @@ declare function max.util:getProjectTOCXSL($projectId) { let $xsltFile := max.util:getResourceFilePath($projectId, "/ui/xsl/"|| $max.cons:TOC_XSL_FILENAME) return if(file:exists($xsltFile)) then $xsltFile else max.util:getResourceFilePath($projectId, "/ui/xsl/core/" || $max.cons:TOC_XSL_FILENAME) else max.util:getResourceFilePath($projectId, "/ui/xsl/"|| $xmlFormat || "/" || $max.cons:TOC_XSL_FILENAME) }; Loading
ui/css/tei.css +1 −1 Original line number Diff line number Diff line Loading @@ -117,7 +117,7 @@ footer { } .max-doc-title{ span.max-doc-title{ display :inline-block; white-space: nowrap; overflow: hidden; Loading
ui/xsl/tei/document_toc.xsl +1 −7 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:max="https://max.unicaen.fr" exclude-result-prefixes="tei"> exclude-result-prefixes="tei max"> <xsl:import href="../core/i18n.xsl"/> Loading @@ -14,13 +14,7 @@ <xsl:template match="/"> <div id="document-toc"> <h1> <em> <xsl:value-of select="max:i18n($project,'menu.sommaire',$locale)"/> - <xsl:value-of select="$docTitle"/> </em> </h1> <xsl:apply-templates/> </div> </xsl:template> Loading