Loading plugins/ead_basket/ead_basket.xqm +1 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ function max.plugin.ead_basket:basketpdf($projectId, $items){ </body> </html> let $pdf := max.util:xml2pdf($content, max.util:maxHome()||"ui/xsl/xhtml2fo.xsl",$projectId) let $pdf := max.util:xml2pdf($content, max.util:maxHome()||"ui/xsl/xhtml2fo.xsl",$projectId,$projectId) return (<rest:response> Loading plugins/ead_pdf/ead2pdf.xqm +4 −2 Original line number Diff line number Diff line Loading @@ -14,13 +14,15 @@ declare function max.plugins.ead2pdf:fragmentToPDF($project, $routeDoc, $id){ let $dbPath := max.config:getProjectDBPath($project) let $eadHeader := doc($dbPath || '/' || $routeDoc)//*:eadheader/node() let $frontmatter := doc($dbPath || '/' || $routeDoc)//*:frontmatter/node() let $content:= <ead xmlns="urn:isbn:1-931666-22-9"> <eadheader>{$eadHeader}</eadheader> <frontmatter>{$frontmatter}</frontmatter> <archdesc>{max.api:getXMLByID($dbPath, $id)}</archdesc> </ead> (: return $content :) let $pdf := max.util:xml2pdf($content, max.util:getProjectFoXsl($project), $project) let $pdf := max.util:xml2pdf($content, max.util:getProjectFoXsl($project), $project,$id) return (<rest:response> <http:response status="200"> Loading plugins/tei_pdf/tei2pdf.xqm +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ function max.plugins.tei2pdf:fragmentToPDF($project, $routeDoc, $id){ <text>{max.api:getXMLByID($dbPath, $id)}</text> </TEI> let $pdf := max.util:xml2pdf($content, max.util:getProjectFoXsl($project),$project) let $pdf := max.util:xml2pdf($content, max.util:getProjectFoXsl($project),$project,$id) return (<rest:response> <http:response status="200"> Loading rxq/ead/document_title.xq +4 −2 Original line number Diff line number Diff line Loading @@ -2,6 +2,8 @@ xquery version "3.0"; declare namespace ead="urn:isbn:1-931666-22-9"; declare variable $documentPath external; let $title := doc($documentPath)/*:ead/*:eadheader/*:filedesc/*:titlestmt return <span><title>{$title}</title></span> No newline at end of file doc($documentPath)//ead:ead/ead:eadheader/ead:filedesc/ead:titlestmt rxq/util.xqm +3 −2 Original line number Diff line number Diff line Loading @@ -77,9 +77,10 @@ declare function max.util:addHTMLClass($htmlNode as node(), $targetId as xs:stri (:xml 2 fo 2 pdf:) declare function max.util:xml2pdf($xml as element(), $xsl as xs:string, $project as xs:string){ declare function max.util:xml2pdf($xml as element(), $xsl as xs:string, $project as xs:string, $id){ let $projectPrettyName := max.config:getProjectPrettyName($project) let $xsl := xslt:transform($xml, $xsl, map{ "prettyName":$projectPrettyName}) let $baseURI:= max.config:getBaseURI() let $xsl := xslt:transform($xml, $xsl, map{ "prettyName":$projectPrettyName,"idProject":$id}) let $pdf := fop:transform($xsl) return $pdf (: return file:write-binary('fop.pdf', $pdf):) Loading Loading
plugins/ead_basket/ead_basket.xqm +1 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ function max.plugin.ead_basket:basketpdf($projectId, $items){ </body> </html> let $pdf := max.util:xml2pdf($content, max.util:maxHome()||"ui/xsl/xhtml2fo.xsl",$projectId) let $pdf := max.util:xml2pdf($content, max.util:maxHome()||"ui/xsl/xhtml2fo.xsl",$projectId,$projectId) return (<rest:response> Loading
plugins/ead_pdf/ead2pdf.xqm +4 −2 Original line number Diff line number Diff line Loading @@ -14,13 +14,15 @@ declare function max.plugins.ead2pdf:fragmentToPDF($project, $routeDoc, $id){ let $dbPath := max.config:getProjectDBPath($project) let $eadHeader := doc($dbPath || '/' || $routeDoc)//*:eadheader/node() let $frontmatter := doc($dbPath || '/' || $routeDoc)//*:frontmatter/node() let $content:= <ead xmlns="urn:isbn:1-931666-22-9"> <eadheader>{$eadHeader}</eadheader> <frontmatter>{$frontmatter}</frontmatter> <archdesc>{max.api:getXMLByID($dbPath, $id)}</archdesc> </ead> (: return $content :) let $pdf := max.util:xml2pdf($content, max.util:getProjectFoXsl($project), $project) let $pdf := max.util:xml2pdf($content, max.util:getProjectFoXsl($project), $project,$id) return (<rest:response> <http:response status="200"> Loading
plugins/tei_pdf/tei2pdf.xqm +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ function max.plugins.tei2pdf:fragmentToPDF($project, $routeDoc, $id){ <text>{max.api:getXMLByID($dbPath, $id)}</text> </TEI> let $pdf := max.util:xml2pdf($content, max.util:getProjectFoXsl($project),$project) let $pdf := max.util:xml2pdf($content, max.util:getProjectFoXsl($project),$project,$id) return (<rest:response> <http:response status="200"> Loading
rxq/ead/document_title.xq +4 −2 Original line number Diff line number Diff line Loading @@ -2,6 +2,8 @@ xquery version "3.0"; declare namespace ead="urn:isbn:1-931666-22-9"; declare variable $documentPath external; let $title := doc($documentPath)/*:ead/*:eadheader/*:filedesc/*:titlestmt return <span><title>{$title}</title></span> No newline at end of file doc($documentPath)//ead:ead/ead:eadheader/ead:filedesc/ead:titlestmt
rxq/util.xqm +3 −2 Original line number Diff line number Diff line Loading @@ -77,9 +77,10 @@ declare function max.util:addHTMLClass($htmlNode as node(), $targetId as xs:stri (:xml 2 fo 2 pdf:) declare function max.util:xml2pdf($xml as element(), $xsl as xs:string, $project as xs:string){ declare function max.util:xml2pdf($xml as element(), $xsl as xs:string, $project as xs:string, $id){ let $projectPrettyName := max.config:getProjectPrettyName($project) let $xsl := xslt:transform($xml, $xsl, map{ "prettyName":$projectPrettyName}) let $baseURI:= max.config:getBaseURI() let $xsl := xslt:transform($xml, $xsl, map{ "prettyName":$projectPrettyName,"idProject":$id}) let $pdf := fop:transform($xsl) return $pdf (: return file:write-binary('fop.pdf', $pdf):) Loading