Commit 66b69f9f authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

debug surcharge document_title #144.

parent ec8d8692
Loading
Loading
Loading
Loading
+22 −12
Original line number Diff line number Diff line
@@ -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,
@@ -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>
}; 

+1 −1
Original line number Diff line number Diff line
@@ -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)
};


+1 −1
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ footer {
}


.max-doc-title{
span.max-doc-title{
    display :inline-block;
    white-space: nowrap;
    overflow: hidden;
+1 −7
Original line number Diff line number Diff line
@@ -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"/>

@@ -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>