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/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 ui/xsl/ead/ead2fo.xsl +31 −53 Original line number Diff line number Diff line Loading @@ -10,7 +10,8 @@ <!-- Chargement des styles --> <xsl:import href="styles/styles-fo.xsl"/> <!-- La sortie de l'en-tête est dans un fichier à part --> <xsl:import href="styles/header.xsl"/> <xsl:import href="headerfo.xsl"/> <xsl:import href="footerfo.xsl"/> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:param name="prettyName"/> Loading @@ -32,9 +33,9 @@ <!-- équivalent du head html --> <fo:layout-master-set> <!-- Les gabarits de page. Au moins 1 simple-page-master obligatoire--> <fo:simple-page-master master-name="eadheader" margin-top="40mm" margin-bottom="10mm" margin-left="20mm" margin-right="40mm"> <fo:simple-page-master master-name="couverture" margin-top="40mm" margin-bottom="5mm" margin-left="20mm" margin-right="40mm"> <fo:region-body margin-bottom="20mm" margin-top="20mm"/> <fo:region-after extent="1cm" region-name="pied-premiere"/> <fo:region-after extent="1cm" region-name="pied-couverture"/> </fo:simple-page-master> <fo:simple-page-master master-name="premiere" margin-top="10mm" margin-bottom="10mm" margin-left="25mm" margin-right="25mm"> Loading Loading @@ -64,11 +65,12 @@ </fo:page-sequence-master> </fo:layout-master-set> <!-- La première page contenant les métadonnées du eadheader, la séquence de page utilise le modèle "eadheader" décrit plus haut --> <fo:page-sequence master-reference="eadheader"> <fo:static-content flow-name="pied-premiere"> <fo:block text-align="left" font-size="9pt" space-after="6pt"> <xsl:value-of select="../ead:eadheader/ead:filedesc/ead:publicationstmt/ead:publisher"/> – <!-- La première page contenant les métadonnées du eadheader, la séquence de page utilise le modèle "couverture" décrit plus haut --> <fo:page-sequence master-reference="couverture"> <fo:static-content flow-name="pied-couverture"> <fo:block text-align="left" font-size="8pt" space-after="6pt"> <xsl:value-of select="../ead:eadheader/ead:filedesc/ead:publicationstmt/ead:publisher"/> <xsl:text> – </xsl:text> <xsl:value-of select="format-dateTime(current-dateTime(),'[D,2]/[M,2]/[Y]')" /> </fo:block> </fo:static-content> Loading @@ -80,14 +82,16 @@ <xsl:value-of select="../ead:eadheader/ead:filedesc/ead:titlestmt/ead:titleproper"/> </fo:block> <fo:block text-align="left" font-size="10pt" space-after="6pt"> Auteur(s) : <xsl:value-of select="../ead:eadheader/ead:filedesc/ead:titlestmt/ead:author"/> <xsl:text>Auteur(s) : </xsl:text> <xsl:value-of select="../ead:eadheader/ead:filedesc/ead:titlestmt/ead:author"/> </fo:block> <fo:block text-align="left" font-size="10pt" space-after="6pt"> Commanditaire : <xsl:value-of select="../ead:eadheader/ead:filedesc/ead:titlestmt/ead:sponsor"/> <xsl:if test="../ead:eadheader/ead:filedesc/ead:titlestmt/ead:sponsor"> <xsl:text>Commanditaire : </xsl:text> <xsl:value-of select="../ead:eadheader/ead:filedesc/ead:titlestmt/ead:sponsor"/> </xsl:if> </fo:block> </fo:flow> </fo:page-sequence> <!-- Début du document, la séquence de page utilise le modèle "corps" décrit plus haut --> Loading @@ -104,24 +108,8 @@ </xsl:call-template> </fo:static-content> <fo:static-content flow-name="pied-impaire"> <fo:table> <fo:table-body> <fo:table-row> <fo:table-cell> <fo:block text-align="left" font-family="Times" font-size="7pt"> <xsl:value-of select="$idProject" /><xsl:text> – </xsl:text> <xsl:value-of select="format-dateTime(current-dateTime(),'[D,2]/[M,2]/[Y]')" /> </fo:block> </fo:table-cell> <!-- <fo:inline text-align="right" font-family="Times" font-size="8pt"> --> <fo:table-cell> <fo:block text-align="right" font-family="Times" font-size="8pt"> <fo:page-number/> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <xsl:call-template name="pied-impaire"> </xsl:call-template> </fo:static-content> <fo:static-content flow-name="entete-paire"> <xsl:call-template name="output-header"> Loading @@ -129,25 +117,8 @@ </xsl:call-template> </fo:static-content> <fo:static-content flow-name="pied-paire"> <fo:table> <fo:table-body> <fo:table-row> <fo:table-cell> <fo:block text-align="left" font-family="Times" font-size="8pt"> <!-- <fo:page-number/> --> Page <fo:page-number/> <!-- <page-number-citation ref-id="last-page"/> --> </fo:block> </fo:table-cell> <!-- <fo:inline text-align="right" font-family="Times" font-size="8pt"> --> <fo:table-cell> <fo:block text-align="right" font-family="Times" font-size="7pt"> <xsl:value-of select="$idProject" /><xsl:text> – </xsl:text><xsl:value-of select="format-dateTime(current-dateTime(),'[D,2]/[M,2]/[Y]')" /> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <xsl:call-template name="pied-paire"> </xsl:call-template> </fo:static-content> <fo:static-content flow-name="xsl-footnote-separator"> <fo:block> Loading Loading @@ -271,7 +242,7 @@ </fo:table-row> </xsl:template> <xsl:template match="ead:dimensions | ead:extent | ead:physfacet"> <xsl:template match="ead:dimensions | ead:extent | ead:physfacet | ead:address"> <fo:block> <fo:inline xsl:use-attribute-sets="label"> <xsl:choose> Loading Loading @@ -313,6 +284,13 @@ </xsl:if> </xsl:template> <xsl:template match="ead:address/ead:addressline"> <xsl:apply-templates/> <xsl:if test="position() != last()"> <xsl:text> ; </xsl:text> </xsl:if> </xsl:template> <xsl:template match="ead:accessrestrict | ead:accruals | ead:acqinfo | ead:altformavail | ead:appraisal | ead:arrangement | ead:bibliography | ead:bioghist | ead:controlaccess | ead:custodhist | ead:odd | ead:originalsloc | ead:otherfindaid | ead:phystech | ead:prefercite | ead:processinfo | ead:relatedmaterial | ead:scopecontent | ead:separatedmaterial | ead:userestrict | ead:c/ead:daogroup"> <fo:block xsl:use-attribute-sets="div"> <xsl:choose> Loading @@ -324,12 +302,12 @@ <xsl:when test="@type"> <xsl:choose> <xsl:when test="parent::ead:odd"> <fo:block xsl:use-attribute-sets="head2"> <fo:block xsl:use-attribute-sets="head2" keep-with-next="always"> <xsl:value-of select="@type"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:block xsl:use-attribute-sets="head1"> <fo:block xsl:use-attribute-sets="head1" keep-with-next="always"> <xsl:value-of select="@type"/> </fo:block> </xsl:otherwise> Loading ui/xsl/ead/footerfo.xsl 0 → 100644 +60 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/XSL/Format" xmlns:ead="urn:isbn:1-931666-22-9" xmlns:i18n="http://apache.org/cocoon/i18n/2.1" exclude-result-prefixes="xsl xhtml"> <!-- Le template de l'en-tête --> <xsl:template name="pied-impaire"> <block> <table> <table-body> <table-row> <table-cell> <block text-align="left" font-family="Times" font-size="7pt"> <xsl:value-of select="$idProject" /> <xsl:text> – </xsl:text> <xsl:value-of select="format-dateTime(current-dateTime(),'[D,2]/[M,2]/[Y]')" /> </block> </table-cell> <table-cell> <block text-align="right" font-family="Times" font-size="8pt"> <xsl:text>Page </xsl:text> <page-number/> </block> </table-cell> </table-row> </table-body> </table> </block> </xsl:template> <xsl:template name="pied-paire"> <table> <table-body> <table-row> <table-cell> <block text-align="left" font-family="Times" font-size="8pt"> <!-- <page-number/> --> <xsl:text>Page </xsl:text> <page-number/> <!-- <page-number-citation ref-id="last-page"/> --> </block> </table-cell> <table-cell> <block text-align="right" font-family="Times" font-size="7pt"> <xsl:value-of select="$idProject" /> <xsl:text> – </xsl:text> <xsl:value-of select="format-dateTime(current-dateTime(),'[D,2]/[M,2]/[Y]')" /> </block> </table-cell> </table-row> </table-body> </table> </xsl:template> </xsl:stylesheet> No newline at end of file ui/xsl/ead/headerfo.xsl 0 → 100644 +29 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/XSL/Format" xmlns:ead="urn:isbn:1-931666-22-9" xmlns:i18n="http://apache.org/cocoon/i18n/2.1" exclude-result-prefixes="xsl xhtml"> <!-- Le template de l'en-tête --> <xsl:template name="output-header"> <xsl:param name="pretty-name"/> <xsl:param name="bloc-biblio"/> <!-- Un block-container permet de fixer une hauteur, et donc d'ajuster l'image de fond --> <block-container xsl:use-attribute-sets="containerPrettyName"> <!-- Le contenu --> <block xsl:use-attribute-sets="prettyName"> <xsl:value-of select="$pretty-name"/> </block> </block-container> <block xsl:use-attribute-sets="titlePage"> <xsl:apply-templates select="../*:frontmatter/*:titlepage"/> </block> </xsl:template> </xsl:stylesheet> No newline at end of file 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/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
ui/xsl/ead/ead2fo.xsl +31 −53 Original line number Diff line number Diff line Loading @@ -10,7 +10,8 @@ <!-- Chargement des styles --> <xsl:import href="styles/styles-fo.xsl"/> <!-- La sortie de l'en-tête est dans un fichier à part --> <xsl:import href="styles/header.xsl"/> <xsl:import href="headerfo.xsl"/> <xsl:import href="footerfo.xsl"/> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:param name="prettyName"/> Loading @@ -32,9 +33,9 @@ <!-- équivalent du head html --> <fo:layout-master-set> <!-- Les gabarits de page. Au moins 1 simple-page-master obligatoire--> <fo:simple-page-master master-name="eadheader" margin-top="40mm" margin-bottom="10mm" margin-left="20mm" margin-right="40mm"> <fo:simple-page-master master-name="couverture" margin-top="40mm" margin-bottom="5mm" margin-left="20mm" margin-right="40mm"> <fo:region-body margin-bottom="20mm" margin-top="20mm"/> <fo:region-after extent="1cm" region-name="pied-premiere"/> <fo:region-after extent="1cm" region-name="pied-couverture"/> </fo:simple-page-master> <fo:simple-page-master master-name="premiere" margin-top="10mm" margin-bottom="10mm" margin-left="25mm" margin-right="25mm"> Loading Loading @@ -64,11 +65,12 @@ </fo:page-sequence-master> </fo:layout-master-set> <!-- La première page contenant les métadonnées du eadheader, la séquence de page utilise le modèle "eadheader" décrit plus haut --> <fo:page-sequence master-reference="eadheader"> <fo:static-content flow-name="pied-premiere"> <fo:block text-align="left" font-size="9pt" space-after="6pt"> <xsl:value-of select="../ead:eadheader/ead:filedesc/ead:publicationstmt/ead:publisher"/> – <!-- La première page contenant les métadonnées du eadheader, la séquence de page utilise le modèle "couverture" décrit plus haut --> <fo:page-sequence master-reference="couverture"> <fo:static-content flow-name="pied-couverture"> <fo:block text-align="left" font-size="8pt" space-after="6pt"> <xsl:value-of select="../ead:eadheader/ead:filedesc/ead:publicationstmt/ead:publisher"/> <xsl:text> – </xsl:text> <xsl:value-of select="format-dateTime(current-dateTime(),'[D,2]/[M,2]/[Y]')" /> </fo:block> </fo:static-content> Loading @@ -80,14 +82,16 @@ <xsl:value-of select="../ead:eadheader/ead:filedesc/ead:titlestmt/ead:titleproper"/> </fo:block> <fo:block text-align="left" font-size="10pt" space-after="6pt"> Auteur(s) : <xsl:value-of select="../ead:eadheader/ead:filedesc/ead:titlestmt/ead:author"/> <xsl:text>Auteur(s) : </xsl:text> <xsl:value-of select="../ead:eadheader/ead:filedesc/ead:titlestmt/ead:author"/> </fo:block> <fo:block text-align="left" font-size="10pt" space-after="6pt"> Commanditaire : <xsl:value-of select="../ead:eadheader/ead:filedesc/ead:titlestmt/ead:sponsor"/> <xsl:if test="../ead:eadheader/ead:filedesc/ead:titlestmt/ead:sponsor"> <xsl:text>Commanditaire : </xsl:text> <xsl:value-of select="../ead:eadheader/ead:filedesc/ead:titlestmt/ead:sponsor"/> </xsl:if> </fo:block> </fo:flow> </fo:page-sequence> <!-- Début du document, la séquence de page utilise le modèle "corps" décrit plus haut --> Loading @@ -104,24 +108,8 @@ </xsl:call-template> </fo:static-content> <fo:static-content flow-name="pied-impaire"> <fo:table> <fo:table-body> <fo:table-row> <fo:table-cell> <fo:block text-align="left" font-family="Times" font-size="7pt"> <xsl:value-of select="$idProject" /><xsl:text> – </xsl:text> <xsl:value-of select="format-dateTime(current-dateTime(),'[D,2]/[M,2]/[Y]')" /> </fo:block> </fo:table-cell> <!-- <fo:inline text-align="right" font-family="Times" font-size="8pt"> --> <fo:table-cell> <fo:block text-align="right" font-family="Times" font-size="8pt"> <fo:page-number/> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <xsl:call-template name="pied-impaire"> </xsl:call-template> </fo:static-content> <fo:static-content flow-name="entete-paire"> <xsl:call-template name="output-header"> Loading @@ -129,25 +117,8 @@ </xsl:call-template> </fo:static-content> <fo:static-content flow-name="pied-paire"> <fo:table> <fo:table-body> <fo:table-row> <fo:table-cell> <fo:block text-align="left" font-family="Times" font-size="8pt"> <!-- <fo:page-number/> --> Page <fo:page-number/> <!-- <page-number-citation ref-id="last-page"/> --> </fo:block> </fo:table-cell> <!-- <fo:inline text-align="right" font-family="Times" font-size="8pt"> --> <fo:table-cell> <fo:block text-align="right" font-family="Times" font-size="7pt"> <xsl:value-of select="$idProject" /><xsl:text> – </xsl:text><xsl:value-of select="format-dateTime(current-dateTime(),'[D,2]/[M,2]/[Y]')" /> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <xsl:call-template name="pied-paire"> </xsl:call-template> </fo:static-content> <fo:static-content flow-name="xsl-footnote-separator"> <fo:block> Loading Loading @@ -271,7 +242,7 @@ </fo:table-row> </xsl:template> <xsl:template match="ead:dimensions | ead:extent | ead:physfacet"> <xsl:template match="ead:dimensions | ead:extent | ead:physfacet | ead:address"> <fo:block> <fo:inline xsl:use-attribute-sets="label"> <xsl:choose> Loading Loading @@ -313,6 +284,13 @@ </xsl:if> </xsl:template> <xsl:template match="ead:address/ead:addressline"> <xsl:apply-templates/> <xsl:if test="position() != last()"> <xsl:text> ; </xsl:text> </xsl:if> </xsl:template> <xsl:template match="ead:accessrestrict | ead:accruals | ead:acqinfo | ead:altformavail | ead:appraisal | ead:arrangement | ead:bibliography | ead:bioghist | ead:controlaccess | ead:custodhist | ead:odd | ead:originalsloc | ead:otherfindaid | ead:phystech | ead:prefercite | ead:processinfo | ead:relatedmaterial | ead:scopecontent | ead:separatedmaterial | ead:userestrict | ead:c/ead:daogroup"> <fo:block xsl:use-attribute-sets="div"> <xsl:choose> Loading @@ -324,12 +302,12 @@ <xsl:when test="@type"> <xsl:choose> <xsl:when test="parent::ead:odd"> <fo:block xsl:use-attribute-sets="head2"> <fo:block xsl:use-attribute-sets="head2" keep-with-next="always"> <xsl:value-of select="@type"/> </fo:block> </xsl:when> <xsl:otherwise> <fo:block xsl:use-attribute-sets="head1"> <fo:block xsl:use-attribute-sets="head1" keep-with-next="always"> <xsl:value-of select="@type"/> </fo:block> </xsl:otherwise> Loading
ui/xsl/ead/footerfo.xsl 0 → 100644 +60 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/XSL/Format" xmlns:ead="urn:isbn:1-931666-22-9" xmlns:i18n="http://apache.org/cocoon/i18n/2.1" exclude-result-prefixes="xsl xhtml"> <!-- Le template de l'en-tête --> <xsl:template name="pied-impaire"> <block> <table> <table-body> <table-row> <table-cell> <block text-align="left" font-family="Times" font-size="7pt"> <xsl:value-of select="$idProject" /> <xsl:text> – </xsl:text> <xsl:value-of select="format-dateTime(current-dateTime(),'[D,2]/[M,2]/[Y]')" /> </block> </table-cell> <table-cell> <block text-align="right" font-family="Times" font-size="8pt"> <xsl:text>Page </xsl:text> <page-number/> </block> </table-cell> </table-row> </table-body> </table> </block> </xsl:template> <xsl:template name="pied-paire"> <table> <table-body> <table-row> <table-cell> <block text-align="left" font-family="Times" font-size="8pt"> <!-- <page-number/> --> <xsl:text>Page </xsl:text> <page-number/> <!-- <page-number-citation ref-id="last-page"/> --> </block> </table-cell> <table-cell> <block text-align="right" font-family="Times" font-size="7pt"> <xsl:value-of select="$idProject" /> <xsl:text> – </xsl:text> <xsl:value-of select="format-dateTime(current-dateTime(),'[D,2]/[M,2]/[Y]')" /> </block> </table-cell> </table-row> </table-body> </table> </xsl:template> </xsl:stylesheet> No newline at end of file
ui/xsl/ead/headerfo.xsl 0 → 100644 +29 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/XSL/Format" xmlns:ead="urn:isbn:1-931666-22-9" xmlns:i18n="http://apache.org/cocoon/i18n/2.1" exclude-result-prefixes="xsl xhtml"> <!-- Le template de l'en-tête --> <xsl:template name="output-header"> <xsl:param name="pretty-name"/> <xsl:param name="bloc-biblio"/> <!-- Un block-container permet de fixer une hauteur, et donc d'ajuster l'image de fond --> <block-container xsl:use-attribute-sets="containerPrettyName"> <!-- Le contenu --> <block xsl:use-attribute-sets="prettyName"> <xsl:value-of select="$pretty-name"/> </block> </block-container> <block xsl:use-attribute-sets="titlePage"> <xsl:apply-templates select="../*:frontmatter/*:titlepage"/> </block> </xsl:template> </xsl:stylesheet> No newline at end of file