moved image attribution to end of quote/report

This commit is contained in:
skyanth 2019-05-29 13:31:25 +02:00
parent 572851361e
commit ea4634637b
3 changed files with 31 additions and 19 deletions

View File

@ -56,7 +56,14 @@
<xsl:apply-templates select="offerte"/> <xsl:apply-templates select="offerte"/>
</fo:block> </fo:block>
<xsl:if test="not(following-sibling::*)"> <xsl:if test="not(following-sibling::*)">
<fo:block id="EndOfDoc"/> <fo:block id="EndOfDoc">
<fo:footnote>
<fo:inline/>
<fo:footnote-body>
<xsl:call-template name="ImageAttribution"/>
</fo:footnote-body>
</fo:footnote>
</fo:block>
</xsl:if> </xsl:if>
</fo:flow> </fo:flow>
</fo:page-sequence> </fo:page-sequence>
@ -100,7 +107,6 @@
<fo:inline/> <fo:inline/>
<fo:footnote-body> <fo:footnote-body>
<xsl:call-template name="Contact"/> <xsl:call-template name="Contact"/>
<xsl:call-template name="ImageAttribution"/>
</fo:footnote-body> </fo:footnote-body>
</fo:footnote> </fo:footnote>
</xsl:template> </xsl:template>

View File

@ -34,7 +34,6 @@
<xsl:call-template name="DocProperties"/> <xsl:call-template name="DocProperties"/>
<xsl:call-template name="VersionControl"/> <xsl:call-template name="VersionControl"/>
<xsl:call-template name="Contact"/> <xsl:call-template name="Contact"/>
<xsl:call-template name="ImageAttribution"/>
</xsl:template> </xsl:template>
<xsl:template name="front"> <xsl:template name="front">

View File

@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:my="http://www.radical.sexy" xmlns:my="http://www.radical.sexy" exclude-result-prefixes="my xs" version="2.0">
exclude-result-prefixes="my xs" version="2.0">
<xsl:template name="layout-master-set"> <xsl:template name="layout-master-set">
@ -10,8 +9,7 @@
<fo:layout-master-set> <fo:layout-master-set>
<!-- Cover page --> <!-- Cover page -->
<fo:simple-page-master master-name="Front-Cover" xsl:use-attribute-sets="PortraitPage"> <fo:simple-page-master master-name="Front-Cover" xsl:use-attribute-sets="PortraitPage">
<fo:region-body region-name="cover-flow" xsl:use-attribute-sets="region-body-cover" <fo:region-body region-name="cover-flow" xsl:use-attribute-sets="region-body-cover">
>
<xsl:call-template name="select_frontpage_graphic"> <xsl:call-template name="select_frontpage_graphic">
<xsl:with-param name="doctype" select="local-name(/*)"/> <xsl:with-param name="doctype" select="local-name(/*)"/>
<xsl:with-param name="current_second" select="$current_second"/> <xsl:with-param name="current_second" select="$current_second"/>
@ -88,13 +86,14 @@
<xsl:param name="doctype" select="'generic'"/> <xsl:param name="doctype" select="'generic'"/>
<xsl:param name="current_second" select="1"/> <xsl:param name="current_second" select="1"/>
<xsl:variable name="graphicsdoc" <xsl:variable name="graphicsdoc"
select="document('../graphics/frontpage_graphics.xml')/frontpage_graphics/doctype[@name = $doctype]"/> select="document('../graphics/frontpage_graphics.xml')/frontpage_graphics/doctype[@name = $doctype]"/>
<xsl:variable name="available_frontpage_graphics" select="count($graphicsdoc/file)"/> <xsl:variable name="available_frontpage_graphics" select="count($graphicsdoc/file)"/>
<!-- taking the current second as a 'random number generator' --> <!-- taking the current second as a 'random number generator' -->
<xsl:variable name="selected_graphic" select="ceiling(number($available_frontpage_graphics div 60 * $current_second))"/> <xsl:variable name="selected_graphic"
select="ceiling(number($available_frontpage_graphics div 60 * $current_second))"/>
<xsl:variable name="frontpage_graphic" select="$graphicsdoc/file[$selected_graphic]/@name"/> <xsl:variable name="frontpage_graphic" select="$graphicsdoc/file[$selected_graphic]/@name"/>
<xsl:attribute name="background-image" <xsl:attribute name="background-image">url(../graphics/<xsl:value-of
>url(../graphics/<xsl:value-of select="$frontpage_graphic"/>)</xsl:attribute> select="$frontpage_graphic"/>)</xsl:attribute>
</xsl:template> </xsl:template>
<xsl:template name="page_footer"> <xsl:template name="page_footer">
@ -126,13 +125,14 @@
<xsl:template name="page_header"> <xsl:template name="page_header">
<fo:static-content flow-name="region-before-content-odd" xsl:use-attribute-sets="FooterFont"> <fo:static-content flow-name="region-before-content-odd" xsl:use-attribute-sets="FooterFont">
<fo:block xsl:use-attribute-sets="header-odd"><xsl:value-of select="//meta/classification"/> <fo:block xsl:use-attribute-sets="header-odd">
<xsl:value-of select="//meta/classification"/>
</fo:block> </fo:block>
</fo:static-content> </fo:static-content>
<fo:static-content flow-name="region-before-content-even" xsl:use-attribute-sets="FooterFont"> <fo:static-content flow-name="region-before-content-even"
<fo:block> xsl:use-attribute-sets="FooterFont">
</fo:block> <fo:block> </fo:block>
</fo:static-content> </fo:static-content>
</xsl:template> </xsl:template>
@ -191,7 +191,14 @@
<xsl:apply-templates select="."/> <xsl:apply-templates select="."/>
</fo:block> </fo:block>
<xsl:if test="not(following-sibling::*)"> <xsl:if test="not(following-sibling::*)">
<fo:block id="EndOfDoc"/> <fo:block id="EndOfDoc">
<fo:footnote>
<fo:inline/>
<fo:footnote-body>
<xsl:call-template name="ImageAttribution"/>
</fo:footnote-body>
</fo:footnote>
</fo:block>
</xsl:if> </xsl:if>
</fo:flow> </fo:flow>
</fo:page-sequence> </fo:page-sequence>