Loading plugins/tei_pdf/tei2pdf.xqm +6 −4 Original line number Diff line number Diff line Loading @@ -10,10 +10,11 @@ import module namespace max.util = 'pddn/max/util' at '../../rxq/util.xqm'; declare %rest:GET %rest:produces("application/pdf") %rest:path("/{$project}/{$routeDoc=.*\.xml}/{$id}.pdf") function max.plugins.tei2pdf:fragmentToPDF($project, $routeDoc, $id){ %rest:path("/{$project}/{$id}.pdf") function max.plugins.tei2pdf:fragmentToPDF($project, $id){ let $dbPath := max.config:getProjectDBPath($project) let $teiHeader := doc($dbPath || '/' || $routeDoc)//*:teiHeader let $doc := base-uri(root(collection($dbPath)//*[@xml:id=$id or @id=$id])) let $teiHeader := doc($doc)//*:teiHeader let $content:= max.api:getXMLByID($dbPath, $id) let $wrappedContent := if($content//self::*:TEI) Loading @@ -21,9 +22,10 @@ function max.plugins.tei2pdf:fragmentToPDF($project, $routeDoc, $id){ else( <TEI xmlns="http://www.tei-c.org/ns/1.0"> <teiHeader>{$teiHeader}</teiHeader> <text>{$content}</text> <text>{max.api:getXMLByID($dbPath, $id)}</text> </TEI> ) let $pdf := max.util:xml2pdf($wrappedContent, max.util:getProjectFoXsl($project),$project,$id) return (<rest:response> Loading plugins/tei_pdf/tei_pdf.xq +2 −2 Original line number Diff line number Diff line declare variable $project external; declare variable $id external; <div class="tei2pdf"> <a role="button" title="Export pdf" target="_blank" href="./{$id}.pdf"> <a role="button" title="Export pdf" target="_blank" href="/{$project}/{$id}.pdf"> ⇪<span class="texte">PDF</span> </a> </div> Loading Loading
plugins/tei_pdf/tei2pdf.xqm +6 −4 Original line number Diff line number Diff line Loading @@ -10,10 +10,11 @@ import module namespace max.util = 'pddn/max/util' at '../../rxq/util.xqm'; declare %rest:GET %rest:produces("application/pdf") %rest:path("/{$project}/{$routeDoc=.*\.xml}/{$id}.pdf") function max.plugins.tei2pdf:fragmentToPDF($project, $routeDoc, $id){ %rest:path("/{$project}/{$id}.pdf") function max.plugins.tei2pdf:fragmentToPDF($project, $id){ let $dbPath := max.config:getProjectDBPath($project) let $teiHeader := doc($dbPath || '/' || $routeDoc)//*:teiHeader let $doc := base-uri(root(collection($dbPath)//*[@xml:id=$id or @id=$id])) let $teiHeader := doc($doc)//*:teiHeader let $content:= max.api:getXMLByID($dbPath, $id) let $wrappedContent := if($content//self::*:TEI) Loading @@ -21,9 +22,10 @@ function max.plugins.tei2pdf:fragmentToPDF($project, $routeDoc, $id){ else( <TEI xmlns="http://www.tei-c.org/ns/1.0"> <teiHeader>{$teiHeader}</teiHeader> <text>{$content}</text> <text>{max.api:getXMLByID($dbPath, $id)}</text> </TEI> ) let $pdf := max.util:xml2pdf($wrappedContent, max.util:getProjectFoXsl($project),$project,$id) return (<rest:response> Loading
plugins/tei_pdf/tei_pdf.xq +2 −2 Original line number Diff line number Diff line declare variable $project external; declare variable $id external; <div class="tei2pdf"> <a role="button" title="Export pdf" target="_blank" href="./{$id}.pdf"> <a role="button" title="Export pdf" target="_blank" href="/{$project}/{$id}.pdf"> ⇪<span class="texte">PDF</span> </a> </div> Loading