Commit 631b96bc authored by Orderic-Vital Pain's avatar Orderic-Vital Pain
Browse files

Modif du plugin tei2pdf

parent cd16b39a
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -14,13 +14,17 @@ declare
function max.plugins.tei2pdf:fragmentToPDF($project, $routeDoc, $id){
    let $dbPath := max.config:getProjectDBPath($project)
    let $teiHeader := doc($dbPath || '/' || $routeDoc)//*:teiHeader
    let $content:=
    let $content:= max.api:getXMLByID($dbPath, $id)
    let $wrappedContent :=
        if($content//self::*:TEI)
        then($content)
        else(
        <TEI xmlns="http://www.tei-c.org/ns/1.0">
            <teiHeader>{$teiHeader}</teiHeader>
            <text>{max.api:getXMLByID($dbPath, $id)}</text>
            <text>{$content}</text>
        </TEI>
    (: return $content :)
    let $pdf := max.util:xml2pdf($content, max.util:getProjectFoXsl($project),$project,$id)
        )
    let $pdf := max.util:xml2pdf($wrappedContent, max.util:getProjectFoXsl($project),$project,$id)
    return
        (<rest:response>
            <http:response status="200">