Apply MPPDF-5 and MPPDF-6 form Arnaud Heritier
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114708 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:j="jelly:core">
|
||||
|
||||
<postGoal name="site">
|
||||
<attainGoal name="pdf"/>
|
||||
<attainGoal name="pdf"/>
|
||||
</postGoal>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project
|
||||
xmlns:j="jelly:core"
|
||||
xmlns:u="jelly:util"
|
||||
xmlns:ant="jelly:ant"
|
||||
xmlns:maven="jelly:maven">
|
||||
<project xmlns:j="jelly:core" xmlns:u="jelly:util" xmlns:ant="jelly:ant" xmlns:maven="jelly:maven">
|
||||
<goal name="pdf:init" prereqs="xdoc:init">
|
||||
<j:set var="docsXdocSrc" value="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.docs.src')}"/>
|
||||
<j:set var="docsDest" value="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.docs.dest')}"/>
|
||||
@@ -20,7 +16,7 @@
|
||||
<j:set var="coverVersion" value="${pom.getPluginContext('maven-pdf-plugin').getVariable('maven.pdf.cover.version')}"/>
|
||||
<j:set var="coverDate" value="${pom.getPluginContext('maven-pdf-plugin').getVariable('maven.pdf.cover.date')}"/>
|
||||
<tstamp>
|
||||
<format property="coverDate" pattern="${maven.xdoc.date.format}" locale="${maven.xdoc.date.locale}"/>
|
||||
<format property="coverDate" pattern="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.xdoc.date.format')}" locale="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.xdoc.date.locale')}"/>
|
||||
</tstamp>
|
||||
<j:choose>
|
||||
<j:when test="${pom.getPluginContext('maven-pdf-plugin').getVariable('maven.pdf.projectLogo').startsWith('http://')}">
|
||||
@@ -28,7 +24,7 @@
|
||||
</j:when>
|
||||
<j:otherwise>
|
||||
<j:set var="maven.bin.script" value="${maven.home}/bin/maven"/>
|
||||
<maven:makeAbsolutePath var="projectLogo" basedir="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.docs.src')}" path="${pom.getPluginContext('maven-pdf-plugin').getVariable('maven.pdf.projectLogo')}" trim="true" />
|
||||
<maven:makeAbsolutePath var="projectLogo" basedir="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.docs.src')}" path="${pom.getPluginContext('maven-pdf-plugin').getVariable('maven.pdf.projectLogo')}" trim="true"/>
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
<j:choose>
|
||||
@@ -37,7 +33,7 @@
|
||||
</j:when>
|
||||
<j:otherwise>
|
||||
<j:set var="maven.bin.script" value="${maven.home}/bin/maven"/>
|
||||
<maven:makeAbsolutePath var="companyLogo" basedir="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.docs.src')}" path="${pom.getPluginContext('maven-pdf-plugin').getVariable('maven.pdf.companyLogo')}" trim="true" />
|
||||
<maven:makeAbsolutePath var="companyLogo" basedir="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.docs.src')}" path="${pom.getPluginContext('maven-pdf-plugin').getVariable('maven.pdf.companyLogo')}" trim="true"/>
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
<j:set var="imageDpi" value="${pom.getPluginContext('maven-pdf-plugin').getVariable('maven.pdf.imageDpi')}"/>
|
||||
|
||||
@@ -7,7 +7,7 @@ maven.pdf.confidential=false
|
||||
maven.pdf.paperType=A4
|
||||
maven.pdf.companyIncName=${pom.organization.name}
|
||||
maven.pdf.copyrightYear=${pom.inceptionYear}
|
||||
maven.pdf.imageDpi=150
|
||||
maven.pdf.imageDpi=72
|
||||
maven.pdf.debug=false
|
||||
maven.pdf.navigationFile=navigation.xml
|
||||
maven.pdf.pdfName=${pom.artifactId}.pdf
|
||||
@@ -15,6 +15,6 @@ maven.pdf.cover.projectCompany=${pom.organization.name}
|
||||
maven.pdf.cover.projectName=${pom.name}
|
||||
maven.pdf.cover.type=Project Documentation
|
||||
maven.pdf.cover.version=${pom.currentVersion}
|
||||
#maven.pdf.cover.date=June 2, 2003
|
||||
#maven.pdf.cover.date=Not defined by default
|
||||
maven.pdf.projectLogo=${pom.logo}
|
||||
maven.pdf.companyLogo=${pom.organization.logo}
|
||||
|
||||
@@ -5,5 +5,5 @@ maven.xdoc.date=left
|
||||
maven.xdoc.version=${pom.currentVersion}
|
||||
maven.license.licenseFile=${basedir}/../../../LICENSE.txt
|
||||
|
||||
maven.pdf.projectLogo=http://maven.apache.org/images/maven.gif
|
||||
maven.pdf.companyLogo=http://maven.apache.org/images/asf_logo_wide_clear.gif
|
||||
maven.pdf.projectLogo=${maven.docs.src}/images/maven.gif
|
||||
maven.pdf.companyLogo=${maven.docs.src}/images/asf_logo_wide_clear.gif
|
||||
@@ -1,153 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
|
||||
<!-- These attribute-sets are treated as 'styles,'
|
||||
and are referenced in the templates below -->
|
||||
<!-- Style 'primitives' from which all others are descended -->
|
||||
<xsl:attribute-set name="base.body.style">
|
||||
<xsl:attribute name="font-family">Garamond,serif</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="base.heading.style">
|
||||
<xsl:attribute name="font-family">Helvetica,sans-serif</xsl:attribute>
|
||||
<xsl:attribute name="color">#000000</xsl:attribute>
|
||||
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="base.pre.style">
|
||||
<xsl:attribute name="font-family">monospace</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<!-- Standard body and heading styles -->
|
||||
<xsl:attribute-set name="body.text" use-attribute-sets="base.body.style">
|
||||
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
||||
<xsl:attribute name="line-height">12pt</xsl:attribute>
|
||||
<xsl:attribute name="white-space-collapse">true</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="body.pre" use-attribute-sets="base.pre.style">
|
||||
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="body.source" use-attribute-sets="base.pre.style">
|
||||
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
||||
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
||||
<xsl:attribute name="white-space-collapse">false</xsl:attribute>
|
||||
<xsl:attribute name="color">black</xsl:attribute>
|
||||
<xsl:attribute name="border-style">dotted</xsl:attribute>
|
||||
<xsl:attribute name="border-width">0.5pt</xsl:attribute>
|
||||
<xsl:attribute name="border-color"><xsl:value-of select="$colorMediumGray"/></xsl:attribute>
|
||||
<xsl:attribute name="padding-before">1.0em</xsl:attribute>
|
||||
<xsl:attribute name="padding-after">1.25em</xsl:attribute>
|
||||
<xsl:attribute name="padding-start">0.75em</xsl:attribute>
|
||||
<xsl:attribute name="padding-end">0.75em</xsl:attribute>
|
||||
<xsl:attribute name="start-indent">inherited-property-value(start-indent) + 2.5em</xsl:attribute>
|
||||
<xsl:attribute name="end-indent">inherited-property-value(end-indent) + 3em</xsl:attribute>
|
||||
<xsl:attribute name="space-before">0.75em</xsl:attribute>
|
||||
<xsl:attribute name="space-after">1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="body.strong">
|
||||
<xsl:attribute name="font-family">Helvetica,sans-serif</xsl:attribute>
|
||||
<xsl:attribute name="font-size">9.0pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="body.title" use-attribute-sets="base.heading.style">
|
||||
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="body.h1" use-attribute-sets="base.heading.style">
|
||||
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
<xsl:attribute name="space-before">18pt</xsl:attribute>
|
||||
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="body.h2" use-attribute-sets="base.heading.style">
|
||||
<xsl:attribute name="font-size">9.5pt</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
<xsl:attribute name="space-before">18pt</xsl:attribute>
|
||||
<xsl:attribute name="space-after">5pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="body.h3" use-attribute-sets="base.heading.style">
|
||||
<xsl:attribute name="font-size">9.5pt</xsl:attribute>
|
||||
<xsl:attribute name="space-before">15pt</xsl:attribute>
|
||||
<xsl:attribute name="space-after">3pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="body.h4" use-attribute-sets="base.heading.style">
|
||||
<xsl:attribute name="font-size">9.5pt</xsl:attribute>
|
||||
<xsl:attribute name="space-before">9pt</xsl:attribute>
|
||||
<xsl:attribute name="space-after">3pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="body.h5" use-attribute-sets="base.heading.style">
|
||||
<xsl:attribute name="font-size">9.5pt</xsl:attribute>
|
||||
<xsl:attribute name="font-style">italic</xsl:attribute>
|
||||
<xsl:attribute name="space-after">3pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<!-- Chapter heading styles -->
|
||||
<xsl:attribute-set name="chapter.title" use-attribute-sets="base.heading.style body.title">
|
||||
<xsl:attribute name="line-height">10pt</xsl:attribute>
|
||||
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="chapter.rule">
|
||||
<xsl:attribute name="leader-length.optimum">100%</xsl:attribute>
|
||||
<xsl:attribute name="leader-pattern">dots</xsl:attribute>
|
||||
<xsl:attribute name="rule-thickness">1pt</xsl:attribute>
|
||||
<xsl:attribute name="color"><xsl:value-of select="$colorDarkGray"/></xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<!-- Outdented numbers -->
|
||||
<xsl:attribute-set name="outdented.number.style" use-attribute-sets="base.heading.style">
|
||||
<xsl:attribute name="font-size">9.5pt</xsl:attribute>
|
||||
<xsl:attribute name="color"><xsl:value-of select="$colorDarkGray"/></xsl:attribute>
|
||||
<xsl:attribute name="line-height">10pt</xsl:attribute>
|
||||
<xsl:attribute name="text-align">right</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<!-- Page header/footer styles -->
|
||||
<xsl:attribute-set name="footer.style">
|
||||
<xsl:attribute name="letter-spacing">2pt</xsl:attribute>
|
||||
<xsl:attribute name="font-family">Helvetica,sans-serif</xsl:attribute>
|
||||
<xsl:attribute name="font-size">6pt</xsl:attribute>
|
||||
<xsl:attribute name="color"><xsl:value-of select="$colorDarkGray"/></xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="header.style">
|
||||
<xsl:attribute name="letter-spacing">2pt</xsl:attribute>
|
||||
<xsl:attribute name="font-family">Helvetica,sans-serif</xsl:attribute>
|
||||
<xsl:attribute name="font-size">6pt</xsl:attribute>
|
||||
<xsl:attribute name="color"><xsl:value-of select="$colorDarkGray"/></xsl:attribute>
|
||||
<xsl:attribute name="text-align">left</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="page.number">
|
||||
<xsl:attribute name="font-family">Helvetica,sans-serif</xsl:attribute>
|
||||
<xsl:attribute name="font-size">9.5pt</xsl:attribute>
|
||||
<xsl:attribute name="text-align">right</xsl:attribute>
|
||||
<xsl:attribute name="color">black</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<!-- Style for hyperlinks -->
|
||||
<xsl:attribute-set name="href">
|
||||
<xsl:attribute name="color">blue</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<!-- 'Normal' line-spacing styles for paragraph and pre elements -->
|
||||
<xsl:attribute-set name="normal.paragraph" use-attribute-sets="base.body.style">
|
||||
<xsl:attribute name="space-before">3pt</xsl:attribute>
|
||||
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<!-- Styles for lists, list items, definition lists, etc. -->
|
||||
<xsl:attribute-set name="list">
|
||||
<xsl:attribute name="start-indent">inherited-property-value(start-indent)</xsl:attribute>
|
||||
<xsl:attribute name="provisional-distance-between-starts">1em</xsl:attribute>
|
||||
<xsl:attribute name="provisional-label-separation">1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<!-- 1pt before, 3pts after -->
|
||||
<xsl:attribute-set name="list.item">
|
||||
<xsl:attribute name="start-indent">inherited-property-value(start-indent) + .5em</xsl:attribute>
|
||||
<xsl:attribute name="space-before">0.15em</xsl:attribute>
|
||||
<xsl:attribute name="space-after">0.25em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="dl" use-attribute-sets="body.text">
|
||||
<xsl:attribute name="start-indent">1em</xsl:attribute>
|
||||
<xsl:attribute name="end-indent">1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="dt" use-attribute-sets="base.body.style">
|
||||
<xsl:attribute name="start-indent">1em</xsl:attribute>
|
||||
<xsl:attribute name="end-indent">1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="dd" use-attribute-sets="base.body.style">
|
||||
<xsl:attribute name="start-indent">1em</xsl:attribute>
|
||||
<xsl:attribute name="end-indent">1em</xsl:attribute>
|
||||
<xsl:attribute name="space-before">0.6em</xsl:attribute>
|
||||
<xsl:attribute name="space-after">0.6em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<!-- Templates for rendering headers, footers, and chapter headings -->
|
||||
<xsl:template name="body-header">
|
||||
<xsl:param name="headerText"/>
|
||||
@@ -346,7 +198,7 @@
|
||||
<xsl:template match="a[@href and (starts-with(@href, 'http') or starts-with(@href, 'mailto') or starts-with(@href, 'ftp'))]">
|
||||
<xsl:param name="chapterNumber"/>
|
||||
<fo:basic-link external-destination="{@href}">
|
||||
<fo:inline xsl:use-attribute-sets="href">
|
||||
<fo:inline xsl:use-attribute-sets="href.external">
|
||||
<xsl:apply-templates>
|
||||
<xsl:with-param name="chapterNumber">
|
||||
<xsl:value-of select="$chapterNumber"/>
|
||||
@@ -358,7 +210,7 @@
|
||||
<xsl:template match="a[@href and starts-with(@href, '#')]">
|
||||
<xsl:param name="chapterNumber"/>
|
||||
<fo:basic-link internal-destination="{$chapterNumber}{@href}{generate-id()}">
|
||||
<fo:inline xsl:use-attribute-sets="href">
|
||||
<fo:inline xsl:use-attribute-sets="href.internal">
|
||||
<xsl:apply-templates>
|
||||
<xsl:with-param name="chapterNumber">
|
||||
<xsl:value-of select="$chapterNumber"/>
|
||||
@@ -370,7 +222,7 @@
|
||||
<xsl:template match="a[@href and not(starts-with(@href, 'http')) and not(starts-with(@href, 'mailto')) and not(starts-with(@href, 'ftp')) and not(starts-with(@href, '#'))]">
|
||||
<xsl:param name="chapterNumber"/>
|
||||
<fo:basic-link internal-destination="{@href}{generate-id()}">
|
||||
<fo:inline xsl:use-attribute-sets="href">
|
||||
<fo:inline xsl:use-attribute-sets="href.internal">
|
||||
<xsl:apply-templates>
|
||||
<xsl:with-param name="chapterNumber">
|
||||
<xsl:value-of select="$chapterNumber"/>
|
||||
|
||||
@@ -1,81 +1,117 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
|
||||
<xsl:variable name="colWidth" select="$maxBodyWidth div 3"/>
|
||||
<xsl:attribute-set name="cover.title">
|
||||
<xsl:attribute name="font-family">Helvetica,sans-serif</xsl:attribute>
|
||||
<xsl:attribute name="color">#000000</xsl:attribute>
|
||||
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
||||
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="cover.subtitle">
|
||||
<xsl:attribute name="font-family">Helvetica,sans-serif</xsl:attribute>
|
||||
<xsl:attribute name="color">#000000</xsl:attribute>
|
||||
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
||||
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.heading.rule">
|
||||
<xsl:attribute name="leader-length.optimum">100%</xsl:attribute>
|
||||
<xsl:attribute name="leader-pattern">rule</xsl:attribute>
|
||||
<xsl:attribute name="rule-thickness">0.5pt</xsl:attribute>
|
||||
<xsl:attribute name="color">black</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:variable name="colWidth2" select="$maxBodyWidth div 2"/>
|
||||
<xsl:variable name="colWidth3" select="$maxBodyWidth div 3"/>
|
||||
<xsl:variable name="maxTableHeight" select="$maxBodyHeight - $regionTopMargin"/>
|
||||
<xsl:variable name="headerHeight">0.5</xsl:variable>
|
||||
<xsl:variable name="footerHeight">0.3</xsl:variable>
|
||||
<xsl:variable name="lineHeight">0.014</xsl:variable>
|
||||
<xsl:variable name="middleHeight" select="$maxTableHeight - $headerHeight - $footerHeight - $lineHeight - $lineHeight - 0.5"/>
|
||||
<xsl:template name="fo-cover">
|
||||
<fo:page-sequence master-reference="cover-page">
|
||||
<fo:flow flow-name="xsl-region-body">
|
||||
<fo:block text-align="center">
|
||||
<fo:table table-layout="fixed">
|
||||
<fo:table-column column-width="{$colWidth}in"/>
|
||||
<fo:table-column column-width="{$colWidth}in"/>
|
||||
<fo:table-column column-width="{$colWidth}in"/>
|
||||
<fo:table-column column-width="{$colWidth2}in"/>
|
||||
<fo:table-column column-width="{$colWidth2}in"/>
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-row height="{$headerHeight}in">
|
||||
<fo:table-cell>
|
||||
<fo:block text-align="left" vertical-align="bottom">
|
||||
<fo:external-graphic src="{normalize-space($companyLogo)}" height="0.5in" width="auto" content-height="0.5in" content-width="auto"/>
|
||||
<fo:block text-align="left" vertical-align="top">
|
||||
<xsl:variable name="source">
|
||||
<xsl:choose>
|
||||
<xsl:when test="substring(normalize-space($companyLogo),1,3) = '../'">
|
||||
<xsl:value-of select="translate(substring-after(normalize-space($companyLogo),'../'),'\','/')"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="substring(normalize-space($companyLogo),1,3) = '..\'">
|
||||
<xsl:value-of select="translate(substring-after(normalize-space($companyLogo),'..\'),'\','/')"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="normalize-space($companyLogo)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<fo:external-graphic src="{$source}" height="{$headerHeight}in" width="auto" content-height="{$headerHeight}in" content-width="auto"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block/>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block text-align="right" vertical-align="bottom">
|
||||
<fo:external-graphic src="{normalize-space($projectLogo)}" height="0.5in" width="auto" content-height="0.5in" content-width="auto"/>
|
||||
<fo:block text-align="right" vertical-align="top">
|
||||
<xsl:variable name="source">
|
||||
<xsl:choose>
|
||||
<xsl:when test="substring(normalize-space($projectLogo),1,3) = '../'">
|
||||
<xsl:value-of select="translate(substring-after(normalize-space($projectLogo),'../'),'\','/')"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="substring(normalize-space($companyLogo),1,3) = '..\'">
|
||||
<xsl:value-of select="translate(substring-after(normalize-space($projectLogo),'..\'),'\','/')"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="normalize-space($projectLogo)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<fo:external-graphic src="{$source}" height="{$headerHeight}in" width="auto" content-height="{$headerHeight}in" content-width="auto"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row keep-with-previous="always">
|
||||
<fo:table-cell padding-after="4.75pt" number-columns-spanned="3">
|
||||
<fo:block line-height="1pt">
|
||||
<fo:leader xsl:use-attribute-sets="table.heading.rule"/>
|
||||
<fo:table-row keep-with-previous="always" height="{$lineHeight}in">
|
||||
<fo:table-cell number-columns-spanned="2">
|
||||
<fo:block line-height="{$lineHeight}in">
|
||||
<fo:leader xsl:use-attribute-sets="chapter.rule"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row>
|
||||
<fo:table-row height="{$middleHeight}in">
|
||||
<fo:table-cell number-columns-spanned="3">
|
||||
<fo:block xsl:use-attribute-sets="cover.subtitle" text-align="end" space-before="256pt" display-align="center">
|
||||
<fo:table table-layout="fixed">
|
||||
<fo:table-column column-width="{$colWidth3}in"/>
|
||||
<fo:table-column column-width="{$colWidth3}in"/>
|
||||
<fo:table-column column-width="{$colWidth3}in"/>
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-cell number-columns-spanned="2">
|
||||
<fo:block space-before="{($middleHeight - 1) div 2}in">
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row>
|
||||
<fo:table-cell>
|
||||
<fo:block space-after="0.5in"/>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell number-columns-spanned="2" xsl:use-attribute-sets="cover.border.left">
|
||||
<fo:block xsl:use-attribute-sets="cover.title" text-align="left" display-align="center" space-after="0.5in">
|
||||
<xsl:value-of select="$coverProjectName"/> v.<xsl:value-of select="$coverVersion"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row>
|
||||
<fo:table-cell>
|
||||
<fo:block/>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell number-columns-spanned="2" xsl:use-attribute-sets="cover.border.left.bottom">
|
||||
<fo:block xsl:use-attribute-sets="cover.subtitle" text-align="left" display-align="center">
|
||||
<xsl:value-of select="$coverType"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row height="{$lineHeight}in">
|
||||
<fo:table-cell number-columns-spanned="2">
|
||||
<fo:block line-height="{$lineHeight}in" space-after="0.2in">
|
||||
<fo:leader xsl:use-attribute-sets="chapter.rule"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row height="{$footerHeight}in">
|
||||
<fo:table-cell>
|
||||
<fo:block xsl:use-attribute-sets="cover.subtitle" text-align="left" height="{$footerHeight}in">
|
||||
<xsl:value-of select="$coverProjectCompany"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row>
|
||||
<fo:table-cell number-columns-spanned="3">
|
||||
<fo:block xsl:use-attribute-sets="cover.title" text-align="end" space-before="24pt" display-align="center">
|
||||
<xsl:value-of select="$coverProjectName"/> v.<xsl:value-of select="$coverVersion"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row>
|
||||
<fo:table-cell number-columns-spanned="3">
|
||||
<fo:block xsl:use-attribute-sets="cover.subtitle" text-align="end" space-before="24pt" display-align="center">
|
||||
<xsl:value-of select="$coverType"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row>
|
||||
<fo:table-cell number-columns-spanned="3">
|
||||
<fo:block xsl:use-attribute-sets="cover.subtitle" text-align="end" space-before="24pt" space-after="36pt" display-align="center">
|
||||
<fo:table-cell>
|
||||
<fo:block xsl:use-attribute-sets="cover.subtitle" text-align="right" height="{$footerHeight}in">
|
||||
<xsl:value-of select="$coverDate"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
|
||||
@@ -9,28 +9,41 @@
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!-- Set the default page height, in inches -->
|
||||
<xsl:variable name="pageHeight">11</xsl:variable>
|
||||
<xsl:variable name="pageHeight">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$paperType = 'US'">14</xsl:when>
|
||||
<xsl:when test="$paperType = 'A4'">11.70</xsl:when>
|
||||
<xsl:otherwise>14</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!-- Set the max table width -->
|
||||
<xsl:variable name="maxTableWidth" select="$maxBodyWidth"/>
|
||||
<!-- Set the default left and right margin, in inches -->
|
||||
<xsl:variable name="bodySideMargins">1</xsl:variable>
|
||||
<xsl:variable name="maxBodyWidth" select="$pageWidth - (2 * $bodySideMargins)"/>
|
||||
<xsl:variable name="maxTableWidth" select="$maxBodyWidth"/>
|
||||
<!-- Set the default top and bottom margin, in inches -->
|
||||
<xsl:variable name="bodyTopMargin">0.625</xsl:variable>
|
||||
<xsl:variable name="bodyBottomMargin">0.6</xsl:variable>
|
||||
<xsl:variable name="maxBodyHeight" select="$pageHeight - $bodyTopMargin - $bodyBottomMargin"/>
|
||||
<xsl:variable name="regionTopMargin">0.7</xsl:variable>
|
||||
<xsl:variable name="regionBottomMargin">0.8</xsl:variable>
|
||||
<xsl:template name="fo-layouts">
|
||||
<!-- Defines the layout set -->
|
||||
<fo:layout-master-set>
|
||||
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}in" page-height="{$pageHeight}in" margin-top="0.2in" margin-bottom="0.2in" margin-left="{$bodySideMargins}in" margin-right="{$bodySideMargins}in">
|
||||
<fo:region-body margin-top="0.7in"/>
|
||||
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}in" page-height="{$pageHeight}in" margin-top="{$bodyTopMargin}in" margin-bottom="{$bodyBottomMargin}in" margin-left="{$bodySideMargins}in" margin-right="{$bodySideMargins}in">
|
||||
<fo:region-body margin-top="{$regionTopMargin}in"/>
|
||||
</fo:simple-page-master>
|
||||
<fo:simple-page-master master-name="cover-inside" page-width="{$pageWidth}in" page-height="{$pageHeight}in" margin-top="0in" margin-bottom="0in" margin-left="0in" margin-right="0in">
|
||||
<fo:region-body margin-top="0in"/>
|
||||
</fo:simple-page-master>
|
||||
<fo:simple-page-master master-name="toc" page-width="{$pageWidth}in" page-height="{$pageHeight}in" margin-top="0.625in" margin-bottom="0.6in" margin-left="{$bodySideMargins}in" margin-right="{$bodySideMargins}in">
|
||||
<fo:simple-page-master master-name="toc" page-width="{$pageWidth}in" page-height="{$pageHeight}in" margin-top="{$bodyTopMargin}in" margin-bottom="{$bodyBottomMargin}in" margin-left="{$bodySideMargins}in" margin-right="{$bodySideMargins}in">
|
||||
<fo:region-before extent="0.35in"/>
|
||||
<fo:region-body margin-top="0.7in" margin-bottom="0.8in"/>
|
||||
<fo:region-body margin-top="{$regionTopMargin}in" margin-bottom="{$regionBottomMargin}in"/>
|
||||
<fo:region-after extent="0.125in"/>
|
||||
</fo:simple-page-master>
|
||||
<fo:simple-page-master master-name="body" page-width="{$pageWidth}in" page-height="{$pageHeight}in" margin-top="0.625in" margin-bottom="0.6in" margin-left="{$bodySideMargins}in" margin-right="{$bodySideMargins}in">
|
||||
<fo:simple-page-master master-name="body" page-width="{$pageWidth}in" page-height="{$pageHeight}in" margin-top="{$bodyTopMargin}in" margin-bottom="{$bodyBottomMargin}in" margin-left="{$bodySideMargins}in" margin-right="{$bodySideMargins}in">
|
||||
<fo:region-before extent="0.35in"/>
|
||||
<fo:region-body margin-top="0.7in" margin-bottom="0.8in"/>
|
||||
<fo:region-body margin-top="{$regionTopMargin}in" margin-bottom="{$regionBottomMargin}in"/>
|
||||
<fo:region-after extent="0.125in"/>
|
||||
</fo:simple-page-master>
|
||||
</fo:layout-master-set>
|
||||
|
||||
344
pdf/src/plugin-resources/fo-styles.xslt
Normal file
344
pdf/src/plugin-resources/fo-styles.xslt
Normal file
@@ -0,0 +1,344 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
|
||||
<!-- These attribute-sets are treated as 'styles,'
|
||||
and are referenced in the all templates -->
|
||||
<!-- Style 'primitives' from which all others are descended -->
|
||||
<xsl:attribute-set name="base.body.style">
|
||||
<xsl:attribute name="font-family">Garamond,serif</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="base.heading.style">
|
||||
<xsl:attribute name="font-family">Helvetica,sans-serif</xsl:attribute>
|
||||
<xsl:attribute name="color">#000000</xsl:attribute>
|
||||
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="base.pre.style">
|
||||
<xsl:attribute name="font-family">monospace</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<!-- Standard body and heading styles -->
|
||||
<xsl:attribute-set name="body.text" use-attribute-sets="base.body.style">
|
||||
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
||||
<xsl:attribute name="line-height">12pt</xsl:attribute>
|
||||
<xsl:attribute name="white-space-collapse">true</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="body.pre" use-attribute-sets="base.pre.style">
|
||||
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="body.source" use-attribute-sets="base.pre.style">
|
||||
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
||||
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
||||
<xsl:attribute name="white-space-collapse">false</xsl:attribute>
|
||||
<xsl:attribute name="color">black</xsl:attribute>
|
||||
<xsl:attribute name="border-style">dotted</xsl:attribute>
|
||||
<xsl:attribute name="border-width">0.5pt</xsl:attribute>
|
||||
<xsl:attribute name="border-color"><xsl:value-of select="$colorMediumGray"/></xsl:attribute>
|
||||
<xsl:attribute name="padding-before">1.0em</xsl:attribute>
|
||||
<xsl:attribute name="padding-after">1.25em</xsl:attribute>
|
||||
<xsl:attribute name="padding-start">0.75em</xsl:attribute>
|
||||
<xsl:attribute name="padding-end">0.75em</xsl:attribute>
|
||||
<xsl:attribute name="start-indent">inherited-property-value(start-indent) + 2.5em</xsl:attribute>
|
||||
<xsl:attribute name="end-indent">inherited-property-value(end-indent) + 3em</xsl:attribute>
|
||||
<xsl:attribute name="space-before">0.75em</xsl:attribute>
|
||||
<xsl:attribute name="space-after">1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="body.strong">
|
||||
<xsl:attribute name="font-family">Helvetica,sans-serif</xsl:attribute>
|
||||
<xsl:attribute name="font-size">9.0pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="body.title" use-attribute-sets="base.heading.style">
|
||||
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="body.h1" use-attribute-sets="base.heading.style">
|
||||
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
<xsl:attribute name="space-before">18pt</xsl:attribute>
|
||||
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="body.h2" use-attribute-sets="base.heading.style">
|
||||
<xsl:attribute name="font-size">9.5pt</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
<xsl:attribute name="space-before">18pt</xsl:attribute>
|
||||
<xsl:attribute name="space-after">5pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="body.h3" use-attribute-sets="base.heading.style">
|
||||
<xsl:attribute name="font-size">9.5pt</xsl:attribute>
|
||||
<xsl:attribute name="space-before">15pt</xsl:attribute>
|
||||
<xsl:attribute name="space-after">3pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="body.h4" use-attribute-sets="base.heading.style">
|
||||
<xsl:attribute name="font-size">9.5pt</xsl:attribute>
|
||||
<xsl:attribute name="space-before">9pt</xsl:attribute>
|
||||
<xsl:attribute name="space-after">3pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="body.h5" use-attribute-sets="base.heading.style">
|
||||
<xsl:attribute name="font-size">9.5pt</xsl:attribute>
|
||||
<xsl:attribute name="font-style">italic</xsl:attribute>
|
||||
<xsl:attribute name="space-after">3pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<!-- Chapter heading styles -->
|
||||
<xsl:attribute-set name="chapter.title" use-attribute-sets="base.heading.style body.title">
|
||||
<xsl:attribute name="line-height">10pt</xsl:attribute>
|
||||
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="chapter.rule">
|
||||
<xsl:attribute name="leader-length.optimum">100%</xsl:attribute>
|
||||
<xsl:attribute name="leader-pattern">dots</xsl:attribute>
|
||||
<xsl:attribute name="rule-thickness">1pt</xsl:attribute>
|
||||
<xsl:attribute name="color"><xsl:value-of select="$colorDarkGray"/></xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<!-- Outdented numbers -->
|
||||
<xsl:attribute-set name="outdented.number.style" use-attribute-sets="base.heading.style">
|
||||
<xsl:attribute name="font-size">9.5pt</xsl:attribute>
|
||||
<xsl:attribute name="color"><xsl:value-of select="$colorDarkGray"/></xsl:attribute>
|
||||
<xsl:attribute name="line-height">10pt</xsl:attribute>
|
||||
<xsl:attribute name="text-align">right</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<!-- Page header/footer styles -->
|
||||
<xsl:attribute-set name="footer.style">
|
||||
<xsl:attribute name="letter-spacing">2pt</xsl:attribute>
|
||||
<xsl:attribute name="font-family">Helvetica,sans-serif</xsl:attribute>
|
||||
<xsl:attribute name="font-size">6pt</xsl:attribute>
|
||||
<xsl:attribute name="color"><xsl:value-of select="$colorDarkGray"/></xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="header.style">
|
||||
<xsl:attribute name="letter-spacing">2pt</xsl:attribute>
|
||||
<xsl:attribute name="font-family">Helvetica,sans-serif</xsl:attribute>
|
||||
<xsl:attribute name="font-size">6pt</xsl:attribute>
|
||||
<xsl:attribute name="color"><xsl:value-of select="$colorDarkGray"/></xsl:attribute>
|
||||
<xsl:attribute name="text-align">left</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="page.number">
|
||||
<xsl:attribute name="font-family">Helvetica,sans-serif</xsl:attribute>
|
||||
<xsl:attribute name="font-size">9.5pt</xsl:attribute>
|
||||
<xsl:attribute name="text-align">right</xsl:attribute>
|
||||
<xsl:attribute name="color">black</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<!-- Style for hyperlinks -->
|
||||
<xsl:attribute-set name="href.internal">
|
||||
<xsl:attribute name="color">blue</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="href.external">
|
||||
<xsl:attribute name="color">green</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<!-- 'Normal' line-spacing styles for paragraph and pre elements -->
|
||||
<xsl:attribute-set name="normal.paragraph" use-attribute-sets="base.body.style">
|
||||
<xsl:attribute name="space-before">3pt</xsl:attribute>
|
||||
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<!-- Styles for lists, list items, definition lists, etc. -->
|
||||
<xsl:attribute-set name="list">
|
||||
<xsl:attribute name="start-indent">inherited-property-value(start-indent)</xsl:attribute>
|
||||
<xsl:attribute name="provisional-distance-between-starts">1em</xsl:attribute>
|
||||
<xsl:attribute name="provisional-label-separation">1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<!-- 1pt before, 3pts after -->
|
||||
<xsl:attribute-set name="list.item">
|
||||
<xsl:attribute name="start-indent">inherited-property-value(start-indent) + .5em</xsl:attribute>
|
||||
<xsl:attribute name="space-before">0.15em</xsl:attribute>
|
||||
<xsl:attribute name="space-after">0.25em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="dl" use-attribute-sets="body.text">
|
||||
<xsl:attribute name="start-indent">1em</xsl:attribute>
|
||||
<xsl:attribute name="end-indent">1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="dt" use-attribute-sets="base.body.style">
|
||||
<xsl:attribute name="start-indent">1em</xsl:attribute>
|
||||
<xsl:attribute name="end-indent">1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="dd" use-attribute-sets="base.body.style">
|
||||
<xsl:attribute name="start-indent">1em</xsl:attribute>
|
||||
<xsl:attribute name="end-indent">1em</xsl:attribute>
|
||||
<xsl:attribute name="space-before">0.6em</xsl:attribute>
|
||||
<xsl:attribute name="space-after">0.6em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<!-- Error style -->
|
||||
<xsl:attribute-set name="error.block" use-attribute-sets="base.block">
|
||||
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
<xsl:attribute name="color">red</xsl:attribute>
|
||||
<xsl:attribute name="border-style">solid</xsl:attribute>
|
||||
<xsl:attribute name="border-width">0.5pt</xsl:attribute>
|
||||
<xsl:attribute name="border-color">red</xsl:attribute>
|
||||
<xsl:attribute name="padding">0.75em</xsl:attribute>
|
||||
<xsl:attribute name="start-indent">inherited-property-value(start-indent) + 2.5em</xsl:attribute>
|
||||
<xsl:attribute name="end-indent">inherited-property-value(end-indent) + 3em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<!-- cover styles -->
|
||||
<xsl:attribute-set name="cover.title">
|
||||
<xsl:attribute name="font-family">Helvetica,sans-serif</xsl:attribute>
|
||||
<xsl:attribute name="color">#000000</xsl:attribute>
|
||||
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
||||
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="cover.subtitle">
|
||||
<xsl:attribute name="font-family">Helvetica,sans-serif</xsl:attribute>
|
||||
<xsl:attribute name="color">#000000</xsl:attribute>
|
||||
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
||||
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="cover.border.left" use-attribute-sets="base.pre.style">
|
||||
<xsl:attribute name="padding-start">0.2in</xsl:attribute>
|
||||
<xsl:attribute name="border-left-style">dotted</xsl:attribute>
|
||||
<xsl:attribute name="border-left-width">0.1pt</xsl:attribute>
|
||||
<xsl:attribute name="border-left-color">#000000</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="cover.border.left.bottom" use-attribute-sets="cover.border.left">
|
||||
<xsl:attribute name="padding-after">0.2in</xsl:attribute>
|
||||
<xsl:attribute name="border-bottom-style">dotted</xsl:attribute>
|
||||
<xsl:attribute name="border-bottom-width">0.1pt</xsl:attribute>
|
||||
<xsl:attribute name="border-bottom-color">#000000</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<!-- Tables styles -->
|
||||
<xsl:attribute-set name="table.heading.rule">
|
||||
<xsl:attribute name="leader-length.optimum">100%</xsl:attribute>
|
||||
<xsl:attribute name="leader-pattern">rule</xsl:attribute>
|
||||
<xsl:attribute name="rule-thickness">0.5pt</xsl:attribute>
|
||||
<xsl:attribute name="color">black</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="base.cell">
|
||||
<xsl:attribute name="padding-start">2.5pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-end">5pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="base.block">
|
||||
<xsl:attribute name="font-family">Helvetica,sans-serif</xsl:attribute>
|
||||
<xsl:attribute name="line-height">1.2em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<!-- Bumped padding down by 6 pts before & after -->
|
||||
<xsl:attribute-set name="table.padding">
|
||||
<xsl:attribute name="padding-before">9pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-after">12pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.title.row">
|
||||
<xsl:attribute name="keep-together">always</xsl:attribute>
|
||||
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.title.cell" use-attribute-sets="base.cell">
|
||||
<xsl:attribute name="border-after-style">solid</xsl:attribute>
|
||||
<xsl:attribute name="border-after-width">0.5pt</xsl:attribute>
|
||||
<xsl:attribute name="border-after-color">black</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.title.block" use-attribute-sets="base.block">
|
||||
<xsl:attribute name="font-size">9.5pt</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.footer.cell" use-attribute-sets="base.cell">
|
||||
<xsl:attribute name="padding-before">5pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.footer.block" use-attribute-sets="base.block">
|
||||
<xsl:attribute name="font-size">7pt</xsl:attribute>
|
||||
<xsl:attribute name="font-style">italic</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.heading.cell" use-attribute-sets="base.cell">
|
||||
<xsl:attribute name="padding-before">7pt</xsl:attribute>
|
||||
<xsl:attribute name="display-align">after</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.heading.block" use-attribute-sets="base.block">
|
||||
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.heading.rule">
|
||||
<xsl:attribute name="leader-length.optimum">100%</xsl:attribute>
|
||||
<xsl:attribute name="leader-pattern">rule</xsl:attribute>
|
||||
<xsl:attribute name="rule-thickness">0.5pt</xsl:attribute>
|
||||
<xsl:attribute name="color">black</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.number.cell" use-attribute-sets="base.cell">
|
||||
<xsl:attribute name="padding-before">6pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.number.block" use-attribute-sets="base.block">
|
||||
<xsl:attribute name="font-size">7pt</xsl:attribute>
|
||||
<xsl:attribute name="font-style">italic</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.subheading.row">
|
||||
<xsl:attribute name="keep-together">always</xsl:attribute>
|
||||
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.subheading.cell" use-attribute-sets="base.cell">
|
||||
<xsl:attribute name="padding-after">1pt</xsl:attribute>
|
||||
<xsl:attribute name="background-color"><xsl:value-of select="$colorLightGray"/></xsl:attribute>
|
||||
<xsl:attribute name="border-before-style">solid</xsl:attribute>
|
||||
<xsl:attribute name="border-before-width">2.5pt</xsl:attribute>
|
||||
<xsl:attribute name="border-before-color"><xsl:value-of select="$colorLightGray"/></xsl:attribute>
|
||||
<xsl:attribute name="display-align">after</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.subheading.block" use-attribute-sets="base.block">
|
||||
<xsl:attribute name="font-size">7pt</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
<xsl:attribute name="vertical-align">bottom</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.body.row">
|
||||
<xsl:attribute name="keep-together">always</xsl:attribute>
|
||||
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.body.norule">
|
||||
<xsl:attribute name="leader-length.optimum">100%</xsl:attribute>
|
||||
<xsl:attribute name="leader-pattern">rule</xsl:attribute>
|
||||
<xsl:attribute name="rule-thickness">1pt</xsl:attribute>
|
||||
<xsl:attribute name="color">white</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.body.rule">
|
||||
<xsl:attribute name="leader-length.optimum">100%</xsl:attribute>
|
||||
<xsl:attribute name="leader-pattern">dots</xsl:attribute>
|
||||
<xsl:attribute name="rule-thickness">0.5pt</xsl:attribute>
|
||||
<xsl:attribute name="color"><xsl:value-of select="$colorMediumGray"/></xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.body.lastrule">
|
||||
<xsl:attribute name="leader-length.optimum">100%</xsl:attribute>
|
||||
<xsl:attribute name="leader-pattern">rule</xsl:attribute>
|
||||
<xsl:attribute name="rule-thickness">0.5pt</xsl:attribute>
|
||||
<xsl:attribute name="color">black</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.body.cell" use-attribute-sets="base.cell">
|
||||
<!-- Bumped both down by 3 pts -->
|
||||
<xsl:attribute name="padding-before">4pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-after">1.5pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.body.block" use-attribute-sets="base.block">
|
||||
<xsl:attribute name="font-size">7pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.pre" use-attribute-sets="base.pre.style">
|
||||
<xsl:attribute name="font-size">7pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<!-- Table of content styles -->
|
||||
<xsl:attribute-set name="toc.cell">
|
||||
<xsl:attribute name="display-align">after</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="toc.base.style">
|
||||
<xsl:attribute name="font-family">Helvetica,sans-serif</xsl:attribute>
|
||||
<xsl:attribute name="line-height">16pt</xsl:attribute>
|
||||
<xsl:attribute name="text-align-last">start</xsl:attribute>
|
||||
<xsl:attribute name="wrap-option">no-wrap</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="toc.leader.style">
|
||||
<xsl:attribute name="leader-pattern">dots</xsl:attribute>
|
||||
<xsl:attribute name="leader-pattern-width">5pt</xsl:attribute>
|
||||
<xsl:attribute name="color"><xsl:value-of select="$colorDarkGray"/></xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="toc.number.style">
|
||||
<xsl:attribute name="font-size">9.5pt</xsl:attribute>
|
||||
<xsl:attribute name="text-align">end</xsl:attribute>
|
||||
<xsl:attribute name="color"><xsl:value-of select="$colorMediumGray"/></xsl:attribute>
|
||||
<xsl:attribute name="line-height">16pt</xsl:attribute>
|
||||
<xsl:attribute name="end-indent">6pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="toc.h1.style" use-attribute-sets="toc.base.style">
|
||||
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
<xsl:attribute name="space-before">18pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="toc.h2.style" use-attribute-sets="toc.base.style">
|
||||
<xsl:attribute name="font-size">9.5pt</xsl:attribute>
|
||||
<xsl:attribute name="space-before">15pt</xsl:attribute>
|
||||
<xsl:attribute name="space-before">3pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="toc.h3.style" use-attribute-sets="toc.base.style">
|
||||
<xsl:attribute name="font-size">9.5pt</xsl:attribute>
|
||||
<xsl:attribute name="space-before">4pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="toc.h4.style" use-attribute-sets="toc.base.style">
|
||||
<xsl:attribute name="font-size">9.5pt</xsl:attribute>
|
||||
<xsl:attribute name="space-before">4pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
</xsl:stylesheet>
|
||||
@@ -1,322 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
|
||||
<!-- These attribute-sets are treated as 'styles,'
|
||||
and are referenced in the templates below -->
|
||||
<!-- Style 'primitives' from which all others are descended -->
|
||||
<xsl:attribute-set name="base.cell">
|
||||
<xsl:attribute name="padding-start">2.5pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-end">5pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="base.block">
|
||||
<xsl:attribute name="font-family">Helvetica,sans-serif</xsl:attribute>
|
||||
<xsl:attribute name="line-height">1.2em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<!-- Table styles -->
|
||||
<!-- Bumped padding down by 6 pts before & after -->
|
||||
<xsl:attribute-set name="table.padding">
|
||||
<xsl:attribute name="padding-before">9pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-after">12pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.title.row">
|
||||
<xsl:attribute name="keep-together">always</xsl:attribute>
|
||||
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.title.cell" use-attribute-sets="base.cell">
|
||||
<xsl:attribute name="border-after-style">solid</xsl:attribute>
|
||||
<xsl:attribute name="border-after-width">0.5pt</xsl:attribute>
|
||||
<xsl:attribute name="border-after-color">black</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.title.block" use-attribute-sets="base.block">
|
||||
<xsl:attribute name="font-size">9.5pt</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.footer.cell" use-attribute-sets="base.cell">
|
||||
<xsl:attribute name="padding-before">5pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.footer.block" use-attribute-sets="base.block">
|
||||
<xsl:attribute name="font-size">7pt</xsl:attribute>
|
||||
<xsl:attribute name="font-style">italic</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.heading.cell" use-attribute-sets="base.cell">
|
||||
<xsl:attribute name="padding-before">7pt</xsl:attribute>
|
||||
<xsl:attribute name="display-align">after</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.heading.block" use-attribute-sets="base.block">
|
||||
<xsl:attribute name="font-size">7pt</xsl:attribute>
|
||||
<!--
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
-->
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.heading.rule">
|
||||
<xsl:attribute name="leader-length.optimum">100%</xsl:attribute>
|
||||
<xsl:attribute name="leader-pattern">rule</xsl:attribute>
|
||||
<!--
|
||||
<xsl:attribute name="rule-thickness">1pt</xsl:attribute>
|
||||
-->
|
||||
<xsl:attribute name="rule-thickness">0.5pt</xsl:attribute>
|
||||
<xsl:attribute name="color">black</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.number.cell" use-attribute-sets="base.cell">
|
||||
<xsl:attribute name="padding-before">6pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.number.block" use-attribute-sets="base.block">
|
||||
<xsl:attribute name="font-size">7pt</xsl:attribute>
|
||||
<xsl:attribute name="font-style">italic</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.subheading.row">
|
||||
<xsl:attribute name="keep-together">always</xsl:attribute>
|
||||
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.subheading.cell" use-attribute-sets="base.cell">
|
||||
<xsl:attribute name="padding-after">1pt</xsl:attribute>
|
||||
<xsl:attribute name="background-color"><xsl:value-of select="$colorLightGray"/></xsl:attribute>
|
||||
<xsl:attribute name="border-before-style">solid</xsl:attribute>
|
||||
<xsl:attribute name="border-before-width">2.5pt</xsl:attribute>
|
||||
<xsl:attribute name="border-before-color"><xsl:value-of select="$colorLightGray"/></xsl:attribute>
|
||||
<xsl:attribute name="display-align">after</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.subheading.block" use-attribute-sets="base.block">
|
||||
<xsl:attribute name="font-size">7pt</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
<xsl:attribute name="vertical-align">bottom</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.body.row">
|
||||
<xsl:attribute name="keep-together">always</xsl:attribute>
|
||||
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.body.norule">
|
||||
<xsl:attribute name="leader-length.optimum">100%</xsl:attribute>
|
||||
<xsl:attribute name="leader-pattern">rule</xsl:attribute>
|
||||
<xsl:attribute name="rule-thickness">1pt</xsl:attribute>
|
||||
<xsl:attribute name="color">white</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.body.rule">
|
||||
<xsl:attribute name="leader-length.optimum">100%</xsl:attribute>
|
||||
<xsl:attribute name="leader-pattern">dots</xsl:attribute>
|
||||
<xsl:attribute name="rule-thickness">0.5pt</xsl:attribute>
|
||||
<xsl:attribute name="color"><xsl:value-of select="$colorMediumGray"/></xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.body.lastrule">
|
||||
<xsl:attribute name="leader-length.optimum">100%</xsl:attribute>
|
||||
<xsl:attribute name="leader-pattern">rule</xsl:attribute>
|
||||
<xsl:attribute name="rule-thickness">0.5pt</xsl:attribute>
|
||||
<xsl:attribute name="color">black</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.body.cell" use-attribute-sets="base.cell">
|
||||
<!-- Bumped both down by 3 pts -->
|
||||
<xsl:attribute name="padding-before">4pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-after">1.5pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.body.block" use-attribute-sets="base.block">
|
||||
<xsl:attribute name="font-size">7pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="table.pre" use-attribute-sets="base.pre.style">
|
||||
<xsl:attribute name="font-size">7pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<!-- Table rendering -->
|
||||
<!--
|
||||
<xsl:template match="table[count(thead)=0]">
|
||||
<fo:block xsl:use-attribute-sets="error.block">
|
||||
Warning: the supplied <table> did not contain a <thead> element. It was excluded from the generated XSL:FO file.
|
||||
</fo:block>
|
||||
|
||||
</xsl:template>
|
||||
-->
|
||||
<!-- HTML tables generation without THEAD and TBODY -->
|
||||
<xsl:template match="table[count(thead)=0]" name="html-find-max-columns">
|
||||
<!-- Before we do anything, we need to scan the table to find the maximum span -->
|
||||
<xsl:param name="row">1</xsl:param>
|
||||
<xsl:param name="maxColumns">1</xsl:param>
|
||||
<!-- Get current row based on $row parameter -->
|
||||
<xsl:variable name="currentRow" select="tr[position()=$row]"/>
|
||||
<!-- Calculate the number of columns in this row. This will be the number
|
||||
of th cells that don't have @colspan attributes, plus the sum of all
|
||||
@colspan attributes in th cells that have them.
|
||||
This algorithm isn't foolproof, because table headers with overlapping
|
||||
rowspans could hose the counting under certain conditions.
|
||||
-->
|
||||
<xsl:variable name="nColumns" select="count($currentRow/th) + count($currentRow/tr) + sum($currentRow/th/@colspan) + sum($currentRow/tr/@colspan) - count($currentRow/th/@colspan) - count($currentRow/tr/@colspan)"/>
|
||||
<xsl:variable name="newMaxColumns">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$nColumns > $maxColumns">
|
||||
<xsl:value-of select="$nColumns"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$maxColumns"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!-- Iterate through the template again if there are more rows -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="tr[position()=$row+1]">
|
||||
<xsl:call-template name="html-find-max-columns">
|
||||
<xsl:with-param name="row" select="$row+1"/>
|
||||
<xsl:with-param name="maxColumns" select="$newMaxColumns"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="html-print-table">
|
||||
<xsl:with-param name="spacerSpanColumns" select="$newMaxColumns"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
<xsl:template match="table3" name="html-print-table">
|
||||
<xsl:param name="spacerSpanColumns">1</xsl:param>
|
||||
<xsl:comment> :::::: New table :::::: </xsl:comment>
|
||||
<fo:block xsl:use-attribute-sets="table.padding">
|
||||
<fo:table table-layout="fixed" table-omit-footer-at-break="false">
|
||||
<!-- The next template calculates table column widths e.g.,...
|
||||
<fo:table-column column-width="1.25in"/>
|
||||
<fo:table-column column-width="5.0in"/>
|
||||
-->
|
||||
<xsl:call-template name="html-calculate-column-widths"/>
|
||||
<fo:table-header>
|
||||
<!-- If there is a 'title' attribute, output a title row -->
|
||||
<xsl:if test="@title">
|
||||
<xsl:comment> This table has a @title, so add a row for it </xsl:comment>
|
||||
<fo:table-row keep-together="always" keep-with-next="always">
|
||||
<fo:table-cell number-columns-spanned="{$spacerSpanColumns}" xsl:use-attribute-sets="table.title.cell">
|
||||
<fo:block xsl:use-attribute-sets="table.title.block">
|
||||
<xsl:value-of select="@title"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</xsl:if>
|
||||
</fo:table-header>
|
||||
<!-- If there is a caption element, output a table-footer -->
|
||||
<fo:table-footer>
|
||||
<!-- If there is a caption, add it -->
|
||||
<xsl:if test="caption">
|
||||
<xsl:comment> This table has a caption, so add a row for it </xsl:comment>
|
||||
<fo:table-row>
|
||||
<fo:table-cell number-columns-spanned="{$spacerSpanColumns}" xsl:use-attribute-sets="table.footer.cell">
|
||||
<fo:block xsl:use-attribute-sets="table.footer.block">
|
||||
<xsl:value-of select="caption"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</xsl:if>
|
||||
<!-- Put in a sequential table number -->
|
||||
<!--
|
||||
<fo:table-row>
|
||||
<fo:table-cell number-columns-spanned="{$spacerSpanColumns}" xsl:use-attribute-sets="table.number.cell">
|
||||
<fo:block xsl:use-attribute-sets="table.number.block">
|
||||
Table <xsl:value-of select="count(preceding-sibling::table) + 1"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
-->
|
||||
</fo:table-footer>
|
||||
<!-- Process any tbody/tr or tr records -->
|
||||
<fo:table-body>
|
||||
<xsl:apply-templates select="tr" mode="html-table">
|
||||
<xsl:with-param name="spacerSpanColumns" select="$spacerSpanColumns"/>
|
||||
</xsl:apply-templates>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
<xsl:template match="tr[th]" mode="html-table">
|
||||
<xsl:comment> ::: Subheading row ::: </xsl:comment>
|
||||
<!-- Changed from table.body.row (a bug!) -->
|
||||
<fo:table-row xsl:use-attribute-sets="table.subheading.row">
|
||||
<xsl:apply-templates select="th|td" mode="html-table"/>
|
||||
</fo:table-row>
|
||||
</xsl:template>
|
||||
<xsl:template match="tr[last()]" mode="html-table">
|
||||
<xsl:param name="spacerSpanColumns">1</xsl:param>
|
||||
<xsl:variable name="nColumns" select="count(th|td) + sum(th/@colspan|td/@colspan) - count(th/@colspan|td/@colspan)"/>
|
||||
<!-- Format the table row -->
|
||||
<xsl:comment> ::: Table body row <xsl:value-of select="position()"/> (<xsl:value-of select="$nColumns"/> columns) ::: </xsl:comment>
|
||||
<fo:table-row xsl:use-attribute-sets="table.body.row">
|
||||
<xsl:apply-templates select="th|td" mode="html-table"/>
|
||||
</fo:table-row>
|
||||
<!-- Add a spacer/border row: last row rule -->
|
||||
<xsl:comment> ::: Table row spacer for last row ::: </xsl:comment>
|
||||
<fo:table-row keep-with-previous="always">
|
||||
<fo:table-cell padding-after="3pt" number-columns-spanned="{$spacerSpanColumns}">
|
||||
<fo:block line-height="1pt">
|
||||
<xsl:comment> Ending border (solid rule) </xsl:comment>
|
||||
<fo:leader xsl:use-attribute-sets="table.body.lastrule"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</xsl:template>
|
||||
<xsl:template match="tr" mode="html-table">
|
||||
<xsl:param name="spacerSpanColumns">1</xsl:param>
|
||||
<xsl:param name="nextRow" select="following-sibling::tr[1]"/>
|
||||
<xsl:variable name="nColumns" select="count($nextRow/th | $nextRow/td)
|
||||
+ sum($nextRow/th/@colspan |$nextRow/td/@colspan)
|
||||
- count($nextRow/th/@colspan | $nextRow/td/@colspan)"/>
|
||||
<!-- Table body rows work as follows:
|
||||
- If the current row is not followed by a 'subheading' row,
|
||||
add a bottom border
|
||||
- If the current row is also the last row, add a
|
||||
'final' bottom border, otherwise a 'normal' bottom border
|
||||
- Otherwise, do not add a bottom border
|
||||
- Process the row by building table cells one at a time
|
||||
-->
|
||||
<!-- Format the table row -->
|
||||
<xsl:comment> ::: Table body row <xsl:value-of select="position()"/> (<xsl:value-of select="$nColumns"/> columns) ::: </xsl:comment>
|
||||
<fo:table-row xsl:use-attribute-sets="table.body.row">
|
||||
<xsl:apply-templates select="th|td" mode="html-table"/>
|
||||
</fo:table-row>
|
||||
<!-- Add in a spacer/border row -->
|
||||
<xsl:comment> ::: Table row spacer for row <xsl:value-of select="position()"/> ::: </xsl:comment>
|
||||
<fo:table-row keep-with-previous="always">
|
||||
<fo:table-cell padding-after="3pt" number-columns-spanned="{$nColumns}">
|
||||
<fo:block line-height="1pt">
|
||||
<xsl:choose>
|
||||
<!-- If next row contains a th; no border, 2pt padding, 1pt white rule -->
|
||||
<xsl:when test="following-sibling::tr[1]/th">
|
||||
<xsl:comment> Spacer only </xsl:comment>
|
||||
<fo:leader xsl:use-attribute-sets="table.body.norule"/>
|
||||
</xsl:when>
|
||||
<!-- If a row follows; regular border -->
|
||||
<xsl:when test="following-sibling::tr[1]">
|
||||
<xsl:comment> Regular border (rule) </xsl:comment>
|
||||
<fo:leader xsl:use-attribute-sets="table.body.rule"/>
|
||||
</xsl:when>
|
||||
<!-- Last row border -->
|
||||
<xsl:otherwise>
|
||||
<xsl:comment> Ending border (rule) </xsl:comment>
|
||||
<fo:leader xsl:use-attribute-sets="table.body.lastrule"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</xsl:template>
|
||||
<xsl:template match="th" mode="html-table">
|
||||
<xsl:comment> : Table subheading cell : </xsl:comment>
|
||||
<fo:table-cell xsl:use-attribute-sets="table.subheading.cell">
|
||||
<xsl:apply-templates select="@colspan|@rowspan|@align" mode="html-table"/>
|
||||
<fo:block xsl:use-attribute-sets="table.subheading.block">
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</xsl:template>
|
||||
<xsl:template match="td" mode="html-table">
|
||||
<xsl:comment> : Table body cell <xsl:value-of select="position()"/> : </xsl:comment>
|
||||
<fo:table-cell xsl:use-attribute-sets="table.body.cell">
|
||||
<xsl:apply-templates select="@colspan|@rowspan|@align" mode="html-table"/>
|
||||
<xsl:apply-templates select="*" mode="table"/>
|
||||
<fo:block xsl:use-attribute-sets="table.body.block">
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</xsl:template>
|
||||
<xsl:template match="@align" mode="html-table">
|
||||
<xsl:attribute name="text-align"><xsl:value-of select="."/></xsl:attribute>
|
||||
</xsl:template>
|
||||
<xsl:template match="@colspan" mode="html-table">
|
||||
<xsl:attribute name="number-columns-spanned"><xsl:value-of select="number(.)"/></xsl:attribute>
|
||||
</xsl:template>
|
||||
<xsl:template match="@rowspan" mode="html-table">
|
||||
<xsl:attribute name="number-rows-spanned"><xsl:value-of select="number(.)"/></xsl:attribute>
|
||||
</xsl:template>
|
||||
<!-- HTML tables generation with THEAD and TBODY -->
|
||||
<!-- Generation for tables with THEAD and TBODY -->
|
||||
<xsl:template match="table" name="find-max-columns">
|
||||
<!-- Before we do anything, we need to scan the table to find the maximum span -->
|
||||
<xsl:param name="row">1</xsl:param>
|
||||
@@ -355,15 +40,15 @@
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
<xsl:template match="table2" name="print-table">
|
||||
<xsl:template name="print-table">
|
||||
<xsl:param name="spacerSpanColumns">1</xsl:param>
|
||||
<xsl:comment> :::::: New table :::::: </xsl:comment>
|
||||
<fo:block xsl:use-attribute-sets="table.padding">
|
||||
<fo:table table-layout="fixed" table-omit-footer-at-break="false">
|
||||
<!-- The next template calculates table column widths e.g.,...
|
||||
<fo:table-column column-width="1.25in"/>
|
||||
<fo:table-column column-width="5.0in"/>
|
||||
-->
|
||||
<fo:table-column column-width="1.25in"/>
|
||||
<fo:table-column column-width="5.0in"/>
|
||||
-->
|
||||
<xsl:call-template name="calculate-column-widths"/>
|
||||
<fo:table-header>
|
||||
<!-- If there is a 'title' attribute, output a title row -->
|
||||
@@ -378,7 +63,7 @@
|
||||
</fo:table-row>
|
||||
</xsl:if>
|
||||
<!-- Process any thead elements -->
|
||||
<xsl:apply-templates select="thead" mode="table-head">
|
||||
<xsl:apply-templates select="thead">
|
||||
<xsl:with-param name="spacerSpanColumns" select="$spacerSpanColumns"/>
|
||||
</xsl:apply-templates>
|
||||
</fo:table-header>
|
||||
@@ -395,93 +80,124 @@
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</xsl:if>
|
||||
<!-- Put in a sequential table number -->
|
||||
<!--
|
||||
<fo:table-row>
|
||||
<fo:table-cell number-columns-spanned="{$spacerSpanColumns}" xsl:use-attribute-sets="table.number.cell">
|
||||
<fo:block xsl:use-attribute-sets="table.number.block">
|
||||
Table <xsl:value-of select="count(preceding-sibling::table) + 1"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
-->
|
||||
</fo:table-footer>
|
||||
<!-- Process any tbody/tr or tr records -->
|
||||
<fo:table-body>
|
||||
<xsl:apply-templates select="tbody/tr|tr" mode="table-body">
|
||||
<xsl:apply-templates select="tbody/tr | tr">
|
||||
<xsl:with-param name="spacerSpanColumns" select="$spacerSpanColumns"/>
|
||||
</xsl:apply-templates>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
<xsl:template match="thead" mode="table-head">
|
||||
<!-- Generation for tables without THEAD and TBODY -->
|
||||
<xsl:template match="table[count(thead)=0]" name="html-find-max-columns">
|
||||
<!-- Before we do anything, we need to scan the table to find the maximum span -->
|
||||
<xsl:param name="row">1</xsl:param>
|
||||
<xsl:param name="maxColumns">1</xsl:param>
|
||||
<!-- Get current row based on $row parameter -->
|
||||
<xsl:variable name="currentRow" select="tr[position()=$row]"/>
|
||||
<!-- Calculate the number of columns in this row. This will be the number
|
||||
of th cells that don't have @colspan attributes, plus the sum of all
|
||||
@colspan attributes in th cells that have them.
|
||||
This algorithm isn't foolproof, because table headers with overlapping
|
||||
rowspans could hose the counting under certain conditions.
|
||||
-->
|
||||
<xsl:variable name="nColumns" select="count($currentRow/th) + count($currentRow/tr) + sum($currentRow/th/@colspan) + sum($currentRow/tr/@colspan) - count($currentRow/th/@colspan) - count($currentRow/tr/@colspan)"/>
|
||||
<xsl:variable name="newMaxColumns">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$nColumns > $maxColumns">
|
||||
<xsl:value-of select="$nColumns"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$maxColumns"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<!-- Iterate through the template again if there are more rows -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="tr[position()=$row+1]">
|
||||
<xsl:call-template name="html-find-max-columns">
|
||||
<xsl:with-param name="row" select="$row+1"/>
|
||||
<xsl:with-param name="maxColumns" select="$newMaxColumns"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="html-print-table">
|
||||
<xsl:with-param name="spacerSpanColumns" select="$newMaxColumns"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
<xsl:template name="html-print-table">
|
||||
<xsl:param name="spacerSpanColumns">1</xsl:param>
|
||||
<!-- Process any tr elements -->
|
||||
<xsl:apply-templates select="tr" mode="table-head"/>
|
||||
<!-- Add a spacer: 4 pt total, 1 pt black line -->
|
||||
<xsl:comment> Table heading bottom spacer </xsl:comment>
|
||||
<fo:table-row keep-with-previous="always">
|
||||
<fo:table-cell padding-after="4.75pt" number-columns-spanned="{$spacerSpanColumns}">
|
||||
<fo:block line-height="1pt">
|
||||
<fo:leader xsl:use-attribute-sets="table.heading.rule"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<xsl:comment> :::::: New table :::::: </xsl:comment>
|
||||
<fo:block xsl:use-attribute-sets="table.padding">
|
||||
<fo:table table-layout="fixed" table-omit-footer-at-break="false">
|
||||
<!-- The next template calculates table column widths e.g.,...
|
||||
<fo:table-column column-width="1.25in"/>
|
||||
<fo:table-column column-width="5.0in"/>
|
||||
-->
|
||||
<xsl:call-template name="html-calculate-column-widths"/>
|
||||
<fo:table-header>
|
||||
<!-- If there is a 'title' attribute, output a title row -->
|
||||
<xsl:if test="@title">
|
||||
<xsl:comment> This table has a @title, so add a row for it </xsl:comment>
|
||||
<fo:table-row keep-together="always" keep-with-next="always">
|
||||
<fo:table-cell number-columns-spanned="{$spacerSpanColumns}" xsl:use-attribute-sets="table.title.cell">
|
||||
<fo:block xsl:use-attribute-sets="table.title.block">
|
||||
<xsl:value-of select="@title"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</xsl:if>
|
||||
<!-- if the first row is only made of table headers cells (th)
|
||||
then we will simulate that this row is the table header.
|
||||
(As if there was a thead block
|
||||
-->
|
||||
<xsl:if test="tr[1][count(*)=count(th)]">
|
||||
<!-- Process any tr elements -->
|
||||
<xsl:apply-templates select="tr[1][count(*)=count(th)]"/>
|
||||
<!-- Add a spacer: 4 pt total, 1 pt black line -->
|
||||
<xsl:comment> Table heading bottom spacer </xsl:comment>
|
||||
<fo:table-row keep-with-previous="always">
|
||||
<fo:table-cell padding-after="4.75pt" number-columns-spanned="{$spacerSpanColumns}">
|
||||
<fo:block line-height="1pt">
|
||||
<fo:leader xsl:use-attribute-sets="table.heading.rule"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</xsl:if>
|
||||
</fo:table-header>
|
||||
<!-- If there is a caption element, output a table-footer -->
|
||||
<fo:table-footer>
|
||||
<!-- If there is a caption, add it -->
|
||||
<xsl:if test="caption">
|
||||
<xsl:comment> This table has a caption, so add a row for it </xsl:comment>
|
||||
<fo:table-row>
|
||||
<fo:table-cell number-columns-spanned="{$spacerSpanColumns}" xsl:use-attribute-sets="table.footer.cell">
|
||||
<fo:block xsl:use-attribute-sets="table.footer.block">
|
||||
<xsl:value-of select="caption"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</xsl:if>
|
||||
</fo:table-footer>
|
||||
<!-- Process any tbody/tr or tr records -->
|
||||
<fo:table-body>
|
||||
<xsl:apply-templates select="tr[position()!=1][count(*)!=count(th)]">
|
||||
<xsl:with-param name="spacerSpanColumns" select="$spacerSpanColumns"/>
|
||||
</xsl:apply-templates>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
<xsl:template match="tr" mode="table-head">
|
||||
<xsl:comment> ::: Table heading row <xsl:value-of select="position()"/> ::: </xsl:comment>
|
||||
<fo:table-row xsl:use-attribute-sets="table.title.row">
|
||||
<!-- Process any th or td elements -->
|
||||
<xsl:apply-templates select="th|td" mode="table-head"/>
|
||||
</fo:table-row>
|
||||
</xsl:template>
|
||||
<xsl:template match="th|td" mode="table-head">
|
||||
<xsl:comment> : Table heading cell <xsl:value-of select="position()"/> : </xsl:comment>
|
||||
<fo:table-cell xsl:use-attribute-sets="table.heading.cell">
|
||||
<xsl:if test="@colspan">
|
||||
<xsl:attribute name="border-after-style">solid</xsl:attribute>
|
||||
<xsl:attribute name="border-after-width">0.75pt</xsl:attribute>
|
||||
<xsl:attribute name="border-after-color">black</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select="@colspan|@rowspan|@align" mode="table-head"/>
|
||||
<fo:block xsl:use-attribute-sets="table.heading.block">
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</xsl:template>
|
||||
<xsl:template match="tr[th]" mode="table-body">
|
||||
<xsl:comment> ::: Subheading row ::: </xsl:comment>
|
||||
<!-- Changed from table.body.row (a bug!) -->
|
||||
<fo:table-row xsl:use-attribute-sets="table.subheading.row">
|
||||
<xsl:apply-templates select="th|td" mode="table-body"/>
|
||||
</fo:table-row>
|
||||
</xsl:template>
|
||||
<xsl:template match="tr[last()]" mode="table-body">
|
||||
<!-- body table row -->
|
||||
<xsl:template match="table/tr | table/tbody/tr">
|
||||
<xsl:param name="spacerSpanColumns">1</xsl:param>
|
||||
<xsl:variable name="nColumns" select="count(th|td) + sum(th/@colspan|td/@colspan) - count(th/@colspan|td/@colspan)"/>
|
||||
<!-- Format the table row -->
|
||||
<xsl:comment> ::: Table body row <xsl:value-of select="position()"/> (<xsl:value-of select="$nColumns"/> columns) ::: </xsl:comment>
|
||||
<fo:table-row xsl:use-attribute-sets="table.body.row">
|
||||
<xsl:apply-templates select="th|td" mode="table-body"/>
|
||||
</fo:table-row>
|
||||
<!-- Add a spacer/border row: last row rule -->
|
||||
<xsl:comment> ::: Table row spacer for last row ::: </xsl:comment>
|
||||
<fo:table-row keep-with-previous="always">
|
||||
<fo:table-cell padding-after="3pt" number-columns-spanned="{$spacerSpanColumns}">
|
||||
<fo:block line-height="1pt">
|
||||
<xsl:comment> Ending border (solid rule) </xsl:comment>
|
||||
<fo:leader xsl:use-attribute-sets="table.body.lastrule"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</xsl:template>
|
||||
<xsl:template match="tr" mode="table-body">
|
||||
<xsl:param name="spacerSpanColumns">1</xsl:param>
|
||||
<xsl:param name="nextRow" select="following-sibling::tr[1]"/>
|
||||
<xsl:variable name="nColumns" select="count($nextRow/th | $nextRow/td)
|
||||
+ sum($nextRow/th/@colspan |$nextRow/td/@colspan)
|
||||
- count($nextRow/th/@colspan | $nextRow/td/@colspan)"/>
|
||||
<xsl:variable name="nColumns" select="count(th | td)
|
||||
+ sum(th/@colspan |td/@colspan)
|
||||
- count(th/@colspan | td/@colspan)"/>
|
||||
<!-- Table body rows work as follows:
|
||||
- If the current row is not followed by a 'subheading' row,
|
||||
add a bottom border
|
||||
@@ -489,11 +205,11 @@
|
||||
'final' bottom border, otherwise a 'normal' bottom border
|
||||
- Otherwise, do not add a bottom border
|
||||
- Process the row by building table cells one at a time
|
||||
-->
|
||||
-->
|
||||
<!-- Format the table row -->
|
||||
<xsl:comment> ::: Table body row <xsl:value-of select="position()"/> (<xsl:value-of select="$nColumns"/> columns) ::: </xsl:comment>
|
||||
<fo:table-row xsl:use-attribute-sets="table.body.row">
|
||||
<xsl:apply-templates select="th|td" mode="table-body"/>
|
||||
<xsl:apply-templates select="th|td"/>
|
||||
</fo:table-row>
|
||||
<!-- Add in a spacer/border row -->
|
||||
<xsl:comment> ::: Table row spacer for row <xsl:value-of select="position()"/> ::: </xsl:comment>
|
||||
@@ -521,46 +237,111 @@
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</xsl:template>
|
||||
<xsl:template match="th" mode="table-body">
|
||||
<!-- a row containing at least a head cell -->
|
||||
<xsl:template match="table/tbody/tr[th] | table/tr[th]">
|
||||
<xsl:comment> ::: Subheading row ::: </xsl:comment>
|
||||
<!-- Changed from table.body.row (a bug!) -->
|
||||
<fo:table-row xsl:use-attribute-sets="table.subheading.row">
|
||||
<xsl:apply-templates select="th|td"/>
|
||||
</fo:table-row>
|
||||
</xsl:template>
|
||||
<!-- The last row -->
|
||||
<xsl:template match="table/tbody/tr[last()] | table/tr[last()]">
|
||||
<xsl:param name="spacerSpanColumns">1</xsl:param>
|
||||
<xsl:variable name="nColumns" select="count(th|td) + sum(th/@colspan|td/@colspan) - count(th/@colspan|td/@colspan)"/>
|
||||
<!-- Format the table row -->
|
||||
<xsl:comment> ::: Table body row <xsl:value-of select="position()"/> (<xsl:value-of select="$nColumns"/> columns) ::: </xsl:comment>
|
||||
<fo:table-row xsl:use-attribute-sets="table.body.row">
|
||||
<xsl:apply-templates select="th|td"/>
|
||||
</fo:table-row>
|
||||
<!-- Add a spacer/border row: last row rule -->
|
||||
<xsl:comment> ::: Table row spacer for last row ::: </xsl:comment>
|
||||
<fo:table-row keep-with-previous="always">
|
||||
<fo:table-cell padding-after="3pt" number-columns-spanned="{$spacerSpanColumns}">
|
||||
<fo:block line-height="1pt">
|
||||
<xsl:comment> Ending border (solid rule) </xsl:comment>
|
||||
<fo:leader xsl:use-attribute-sets="table.body.lastrule"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</xsl:template>
|
||||
<!-- the table head -->
|
||||
<xsl:template match="thead">
|
||||
<xsl:param name="spacerSpanColumns">1</xsl:param>
|
||||
<!-- Process any tr elements -->
|
||||
<xsl:apply-templates select="tr"/>
|
||||
<!-- Add a spacer: 4 pt total, 1 pt black line -->
|
||||
<xsl:comment> Table heading bottom spacer </xsl:comment>
|
||||
<fo:table-row keep-with-previous="always">
|
||||
<fo:table-cell padding-after="4.75pt" number-columns-spanned="{$spacerSpanColumns}">
|
||||
<fo:block line-height="1pt">
|
||||
<fo:leader xsl:use-attribute-sets="table.heading.rule"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</xsl:template>
|
||||
<!-- Table heading rows -->
|
||||
<xsl:template match="table/tr[1][count(*)=count(th)] | thead/tr">
|
||||
<xsl:comment> ::: Table heading row <xsl:value-of select="position()"/> ::: </xsl:comment>
|
||||
<fo:table-row xsl:use-attribute-sets="table.title.row">
|
||||
<!-- Process any th or td elements -->
|
||||
<xsl:apply-templates select="th|td"/>
|
||||
</fo:table-row>
|
||||
</xsl:template>
|
||||
<!-- Table heading cell -->
|
||||
<xsl:template match="table/tbody/tr/th | table/tr/th">
|
||||
<xsl:comment> : Table subheading cell : </xsl:comment>
|
||||
<fo:table-cell xsl:use-attribute-sets="table.subheading.cell">
|
||||
<xsl:apply-templates select="@colspan|@rowspan|@align" mode="table-body"/>
|
||||
<xsl:apply-templates select="@rowspan"/>
|
||||
<xsl:apply-templates select="@colspan|@align"/>
|
||||
<fo:block xsl:use-attribute-sets="table.subheading.block">
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</xsl:template>
|
||||
<xsl:template match="td" mode="table-body">
|
||||
<!-- A heading cell -->
|
||||
<xsl:template match="table/tr[1][count(*)=count(th)]/th | table/thead/tr/th | table/thead/tr/td">
|
||||
<xsl:comment> : Table heading cell <xsl:value-of select="position()"/> : </xsl:comment>
|
||||
<fo:table-cell xsl:use-attribute-sets="table.heading.cell">
|
||||
<xsl:if test="@colspan">
|
||||
<xsl:attribute name="border-after-style">solid</xsl:attribute>
|
||||
<xsl:attribute name="border-after-width">0.75pt</xsl:attribute>
|
||||
<xsl:attribute name="border-after-color">black</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select="@colspan|@rowspan|@align"/>
|
||||
<fo:block xsl:use-attribute-sets="table.heading.block">
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</xsl:template>
|
||||
<!-- A table cell -->
|
||||
<xsl:template match="td">
|
||||
<xsl:comment> : Table body cell <xsl:value-of select="position()"/> : </xsl:comment>
|
||||
<fo:table-cell xsl:use-attribute-sets="table.body.cell">
|
||||
<xsl:apply-templates select="@colspan|@rowspan|@align" mode="table-body"/>
|
||||
<xsl:apply-templates select="*" mode="table"/>
|
||||
<xsl:apply-templates select="@colspan|@align|@rowspan"/>
|
||||
<fo:block xsl:use-attribute-sets="table.body.block">
|
||||
<xsl:apply-templates/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</xsl:template>
|
||||
<!-- align and spanning attributes -->
|
||||
<xsl:template match="@align">
|
||||
<xsl:attribute name="text-align"><xsl:value-of select="."/></xsl:attribute>
|
||||
</xsl:template>
|
||||
<xsl:template match="@colspan">
|
||||
<xsl:attribute name="number-columns-spanned"><xsl:value-of select="number(.)"/></xsl:attribute>
|
||||
</xsl:template>
|
||||
<!-- cell rowspan attribute -->
|
||||
<xsl:template match="@rowspan">
|
||||
<xsl:attribute name="number-rows-spanned"><xsl:value-of select="number(.) * 2 - 1"/></xsl:attribute>
|
||||
</xsl:template>
|
||||
<xsl:template match="@rowspan[ancestor::thead]">
|
||||
<xsl:attribute name="number-rows-spanned"><xsl:value-of select="number(.)"/></xsl:attribute>
|
||||
</xsl:template>
|
||||
<!-- html tt tag or code tag in a table -->
|
||||
<xsl:template match="tt|code[ancestor::table]">
|
||||
<fo:inline xsl:use-attribute-sets="table.pre">
|
||||
<xsl:apply-templates/>
|
||||
</fo:inline>
|
||||
</xsl:template>
|
||||
<xsl:template match="@align" mode="table-head">
|
||||
<xsl:attribute name="text-align"><xsl:value-of select="."/></xsl:attribute>
|
||||
</xsl:template>
|
||||
<xsl:template match="@align" mode="table-body">
|
||||
<xsl:attribute name="text-align"><xsl:value-of select="."/></xsl:attribute>
|
||||
</xsl:template>
|
||||
<xsl:template match="@colspan" mode="table-head">
|
||||
<xsl:attribute name="number-columns-spanned"><xsl:value-of select="number(.)"/></xsl:attribute>
|
||||
</xsl:template>
|
||||
<xsl:template match="@rowspan" mode="table-head">
|
||||
<xsl:attribute name="number-rows-spanned"><xsl:value-of select="number(.)"/></xsl:attribute>
|
||||
</xsl:template>
|
||||
<xsl:template match="@colspan" mode="table-body">
|
||||
<xsl:attribute name="number-columns-spanned"><xsl:value-of select="number(.)"/></xsl:attribute>
|
||||
</xsl:template>
|
||||
<xsl:template match="@rowspan" mode="table-body">
|
||||
<xsl:attribute name="number-rows-spanned"><xsl:value-of select="number(.) * 2 - 1"/></xsl:attribute>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
</xsl:stylesheet>
|
||||
@@ -1,46 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
|
||||
<!-- These attribute-sets are treated as 'styles,'
|
||||
and are referenced in the templates below -->
|
||||
<xsl:attribute-set name="toc.cell">
|
||||
<xsl:attribute name="display-align">after</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="toc.base.style">
|
||||
<xsl:attribute name="font-family">Helvetica,sans-serif</xsl:attribute>
|
||||
<xsl:attribute name="line-height">16pt</xsl:attribute>
|
||||
<xsl:attribute name="text-align-last">start</xsl:attribute>
|
||||
<xsl:attribute name="wrap-option">no-wrap</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="toc.leader.style">
|
||||
<xsl:attribute name="leader-pattern">dots</xsl:attribute>
|
||||
<xsl:attribute name="leader-pattern-width">5pt</xsl:attribute>
|
||||
<xsl:attribute name="color"><xsl:value-of select="$colorDarkGray"/></xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="toc.number.style">
|
||||
<xsl:attribute name="font-size">9.5pt</xsl:attribute>
|
||||
<xsl:attribute name="text-align">end</xsl:attribute>
|
||||
<xsl:attribute name="color"><xsl:value-of select="$colorMediumGray"/></xsl:attribute>
|
||||
<xsl:attribute name="line-height">16pt</xsl:attribute>
|
||||
<xsl:attribute name="end-indent">6pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="toc.h1.style" use-attribute-sets="toc.base.style">
|
||||
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
<xsl:attribute name="space-before">18pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="toc.h2.style" use-attribute-sets="toc.base.style">
|
||||
<xsl:attribute name="font-size">9.5pt</xsl:attribute>
|
||||
<xsl:attribute name="space-before">15pt</xsl:attribute>
|
||||
<xsl:attribute name="space-before">3pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="toc.h3.style" use-attribute-sets="toc.base.style">
|
||||
<xsl:attribute name="font-size">9.5pt</xsl:attribute>
|
||||
<xsl:attribute name="space-before">4pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:attribute-set name="toc.h4.style" use-attribute-sets="toc.base.style">
|
||||
<xsl:attribute name="font-size">9.5pt</xsl:attribute>
|
||||
<xsl:attribute name="space-before">4pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<!-- Templates for handling the TOC -->
|
||||
<xsl:template name="fo-toc">
|
||||
<fo:page-sequence master-reference="toc" initial-page-number="1" format="i">
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/TR/2001/REC-SVG-20010904" version="1.0">
|
||||
<xsl:include href="fo-styles.xslt"/>
|
||||
<xsl:include href="fo-layouts.xslt"/>
|
||||
<xsl:include href="fo-cover.xslt"/>
|
||||
<xsl:include href="fo-toc.xslt"/>
|
||||
@@ -24,29 +25,13 @@
|
||||
<xsl:variable name="lc">abcdefghijklmnopqrstuvwxyz</xsl:variable>
|
||||
<xsl:variable name="uc">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable>
|
||||
<xsl:variable name="footerText">©<xsl:value-of select="$publicationYear"/>
|
||||
<xsl:value-of select="concat(' ',$companyIncName)"/> • All rights reserved
|
||||
<xsl:if test="$confidential = 'true'">
|
||||
• Proprietary and Confidential
|
||||
</xsl:if>
|
||||
<xsl:value-of select="concat(' ',$companyIncName)"/> • All rights reserved<xsl:if test="$confidential = 'true'">• Proprietary and Confidential</xsl:if>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="colorDarkGray">#454545</xsl:variable>
|
||||
<xsl:variable name="colorMediumGray">#A9A9A9</xsl:variable>
|
||||
<xsl:variable name="colorLightGray">#D3D3D3</xsl:variable>
|
||||
<!-- <xsl:variable name="colorWarmGrey11">#504b42</xsl:variable> -->
|
||||
<xsl:variable name="colorWarmGrey11">#4b4542</xsl:variable>
|
||||
<xsl:output method="xml" encoding="UTF-8" indent="yes" omit-xml-declaration="no"/>
|
||||
<!-- Error style -->
|
||||
<xsl:attribute-set name="error.block" use-attribute-sets="base.block">
|
||||
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
<xsl:attribute name="color">red</xsl:attribute>
|
||||
<xsl:attribute name="border-style">solid</xsl:attribute>
|
||||
<xsl:attribute name="border-width">0.5pt</xsl:attribute>
|
||||
<xsl:attribute name="border-color">red</xsl:attribute>
|
||||
<xsl:attribute name="padding">0.75em</xsl:attribute>
|
||||
<xsl:attribute name="start-indent">inherited-property-value(start-indent) + 2.5em</xsl:attribute>
|
||||
<xsl:attribute name="end-indent">inherited-property-value(end-indent) + 3em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<!-- Templates -->
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates select="project"/>
|
||||
@@ -58,9 +43,7 @@
|
||||
</fo:root>
|
||||
</xsl:template>
|
||||
<xsl:template match="project/body">
|
||||
<!-- Custom cover pages will be included in a future version -->
|
||||
<xsl:call-template name="fo-cover"/>
|
||||
<!-- <xsl:call-template name="fo-cover-inside" /> -->
|
||||
<xsl:call-template name="fo-toc"/>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
@@ -110,51 +93,64 @@
|
||||
<!-- Renders the xml xdoc document -->
|
||||
<!-- Retrieve the xdoc file relative to the basePath;
|
||||
the name is the href, but substitute .xml as the suffix -->
|
||||
<xsl:variable name="href" select="@href"/>
|
||||
<xsl:variable name="documentName" select="substring-before( @href, '.html' )"/>
|
||||
<xsl:variable name="documentPath" select="concat($basePath, $documentName, '.xml')"/>
|
||||
<xsl:if test="normalize-space(@href)">
|
||||
<xsl:if test="$debug = 'true'">
|
||||
<xsl:message>Creating XSL:FO for <xsl:value-of select="$documentPath"/>
|
||||
</xsl:message>
|
||||
</xsl:if>
|
||||
<fo:page-sequence master-reference="body" initial-page-number="{$pageStart}">
|
||||
<!-- Render the header and footer -->
|
||||
<xsl:call-template name="body-header">
|
||||
<xsl:with-param name="headerText" select="concat($chapterNumber, ' ', translate(@name, $lc, $uc))"/>
|
||||
<xsl:variable name="href">
|
||||
<xsl:choose>
|
||||
<!-- If :
|
||||
- the href isn't a complete url (http://)
|
||||
- and the href isn't already starting with / -->
|
||||
<xsl:when test="not(starts-with(normalize-space(@href),'http')) and not(starts-with(normalize-space(@href),'/'))">
|
||||
<xsl:text>/</xsl:text>
|
||||
<xsl:value-of select="normalize-space(@href)"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="normalize-space(@href)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="documentName" select="substring-before( $href, '.html' )"/>
|
||||
<fo:page-sequence master-reference="body" initial-page-number="{$pageStart}">
|
||||
<!-- Render the header and footer -->
|
||||
<xsl:call-template name="body-header">
|
||||
<xsl:with-param name="headerText" select="concat($chapterNumber, ' ', translate(@name, $lc, $uc))"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="body-footer">
|
||||
<xsl:with-param name="footerText" select="translate($footerText, $lc, $uc)"/>
|
||||
</xsl:call-template>
|
||||
<fo:flow flow-name="xsl-region-body">
|
||||
<!-- Render the chapter heading -->
|
||||
<xsl:call-template name="body-chapter-heading">
|
||||
<xsl:with-param name="chapterNumber">
|
||||
<xsl:value-of select="$chapterNumber"/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="chapter">
|
||||
<xsl:value-of select="@name"/>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="body-footer">
|
||||
<xsl:with-param name="footerText" select="translate($footerText, $lc, $uc)"/>
|
||||
</xsl:call-template>
|
||||
<fo:flow flow-name="xsl-region-body">
|
||||
<!-- Render the chapter heading -->
|
||||
<xsl:call-template name="body-chapter-heading">
|
||||
<xsl:with-param name="chapterNumber">
|
||||
<xsl:value-of select="$chapterNumber"/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="chapter">
|
||||
<xsl:value-of select="@name"/>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<!-- Render the associated xdoc -->
|
||||
<fo:block id="{@href}{generate-id()}">
|
||||
<xsl:if test="not(starts-with($href, 'http'))">
|
||||
<!-- Render the associated xdoc -->
|
||||
<fo:block id="{@href}{generate-id()}">
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(starts-with($href, 'http'))">
|
||||
<xsl:variable name="documentPath" select="concat(normalize-space($basePath),normalize-space( $documentName), '.xml')"/>
|
||||
<xsl:if test="$debug = 'true'">
|
||||
<xsl:message>Creating XSL:FO for <xsl:value-of select="$documentPath"/>
|
||||
</xsl:message>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates select="document($documentPath)/document/body">
|
||||
<xsl:with-param name="chapterNumber">
|
||||
<xsl:value-of select="$chapterNumber"/>
|
||||
</xsl:with-param>
|
||||
</xsl:apply-templates>
|
||||
</xsl:if>
|
||||
<xsl:if test="starts-with($href, 'http')">
|
||||
<fo:basic-link external-destination="{@href}">
|
||||
<fo:inline xsl:use-attribute-sets="href">
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<fo:basic-link external-destination="{$href}">
|
||||
<fo:inline xsl:use-attribute-sets="href.external">
|
||||
<xsl:value-of select="$href"/>
|
||||
</fo:inline>
|
||||
</fo:basic-link>
|
||||
</xsl:if>
|
||||
</fo:block>
|
||||
</fo:flow>
|
||||
</fo:page-sequence>
|
||||
</xsl:if>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</fo:block>
|
||||
</fo:flow>
|
||||
</fo:page-sequence>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
||||
@@ -6,9 +6,16 @@
|
||||
</properties>
|
||||
<body>
|
||||
<release version="2.0" date="In CVS" description="Beta Release.">
|
||||
<action dev="evenisse" type="fix" issue="MPPDF-3">A new plugin property (maven.pdf.navigationFile) is added to allow the users to have a different navigation file for the site and for the pdf doc.</action>
|
||||
<action dev="evenisse" type="fix" issue="MPPDF-2">The use of links inside xdocs don't lead to crash the PDF generation.</action>
|
||||
<action dev="evenisse" type="update" issue="MPPDF-1">MAVEN-MPPDF-1. Completely re-writte of the PDF plug-in. It solves most of the thorniest issues, such as table formatting, more levels in the table of contents, and image sizing. The graphic design is also dramatically improved.</action>
|
||||
<action dev="evenisse" type="add">Upgraded to xerces 2.4.0, fop 0.20.5, batik 1.5</action>
|
||||
<action dev="evenisse" type="fix" issue="MPPDF-3">A new plugin
|
||||
property (maven.pdf.navigationFile) is added to allow the users
|
||||
to have a different navigation file for the site and for the pdf doc.</action>
|
||||
<action dev="evenisse" type="fix" issue="MPPDF-2">The use of links
|
||||
inside xdocs don't lead to crash the PDF generation.</action>
|
||||
<action dev="evenisse" type="update" issue="MPPDF-1">MAVEN-MPPDF-1.
|
||||
Completely re-write of the PDF plug-in. It solves most of the thorniest
|
||||
issues, such as table formatting, more levels in the table of contents,
|
||||
and image sizing. The graphic design is also dramatically improved.</action>
|
||||
</release>
|
||||
<release version="1.2" date="2003-09-29">
|
||||
<action dev="dion" type="update">update to use maven.docs.*/maven.gen.docs</action>
|
||||
|
||||
@@ -11,5 +11,76 @@
|
||||
</ul>
|
||||
</answer>
|
||||
</faq>
|
||||
<faq id="how-images">
|
||||
<question>Which types of images can I use in my documents ?</question>
|
||||
<answer>
|
||||
<p>You can use images types that <a href="http://xml.apache.org/fop/graphics.html">FOP</a> can use.</p>
|
||||
<p>The table below summarizes the <em>theoretical</em> support for graphical formats within FOP.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Format</th>
|
||||
<th>Type</th>
|
||||
<th>Support Thru</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="http://xml.apache.org/fop/graphics.html#bmp">BMP</a> (Microsoft Windows Bitmap)</td>
|
||||
<td>bitmap</td>
|
||||
<td>
|
||||
<a href="http://xml.apache.org/fop/graphics.html#native">FOP native</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="http://xml.apache.org/fop/graphics.html#eps">EPS</a> (Encapsulated PostScript)</td>
|
||||
<td>metafile (both bitmap and vector), probably most frequently used for vector drawings</td>
|
||||
<td>
|
||||
<a href="http://xml.apache.org/fop/graphics.html#native">FOP native</a> (limited support, see restrictions below)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>GIF (Graphics Interchange Format)</td>
|
||||
<td>bitmap</td>
|
||||
<td>
|
||||
<a href="http://xml.apache.org/fop/graphics.html#native">FOP native</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="http://xml.apache.org/fop/graphics.html#jpeg">JPEG</a> (Joint Photographic Experts Group)</td>
|
||||
<td>bitmap</td>
|
||||
<td>
|
||||
<a href="http://xml.apache.org/fop/graphics.html#native">FOP native</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="http://xml.apache.org/fop/graphics.html#png">PNG</a> (Portable Network Graphic)</td>
|
||||
<td>bitmap</td>
|
||||
<td>
|
||||
<a href="http://xml.apache.org/fop/graphics.html#jimi">JIMI</a> or <a href="http://xml.apache.org/fop/graphics.html#jai">JAI</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="http://xml.apache.org/fop/graphics.html#svg">SVG</a> (Scalable Vector Graphics)</td>
|
||||
<td>vector (with embedded bitmaps)</td>
|
||||
<td>
|
||||
<a href="http://xml.apache.org/fop/graphics.html#batik">Batik</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="http://xml.apache.org/fop/graphics.html#tiff">TIFF</a> (Tag Image Format File)</td>
|
||||
<td>bitmap</td>
|
||||
<td>
|
||||
<a href="http://xml.apache.org/fop/graphics.html#native">FOP native</a> or <a href="http://xml.apache.org/fop/graphics.html#jai">JAI</a>, depending on the subformat. See <a href="http://xml.apache.org/fop/graphics.html#tiff">TIFF</a> for more details.(JIMI also supports TIFF, but this has not been implemented within FOP).</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</answer>
|
||||
</faq>
|
||||
</part>
|
||||
</faqs>
|
||||
|
||||
@@ -1,45 +1,46 @@
|
||||
<?xml version="1.0"?>
|
||||
<document>
|
||||
|
||||
<properties>
|
||||
<title>Maven Ant Plug-in Goals</title>
|
||||
<author email="dion@multitask.com.au">dIon Gillard</author>
|
||||
</properties>
|
||||
|
||||
<body>
|
||||
<section name="Goals">
|
||||
<table>
|
||||
<tr><th>Goal</th><th>Description</th></tr>
|
||||
<tr>
|
||||
<td>fo</td>
|
||||
<td>
|
||||
<properties>
|
||||
<title>Maven Ant Plug-in Goals</title>
|
||||
<author email="dion@multitask.com.au">dIon Gillard</author>
|
||||
</properties>
|
||||
<body>
|
||||
<section name="Goals">
|
||||
<table>
|
||||
<tr>
|
||||
<th>Goal</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>fo</td>
|
||||
<td>
|
||||
This simply pre-requisites the <code>fo:fo</code> goal.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>fo:fo</td>
|
||||
<td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>fo:fo</td>
|
||||
<td>
|
||||
Generates an fo xml document from the <code>navigation.xml</code>
|
||||
file supplied as part of the documentation. Please note that as
|
||||
yet, no sanity check is done to make sure this file exists.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pdf</td>
|
||||
<td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pdf</td>
|
||||
<td>
|
||||
This is the default goal of the plugin and simply pre-requisites
|
||||
the <code>pdf:pdf</code> goal.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pdf:pdf</td>
|
||||
<td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pdf:pdf</td>
|
||||
<td>
|
||||
Generates a PDF document containing all project documentation.
|
||||
The PDF is generated from the .fo file generated in the <code>fo:fo</code>
|
||||
goal.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</section>
|
||||
</body>
|
||||
</tr>
|
||||
</table>
|
||||
</section>
|
||||
</body>
|
||||
</document>
|
||||
|
||||
BIN
pdf/xdocs/images/asf_logo_wide_clear.gif
Normal file
BIN
pdf/xdocs/images/asf_logo_wide_clear.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.5 KiB |
BIN
pdf/xdocs/images/maven.gif
Normal file
BIN
pdf/xdocs/images/maven.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
@@ -8,128 +8,193 @@
|
||||
<section name="Maven PDF Plugin Settings">
|
||||
<p>This properties are used by the plugin and can be redefined by
|
||||
the user.</p>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Property name</th>
|
||||
<th>Optional?</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maven.docs.src</td>
|
||||
<td>Yes</td>
|
||||
<td>The source directory for the
|
||||
<code>${maven.pdf.navigationFile}</code> file and the user
|
||||
xml documentations files. Defaults to
|
||||
<code>${basedir}/xdocs</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maven.docs.dest</td>
|
||||
<td>Yes</td>
|
||||
<td>The destination directory for PDF documentation. Images
|
||||
are also copied from this directory. Defaults to
|
||||
<code>${maven.build.dir}/docs/</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maven.docs.outputencoding</td>
|
||||
<td>Yes</td>
|
||||
<td>The output encoding of the generated documentation.
|
||||
Defaults to <code>ISO-8859-1</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maven.gen.docs</td>
|
||||
<td>Yes</td>
|
||||
<td>The directory for generated xdocs. Defaults to
|
||||
<code>${maven.build.dir}/generated-xdocs/</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maven.pdf.pdfName</td>
|
||||
<td>Yes</td>
|
||||
<td>The name of pdf file. Defaults to
|
||||
<code>${pom.artifactId}.pdf</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maven.pdf.confidential</td>
|
||||
<td>Yes</td>
|
||||
<td>Add a confidential text to the footer of each page.
|
||||
Defaults to <code>false</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maven.pdf.paperType</td>
|
||||
<td>Yes</td>
|
||||
<td>Paper type for the generated PDF file. Defaults to
|
||||
<code>A4</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maven.pdf.companyIncName</td>
|
||||
<td>Yes</td>
|
||||
<td>The company name printed on each page footer beside the copyrigths.
|
||||
Defaults to <code>${pom.organization.name}</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maven.pdf.copyrightYear</td>
|
||||
<td>Yes</td>
|
||||
<td>Defaults to <code>${pom.inceptionYear}</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maven.pdf.debug</td>
|
||||
<td>Yes</td>
|
||||
<td>Debug the pdf generation process. Defaults to
|
||||
<code>false</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maven.pdf.imageDpi</td>
|
||||
<td>Yes</td>
|
||||
<td>Defaults to <code>150</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maven.pdf.navigationFile</td>
|
||||
<td>Yes</td>
|
||||
<td>Filename for the navigation file used to generate the
|
||||
PDF. Defaults to <code>navigation.xml</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maven.pdf.projectLogo</td>
|
||||
<td>Yes</td>
|
||||
<td>Project logo URL (or relative path). Defaults to
|
||||
<code>${pom.url}${pom.logo}</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maven.pdf.companyLogo</td>
|
||||
<td>Yes</td>
|
||||
<td>Company logo URL (or relative path). Defaults to
|
||||
<code>${pom.organization.url}${pom.organization.logo}</code>
|
||||
<subsection name="PDF content customization">
|
||||
<table>
|
||||
<tr>
|
||||
<th width="25%">Property name</th>
|
||||
<th>Description</th>
|
||||
<th width="10%">Optional?</th>
|
||||
<th>Default value</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%">maven.pdf.confidential</td>
|
||||
<td>Add a confidential text to the footer of each page.</td>
|
||||
<td width="10%">Yes</td>
|
||||
<td>
|
||||
<code>false</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%">maven.pdf.paperType</td>
|
||||
<td>Paper type for the generated PDF file. Available formats are :
|
||||
<ul>
|
||||
<li>
|
||||
<code>A4</code> : 8.25in x 11.70in</li>
|
||||
<li>
|
||||
<code>US</code> : 8.5in x 14in</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td width="10%">Yes</td>
|
||||
<td>
|
||||
<code>A4</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%">maven.pdf.companyIncName</td>
|
||||
<td>The company name printed on each page footer beside the copyrigth.</td>
|
||||
<td width="10%">Yes</td>
|
||||
<td>
|
||||
<code>${pom.organization.name}</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%">maven.pdf.copyrightYear</td>
|
||||
<td>The year for the copyright.</td>
|
||||
<td width="10%">Yes</td>
|
||||
<td>
|
||||
<code>${pom.inceptionYear}</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%">maven.pdf.imageDpi</td>
|
||||
<td>Images resolution.</td>
|
||||
<td width="10%">Yes</td>
|
||||
<td>
|
||||
<code>75</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%">maven.pdf.navigationFile</td>
|
||||
<td>Filename for the navigation file used to generate the
|
||||
PDF. It allows to separate the content of the site
|
||||
and the content of the PDF documentation.</td>
|
||||
<td width="10%">Yes</td>
|
||||
<td>
|
||||
<code>navigation.xml</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%">maven.pdf.projectLogo</td>
|
||||
<td>Project logo URL (or relative path).</td>
|
||||
<td width="10%">Yes</td>
|
||||
<td>
|
||||
<code>${pom.url}${pom.logo}</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%">maven.pdf.companyLogo</td>
|
||||
<td>Company logo URL (or relative path).
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maven.pdf.cover.projectCompany</td>
|
||||
<td>Yes</td>
|
||||
<td>Company name printed on the cover. Defaults to
|
||||
<code>${pom.organization.name}</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maven.pdf.cover.projectName</td>
|
||||
<td>Yes</td>
|
||||
<td>Project name .Defaults to
|
||||
<code>${pom.name}</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maven.pdf.cover.type</td>
|
||||
<td>Yes</td>
|
||||
<td>Type of documentation. Defaults to
|
||||
<code>Project Documentation</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maven.pdf.cover.version</td>
|
||||
<td>Yes</td>
|
||||
<td>Project/Document version printed on the cover. Defaults
|
||||
to <code>${pom.currentVersion}</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>maven.pdf.cover.date</td>
|
||||
<td>Yes</td>
|
||||
<td>Defaults to current day.</td>
|
||||
</tr>
|
||||
</table>
|
||||
<td width="10%">Yes</td>
|
||||
<td>
|
||||
<code>${pom.organization.url}${pom.organization.logo}</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%">maven.pdf.cover.projectCompany</td>
|
||||
<td>Company name printed on the cover.</td>
|
||||
<td width="10%">Yes</td>
|
||||
<td>
|
||||
<code>${pom.organization.name}</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%">maven.pdf.cover.projectName</td>
|
||||
<td>Project name .</td>
|
||||
<td width="10%">Yes</td>
|
||||
<td>
|
||||
<code>${pom.name}</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%">maven.pdf.cover.type</td>
|
||||
<td>Type of documentation. </td>
|
||||
<td width="10%">Yes</td>
|
||||
<td>
|
||||
<code>Project Documentation</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%">maven.pdf.cover.version</td>
|
||||
<td>Project/Document version printed on the cover.</td>
|
||||
<td width="10%">Yes</td>
|
||||
<td>
|
||||
<code>${pom.currentVersion}</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%">maven.pdf.cover.date</td>
|
||||
<td>Defaults to current day.</td>
|
||||
<td width="10%">Yes</td>
|
||||
<td>
|
||||
<code>Empty.</code> The build date is used.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</subsection>
|
||||
<subsection name="Project parameters">
|
||||
<table>
|
||||
<tr>
|
||||
<th width="25%">Property name</th>
|
||||
<th>Description</th>
|
||||
<th width="10%">Optional?</th>
|
||||
<th>Default value</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%">maven.docs.src</td>
|
||||
<td>The source directory for the
|
||||
<code>${maven.pdf.navigationFile}</code> file and the user
|
||||
xml documentations files.</td>
|
||||
<td width="10%">Yes</td>
|
||||
<td>
|
||||
<code>${basedir}/xdocs</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%">maven.docs.dest</td>
|
||||
<td>The destination directory for PDF documentation. Images
|
||||
are also retreived from this directory.</td>
|
||||
<td width="10%">Yes</td>
|
||||
<td>
|
||||
<code>${maven.build.dir}/docs/</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%">maven.gen.docs</td>
|
||||
<td>The directory for generated xdocs used to create the pdf document.</td>
|
||||
<td width="10%">Yes</td>
|
||||
<td>
|
||||
<code>${maven.build.dir}/generated-xdocs/</code>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%">maven.pdf.pdfName</td>
|
||||
<td>The name of the generated pdf file.</td>
|
||||
<td width="10%">Yes</td>
|
||||
<td>
|
||||
<code>${pom.artifactId}.pdf</code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</subsection>
|
||||
<subsection name="Technical parameters">
|
||||
<table>
|
||||
<tr>
|
||||
<th width="25%">Property name</th>
|
||||
<th>Description</th>
|
||||
<th width="10%">Optional?</th>
|
||||
<th>Default value</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%">maven.pdf.debug</td>
|
||||
<td>Debug the pdf generation process.</td>
|
||||
<td width="10%">Yes</td>
|
||||
<td>
|
||||
<code>false</code>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</subsection>
|
||||
</section>
|
||||
</body>
|
||||
</document>
|
||||
|
||||
Reference in New Issue
Block a user