Loading plugins/tei_pdf/tei2pdf.xqm +8 −4 Original line number Diff line number Diff line Loading @@ -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"> Loading Loading
plugins/tei_pdf/tei2pdf.xqm +8 −4 Original line number Diff line number Diff line Loading @@ -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"> Loading