Commit ea4d930d authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

correctif alignement : les liens du sommaire étaient faux : .../ au lieu de ...//

parent 6c1a77a6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -49,14 +49,14 @@ declare function max.alignment:runAlignmentQuery($project, $routeId, $id1 as xs:
                }
                       
          )
        else max.alignment:runDefaultAlignmentQuery($project, $routeId, $id1, $id2)
        else max.alignment:runDefaultAlignmentQuery($project, $id1, $id2)

};

(:
  Runs default alignment xquery
:)
declare function max.alignment:runDefaultAlignmentQuery($project, $routeId, $id1 as xs:string, $id2 as xs:string){
declare function max.alignment:runDefaultAlignmentQuery($project, $id1 as xs:string, $id2 as xs:string){
  let $dbPath := max.config:getProjectDBPath($project)
  return 
  <align>
+7 −2
Original line number Diff line number Diff line
@@ -2,8 +2,8 @@ xquery version "3.0";

module namespace max.tei_toc = "pddn/max/tei/tei_toc.xqm";
declare default element namespace "http://www.tei-c.org/ns/1.0";
(:declare namespace tei = "http://www.tei-c.org/ns/1.0";:)
import module namespace max.config = 'pddn/max/config' at '../config.xqm';
import module namespace max.alignment = 'pddn/max/alignment' at '../alignment.xqm';

declare function max.tei_toc:buildTEIDocumentTOC($project, $docPath){
    let $dbPath := max.config:getProjectDBPath($project)
@@ -14,8 +14,13 @@ declare function max.tei_toc:buildTEIDocumentTOC($project, $docPath){
                for $chapter in $doc//body/div[@type and @xml:id] where $chapter/head
                let $title := $chapter/head
                let $idPointer := $chapter/@xml:id

                let $href:= if(max.config:isAlignedRoute($docPath))
                    then max.alignment:buildFragmentLinkFromID(max.config:getBaseURI(), $project, $docPath, $idPointer)
                    else concat(max.config:getBaseURI(), $project, '/', $docPath, '/', $idPointer)

                return
                    <li id="{$idPointer}" data-href='{concat(max.config:getBaseURI(), $project, '/', $docPath, '/', $idPointer)}'>
                    <li id="{$idPointer}" data-href='{$href}'>
                        {$title}
                        {max.tei_toc:subTOC($chapter, $project, $docPath)}
                    </li>