Commit 0df1b289 authored by Anne Goloubkoff-Duponchel's avatar Anne Goloubkoff-Duponchel
Browse files

passage d'un troisième paramètre (id) pour getTextHookFragment

parent 8347c2f8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -149,7 +149,7 @@ function max:fragmentToHTMLPage($project, $routeDoc, $id, $search as xs:string ?
    return
        let $xml :=
            <div id="wrap-{$id}">
                {max.util:getTextHookFragment($project, $routeDoc)}
                {max.util:getTextHookFragment($project, $routeDoc, $id)}
                {max.api:getXMLByID($dbPath, $id)}
            </div>
        let $txml := max:transformEditionFragment($project, $xml, $routeDoc)
@@ -186,7 +186,7 @@ function max:getFullDocument($project, $doc, $search as xs:string ?, $focus as x
    let $xmlDoc := (doc(max.config:getProjectDBPath($project) || "/" || $docName)/*)[1]
    let $xml := 
    	<div id='text'>
        	{max.util:getTextHookFragment($project, $docName)}
        	{max.util:getTextHookFragment($project, $docName, $id)}
            {$xmlDoc}
        </div>
    let $txml := max:transformEditionFragment($project, $xml, $doc)
+3 −2
Original line number Diff line number Diff line
@@ -221,7 +221,7 @@ declare function max.util:listContextFunction(){
(:----------------------------------------------------------------------------------:)


declare function max.util:getTextHookFragment($projectId, $doc){
declare function max.util:getTextHookFragment($projectId, $doc, $fragmentId){
    let $xqueryFile := max.util:maxHome()  || "editions/" || $projectId || "/" || $max.cons:TEXT_HOOK_XQUERY_FILEPATH
    return
        if(file:exists($xqueryFile))
@@ -232,7 +232,8 @@ declare function max.util:getTextHookFragment($projectId, $doc){
                        { 'project':$projectId,
                        'baseURI': max.config:getBaseURI(),
                        'dbPath':max.config:getProjectDBPath($projectId),
                        'doc': $doc
                        'doc': $doc,
                        'fragmentId' : $fragmentId
                        }
             )