Commit 450c85a3 authored by Guillaume Porte's avatar Guillaume Porte 😶
Browse files

Update toc.xqm

La variable $doc passée dans max.toc:subTOC est incomplète
parent 19ac159a
Loading
Loading
Loading
Loading
+3 −3
Changes for rxq/toc.xqm: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -69,14 +69,14 @@ declare function max.toc:buildDefaultDocumentTOC($project, $docPath){
        return 
        <li id="{$idPointer}">
          <a href="{concat(max.config:getBaseURI(),$dbPath,'/', $docPath,'/',$idPointer)}">{$title}</a>
          {max.toc:subTOC($chapter, $docPath)}
          {max.toc:subTOC($chapter, $dbPath, $docPath)}
        </li>
    }
    </ul>
  </div>
};

declare %private function max.toc:subTOC($chapter, $doc){
declare %private function max.toc:subTOC($chapter, $dbPath, $docPath){
  <ul>{
  for $subChapter in $chapter/*:div[@*:id]
    return 
@@ -84,7 +84,7 @@ declare %private function max.toc:subTOC($chapter, $doc){
      let $idPointer :=  $subChapter/@xml:id
      return
      <li id="{$idPointer}">
        <a href="{concat(max.config:getBaseURI(),$doc,'/',$idPointer)}">{$title}</a>
        <a href="{concat(max.config:getBaseURI(),$dbPath,'/', $docPath,'/',$idPointer)}">{$title} test</a>
      </li>
    }
  </ul>