[cvs] example commit by mtraum: changelog fo xsl
JCorporate Ltd
jcorp at jcorporate.com
Tue Mar 22 15:41:28 UTC 2005
Log Message:
-----------
changelog fo xsl
Added Files:
-----------
example/weblog/src/expresso/components/weblog/doc:
ChangeLog_fo.xsl
Revision Data
-------------
--- /dev/null
+++ weblog/src/expresso/components/weblog/doc/ChangeLog_fo.xsl
@@ -0,0 +1,1148 @@
+<?xml version="1.0"?>
+<xsl:stylesheet
+ version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ xmlns:fox="http://xml.apache.org/fop/extensions"
+ xmlns:str="http://exslt.org/strings"
+ extension-element-prefixes="str">
+
+
+ <!-- ============================================
+ This variable sets the size of the page. If
+ it's 'ltr', we an 8.5 x 11 inch page; otherwise,
+ we use an A4-sized page. 'ltr' is the default.
+ To change the value, you can make the following
+ line read select="'A4'", or you can check the
+ documentation for your XSLT processor to see
+ how to set variables externally to the style
+ sheet. (For Xalan, add "-PARAM page-size a4"
+ to the command.)
+ =============================================== -->
+
+ <xsl:variable name="page-size" select="'ltr'"/>
+
+ <xsl:template match="/">
+
+ <!-- ============================================
+ Because character entities aren't built into
+ the XSL-FO vocabulary, they're included here.
+ =============================================== -->
+
+ <xsl:text disable-output-escaping="yes">
+<!DOCTYPE fo:root [
+ <!ENTITY tilde "&#126;">
+ <!ENTITY florin "&#131;">
+ <!ENTITY elip "&#133;">
+ <!ENTITY dag "&#134;">
+ <!ENTITY ddag "&#135;">
+ <!ENTITY cflex "&#136;">
+ <!ENTITY permil "&#137;">
+ <!ENTITY uscore "&#138;">
+ <!ENTITY OElig "&#140;">
+ <!ENTITY lsquo "&#145;">
+ <!ENTITY rsquo "&#146;">
+ <!ENTITY ldquo "&#147;">
+ <!ENTITY rdquo "&#148;">
+ <!ENTITY bullet "&#149;">
+ <!ENTITY endash "&#150;">
+ <!ENTITY emdash "&#151;">
+ <!ENTITY trade "&#153;">
+ <!ENTITY oelig "&#156;">
+ <!ENTITY Yuml "&#159;">
+
+ <!ENTITY nbsp "&#160;">
+ <!ENTITY iexcl "&#161;">
+ <!ENTITY cent "&#162;">
+ <!ENTITY pound "&#163;">
+ <!ENTITY curren "&#164;">
+ <!ENTITY yen "&#165;">
+ <!ENTITY brvbar "&#166;">
+ <!ENTITY sect "&#167;">
+ <!ENTITY uml "&#168;">
+ <!ENTITY copy "&#169;">
+ <!ENTITY ordf "&#170;">
+ <!ENTITY laquo "&#171;">
+ <!ENTITY not "&#172;">
+ <!ENTITY shy "&#173;">
+ <!ENTITY reg "&#174;">
+ <!ENTITY macr "&#175;">
+ <!ENTITY deg "&#176;">
+ <!ENTITY plusmn "&#177;">
+ <!ENTITY sup2 "&#178;">
+ <!ENTITY sup3 "&#179;">
+ <!ENTITY acute "&#180;">
+ <!ENTITY micro "&#181;">
+ <!ENTITY para "&#182;">
+ <!ENTITY middot "&#183;">
+ <!ENTITY cedil "&#184;">
+ <!ENTITY sup1 "&#185;">
+ <!ENTITY ordm "&#186;">
+ <!ENTITY raquo "&#187;">
+ <!ENTITY frac14 "&#188;">
+ <!ENTITY frac12 "&#189;">
+ <!ENTITY frac34 "&#190;">
+ <!ENTITY iquest "&#191;">
+ <!ENTITY Agrave "&#192;">
+ <!ENTITY Aacute "&#193;">
+ <!ENTITY Acirc "&#194;">
+ <!ENTITY Atilde "&#195;">
+ <!ENTITY Auml "&#196;">
+ <!ENTITY Aring "&#197;">
+ <!ENTITY AElig "&#198;">
+ <!ENTITY Ccedil "&#199;">
+ <!ENTITY Egrave "&#200;">
+ <!ENTITY Eacute "&#201;">
+ <!ENTITY Ecirc "&#202;">
+ <!ENTITY Euml "&#203;">
+ <!ENTITY Igrave "&#204;">
+ <!ENTITY Iacute "&#205;">
+ <!ENTITY Icirc "&#206;">
+ <!ENTITY Iuml "&#207;">
+ <!ENTITY ETH "&#208;">
+ <!ENTITY Ntilde "&#209;">
+ <!ENTITY Ograve "&#210;">
+ <!ENTITY Oacute "&#211;">
+ <!ENTITY Ocirc "&#212;">
+ <!ENTITY Otilde "&#213;">
+ <!ENTITY Ouml "&#214;">
+ <!ENTITY times "&#215;">
+ <!ENTITY Oslash "&#216;">
+ <!ENTITY Ugrave "&#217;">
+ <!ENTITY Uacute "&#218;">
+ <!ENTITY Ucirc "&#219;">
+ <!ENTITY Uuml "&#220;">
+ <!ENTITY Yacute "&#221;">
+ <!ENTITY THORN "&#222;">
+ <!ENTITY szlig "&#223;">
+ <!ENTITY agrave "&#224;">
+ <!ENTITY aacute "&#225;">
+ <!ENTITY acirc "&#226;">
+ <!ENTITY atilde "&#227;">
+ <!ENTITY auml "&#228;">
+ <!ENTITY aring "&#229;">
+ <!ENTITY aelig "&#230;">
+ <!ENTITY ccedil "&#231;">
+ <!ENTITY egrave "&#232;">
+ <!ENTITY eacute "&#233;">
+ <!ENTITY ecirc "&#234;">
+ <!ENTITY euml "&#235;">
+ <!ENTITY igrave "&#236;">
+ <!ENTITY iacute "&#237;">
+ <!ENTITY icirc "&#238;">
+ <!ENTITY iuml "&#239;">
+ <!ENTITY eth "&#240;">
+ <!ENTITY ntilde "&#241;">
+ <!ENTITY ograve "&#242;">
+ <!ENTITY oacute "&#243;">
+ <!ENTITY ocirc "&#244;">
+ <!ENTITY otilde "&#245;">
+ <!ENTITY ouml "&#246;">
+ <!ENTITY oslash "&#248;">
+ <!ENTITY ugrave "&#249;">
+ <!ENTITY uacute "&#250;">
+ <!ENTITY ucirc "&#251;">
+ <!ENTITY uuml "&#252;">
+ <!ENTITY yacute "&#253;">
+ <!ENTITY thorn "&#254;">
+ <!ENTITY yuml "&#255;">
+]>
+ </xsl:text>
+
+ <!-- ============================================
+ The XSL-FO section starts here....
+ =============================================== -->
+
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ xmlns:fox="http://xml.apache.org/fop/extensions">
+
+ <!-- ============================================
+ Define the page layouts. There are two sets of
+ three page mastters here; we use one set for
+ letter-sized paper, the other set for A4.
+ =============================================== -->
+
+ <fo:layout-master-set>
+ <xsl:choose>
+ <xsl:when test="$page-size='ltr'">
+ <fo:simple-page-master master-name="first"
+ page-height="11in" page-width="8.5in"
+ margin-right="72pt" margin-left="72pt"
+ margin-bottom="36pt" margin-top="72pt">
+ <fo:region-body margin-bottom="50pt"/>
+ <fo:region-after region-name="ra-right"
+ extent="25pt"/>
+ </fo:simple-page-master>
+
+ <fo:simple-page-master master-name="left"
+ page-height="11in" page-width="8.5in"
+ margin-right="72pt" margin-left="72pt"
+ margin-bottom="36pt" margin-top="36pt">
+ <fo:region-before region-name="rb-left"
+ extent="25pt"/>
+ <fo:region-body margin-top="50pt"
+ margin-bottom="50pt"/>
+ <fo:region-after region-name="ra-left"
+ extent="25pt"/>
+ </fo:simple-page-master>
+
+ <fo:simple-page-master master-name="right"
+ page-height="11in" page-width="8.5in"
+ margin-right="72pt" margin-left="72pt"
+ margin-bottom="36pt" margin-top="36pt">
+ <fo:region-before region-name="rb-right"
+ extent="25pt"/>
+ <fo:region-body margin-top="50pt"
+ margin-bottom="50pt"/>
+ <fo:region-after region-name="ra-right"
+ extent="25pt"/>
+ </fo:simple-page-master>
+ </xsl:when>
+
+ <!-- ============================================
+ Page layouts for A4-sized paper
+ =============================================== -->
+
+ <xsl:otherwise>
+ <fo:simple-page-master master-name="first"
+ page-height="29.7cm" page-width="21cm"
+ margin-right="72pt" margin-left="72pt"
+ margin-bottom="36pt" margin-top="72pt">
+ <fo:region-body margin-top="1.5cm"
+ margin-bottom="1.5cm"/>
+ <fo:region-after region-name="ra-right"
+ extent="1cm"/>
+ </fo:simple-page-master>
+
+ <fo:simple-page-master master-name="left"
+ page-height="29.7cm" page-width="21cm"
+ margin-right="72pt" margin-left="72pt"
+ margin-bottom="36pt" margin-top="36pt">
+ <fo:region-before region-name="rb-left"
+ extent="3cm"/>
+ <fo:region-body margin-top="1.5cm"
+ margin-bottom="1.5cm"/>
+ <fo:region-after region-name="ra-left"
+ extent="1cm"/>
+ </fo:simple-page-master>
+
+ <fo:simple-page-master master-name="right"
+ page-height="29.7cm" page-width="21cm"
+ margin-right="72pt" margin-left="72pt"
+ margin-bottom="36pt" margin-top="36pt">
+ <fo:region-before region-name="rb-right"
+ extent="3cm"/>
+ <fo:region-body margin-top="1.5cm"
+ margin-bottom="1.5cm"/>
+ <fo:region-after region-name="ra-right"
+ extent="1cm"/>
+ </fo:simple-page-master>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <!-- ============================================
+ Now we define how we use the page layouts. One
+ is for the first page, one is for the even-
+ numbered pages, and one is for odd-numbered pages.
+ =============================================== -->
+
+ <fo:page-sequence-master master-name="standard">
+ <fo:repeatable-page-master-alternatives>
+ <fo:conditional-page-master-reference
+ master-reference="first"
+ page-position="first"/>
+ <!--
+ <fo:conditional-page-master-reference
+ master-reference="left"
+ odd-or-even="even"/>
+ -->
+ <fo:conditional-page-master-reference
+ master-reference="right"
+ odd-or-even="even"/>
+ <fo:conditional-page-master-reference
+ master-reference="right"
+ odd-or-even="odd"/>
+ </fo:repeatable-page-master-alternatives>
+ </fo:page-sequence-master>
+
+ </fo:layout-master-set>
+
+ <!-- ============================================
+ Now that we've defined all of the page layouts,
+ we generate the bookmarks for the PDF file.
+ =============================================== -->
+
+ <xsl:call-template name="generate-bookmarks"/>
+
+ <!-- ============================================
+ This is where the actual content of the document
+ starts.
+ =============================================== -->
+
+ <fo:page-sequence master-reference="standard">
+
+ <!-- ============================================
+ We define the static content for the headers
+ and footers of the various page layouts first.
+ =============================================== -->
+
+ <fo:static-content flow-name="rb-right">
+ <fo:block font-size="10pt" text-align-last="end">
+ <fo:table table-layout="fixed">
+ <fo:table-column column-width="396pt"/>
+ <fo:table-column column-width="72pt"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block text-align="start">
+ <xsl:value-of select="/changelog/project/@name"/> Changelog
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block text-align="end" font-weight="bold"
+ font-family="monospace">
+
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:block>
+ </fo:static-content>
+ <fo:static-content flow-name="ra-right">
+ <fo:block font-size="10pt" text-align-last="end">
+ <fo:table table-layout="fixed">
+ <fo:table-column column-width="396pt"/>
+ <fo:table-column column-width="72pt"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block text-align="start">
+ Copyright © Jcorporate Ltd.
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block text-align="end">Page
+ <fo:page-number/> of
+ <fo:page-number-citation
+ ref-id="TheVeryLastPage"/>
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:block>
+ </fo:static-content>
+ <fo:static-content flow-name="rb-left">
+ <fo:block font-size="10pt" text-align-last="end">
+ <fo:table table-layout="fixed">
+ <fo:table-column column-width="72pt"/>
+ <fo:table-column column-width="396pt"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block text-align="start" font-weight="bold"
+ font-family="monospace">
+
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block text-align="end">
+ <xsl:value-of select="/changelog/project/@name"/> Changelog
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:block>
+ </fo:static-content>
+ <fo:static-content flow-name="ra-left">
+ <fo:block font-size="10pt" text-align-last="end">
+ <fo:table table-layout="fixed">
+ <fo:table-column column-width="72pt"/>
+ <fo:table-column column-width="396pt"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block text-align="start">Page
+ <fo:page-number/>
+ of <fo:page-number-citation
+ ref-id="TheVeryLastPage"/>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block text-align="end">
+ Copyright © Jcorporate Ltd.
+ </fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>
+ </fo:block>
+ </fo:static-content>
+
+
+
+ <!-- ============================================
+ The dynamic data
+ =============================================== -->
+
+ <fo:flow flow-name="xsl-region-body">
+
+ <fo:block space-after="18pt" line-height="27pt"
+ font-size="24pt" font-weight="bold" text-align="center">
+ <xsl:value-of select="/changelog/project/@name"/> Changelog
+ </fo:block>
+
+ <xsl:call-template name="toc"/>
+
+ <xsl:for-each select="/changelog/project">
+ <xsl:for-each select="version">
+ <fo:block space-after="10pt" break-before="page">
+ <xsl:attribute name="id">
+ <xsl:value-of select="generate-id(.)"/>
+ </xsl:attribute>
+ <fo:block font-size="18pt" font-weight="bold">
+ Version: <xsl:value-of select="@name"/> Released: <xsl:value-of select="@releaseDate"/>
+ </fo:block>
+ <fo:block font-size="12pt" space-after="20pt">
+ <xsl:value-of select="comment"/>
+ </fo:block>
+
+ <xsl:apply-templates select="."/>
+
+ </fo:block>
+ </xsl:for-each>
+ </xsl:for-each>
+
+ <!-- ============================================
+ We put an ID at the end of the document so we
+ can do "Page x of y" numbering.
+ =============================================== -->
+ <fo:block id="TheVeryLastPage" font-size="0pt"
+ line-height="0pt" space-after="0pt"/>
+
+ </fo:flow>
+ </fo:page-sequence>
+</fo:root>
+</xsl:template>
+
+
+
+<xsl:template match="version">
+ <xsl:if test="api-change">
+ <fo:block space-after="20pt">
+ <fo:block font-size="12pt" font-weight="bold" >
+ <xsl:attribute name="id">
+ <xsl:value-of select="generate-id(api-change)"/>
+ </xsl:attribute>
+ Changed APIs
+ </fo:block>
+ <fo:block font-size="10pt" color="red" space-after="5pt">
+ The following are important changes that have happened in the framework that may require you to rewrite some of your code to fit the new API.
+ </fo:block>
+ <fo:list-block provisional-distance-between-starts="1cm" provisional-label-separation="0.5cm">
+ <xsl:apply-templates select="api-change"/>
+ </fo:list-block>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="schema-changes">
+ <fo:block space-after="20pt">
+ <fo:block font-size="12pt" font-weight="bold" >
+ <xsl:attribute name="id">
+ <xsl:value-of select="generate-id(schema-changes)"/>
+ </xsl:attribute>
+ Schema Changes
+ </fo:block>
+ <fo:block font-size="10pt" color="red" space-after="5pt">
+ The following are important changes that have happened in Database Schema. You will have to issue alter table statements to your database before this version can be used. Added tables can simply be run with DBCreate
+ </fo:block>
+ <xsl:apply-templates select="schema-changes"/>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="new-feature">
+ <fo:block space-after="20pt">
+ <fo:block font-size="12pt" font-weight="bold" >
+ <xsl:attribute name="id">
+ <xsl:value-of select="generate-id(new-feature)"/>
+ </xsl:attribute>
+ New Features
+ </fo:block>
+ <fo:block font-size="10pt" space-after="5pt">
+ The following are new features added to this version:
+ </fo:block>
+ <fo:list-block provisional-distance-between-starts="1cm" provisional-label-separation="0.5cm">
+ <xsl:apply-templates select="new-feature"/>
+ </fo:list-block>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="bug-fix">
+ <fo:block space-after="20pt">
+ <fo:block font-size="12pt" font-weight="bold" >
+ <xsl:attribute name="id">
+ <xsl:value-of select="generate-id(bug-fix)"/>
+ </xsl:attribute>
+ Bugs Fixed
+ </fo:block>
+ <fo:block font-size="10pt" space-after="5pt">
+ The following are bugs fixed in this version:
+ </fo:block>
+ <fo:list-block provisional-distance-between-starts="1cm" provisional-label-separation="0.5cm">
+ <xsl:apply-templates select="bug-fix"/>
+ </fo:list-block>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="performance-improvement">
+ <fo:block space-after="20pt">
+ <fo:block font-size="12pt" font-weight="bold" >
+ <xsl:attribute name="id">
+ <xsl:value-of select="generate-id(performance-improvement)"/>
+ </xsl:attribute>
+ Performance Enhancements
+ </fo:block>
+ <fo:block font-size="10pt" space-after="5pt">
+ The following performance enhancements that have been coded since the last version:
+ </fo:block>
+ <fo:list-block provisional-distance-between-starts="1cm" provisional-label-separation="0.5cm">
+ <xsl:apply-templates select="performance-improvement"/>
+ </fo:list-block>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="changed-feature">
+ <fo:block space-after="20pt">
+ <fo:block font-size="12pt" font-weight="bold" >
+ <xsl:attribute name="id">
+ <xsl:value-of select="generate-id(changed-feature)"/>
+ </xsl:attribute>
+ Changed Features
+ </fo:block>
+ <fo:block font-size="10pt" space-after="5pt">
+ The following are feature changes since the last release:
+ </fo:block>
+ <fo:list-block provisional-distance-between-starts="1cm" provisional-label-separation="0.5cm">
+ <xsl:apply-templates select="changed-feature"/>
+ </fo:list-block>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="misc-change">
+ <fo:block space-after="20pt">
+ <fo:block font-size="12pt" font-weight="bold">
+ <xsl:attribute name="id">
+ <xsl:value-of select="generate-id(misc-change)"/>
+ </xsl:attribute>
+ Miscellaneous Changes
+ </fo:block>
+ <fo:block font-size="10pt" space-after="5pt">
+ The following are miscellaneous changes:
+ </fo:block>
+ <fo:list-block provisional-distance-between-starts="1cm" provisional-label-separation="0.5cm">
+ <xsl:apply-templates select="misc-change"/>
+ </fo:list-block>
+ </fo:block>
+ </xsl:if>
+ <xsl:if test="package-changes">
+ <fo:block space-after="20pt">
+ <fo:block font-size="12pt" font-weight="bold">
+ <xsl:attribute name="id">
+ <xsl:value-of select="generate-id(package-changes)"/>
+ </xsl:attribute>
+ Package Updates
+ </fo:block>
+ <fo:block font-size="10pt" space-after="5pt">
+ The following packages have been updated with this release:
+ </fo:block>
+ <fo:table table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(1)"/>
+ <fo:table-column column-width="proportional-column-width(1)"/>
+ <fo:table-header>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block font-weight="bold">Package Name</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block font-weight="bold">Updated Version</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <xsl:apply-templates select="package-changes"/>
+ </fo:table>
+ </fo:block>
+ </xsl:if>
+
+</xsl:template>
+
+ <xsl:template match="api-change">
+ <fo:list-item space-after="3pt">
+ <fo:list-item-label end-indent="label-end()">
+ <fo:block>•</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body start-indent="body-start()">
+ <fo:block font-weight="bold">
+ <xsl:value-of select="@title"/>
+ </fo:block>
+ <fo:block>
+ <xsl:value-of select="explanation"/>
+ </fo:block>
+ <xsl:apply-templates select="experimental"/>
+ <xsl:apply-templates select="contributor"/>
+ </fo:list-item-body>
+ </fo:list-item>
+ </xsl:template>
+
+ <xsl:template match="new-feature">
+ <fo:list-item space-after="3pt">
+ <fo:list-item-label end-indent="label-end()">
+ <fo:block>•</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body start-indent="body-start()">
+ <fo:block font-weight="bold">
+ <xsl:value-of select="@title"/>
+ </fo:block>
+ <fo:block>
+ <xsl:value-of select="explanation"/>
+ </fo:block>
+ <xsl:apply-templates select="experimental"/>
+ <xsl:apply-templates select="contributor"/>
+ </fo:list-item-body>
+ </fo:list-item>
+ </xsl:template>
+
+ <xsl:template match="bug-fix">
+ <fo:list-item space-after="3pt">
+ <fo:list-item-label end-indent="label-end()">
+ <fo:block>•</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body start-indent="body-start()">
+ <fo:block font-weight="bold">
+ <xsl:value-of select="@title"/>
+ </fo:block>
+ <fo:block>
+ <xsl:value-of select="explanation"/>
+ </fo:block>
+ <xsl:apply-templates select="experimental"/>
+ <xsl:apply-templates select="contributor"/>
+ </fo:list-item-body>
+ </fo:list-item>
+ </xsl:template>
+
+ <xsl:template match="performance-improvement">
+ <fo:list-item space-after="3pt">
+ <fo:list-item-label end-indent="label-end()">
+ <fo:block>•</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body start-indent="body-start()">
+ <fo:block font-weight="bold">
+ <xsl:value-of select="@title"/>
+ </fo:block>
+ <fo:block>
+ <xsl:value-of select="explanation"/>
+ </fo:block>
+ <xsl:apply-templates select="experimental"/>
+ <xsl:apply-templates select="contributor"/>
+ </fo:list-item-body>
+ </fo:list-item>
+ </xsl:template>
+
+ <xsl:template match="changed-feature">
+ <fo:list-item space-after="3pt">
+ <fo:list-item-label end-indent="label-end()">
+ <fo:block>•</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body start-indent="body-start()">
+ <fo:block font-weight="bold">
+ <xsl:value-of select="@title"/>
+ </fo:block>
+ <fo:block>
+ <xsl:value-of select="explanation"/>
+ </fo:block>
+ <xsl:apply-templates select="experimental"/>
+ <xsl:apply-templates select="contributor"/>
+ </fo:list-item-body>
+ </fo:list-item>
+ </xsl:template>
+
+ <xsl:template match="misc-change">
+ <fo:list-item space-after="3pt">
+ <fo:list-item-label end-indent="label-end()">
+ <fo:block>•</fo:block>
+ </fo:list-item-label>
+ <fo:list-item-body start-indent="body-start()">
+ <fo:block font-weight="bold">
+ <xsl:value-of select="@title"/>
+ </fo:block>
+ <fo:block>
+ <xsl:value-of select="explanation"/>
+ </fo:block>
+ <xsl:apply-templates select="experimental"/>
+ <xsl:apply-templates select="contributor"/>
+
+ </fo:list-item-body>
+ </fo:list-item>
+ </xsl:template>
+
+ <xsl:template match="package-changes">
+ <fo:table-body>
+ <xsl:for-each select="package-update">
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block><xsl:value-of select="@package-name"/></fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block><xsl:value-of select="@version-number"/></fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </xsl:for-each>
+ </fo:table-body>
+ </xsl:template>
+
+ <xsl:template match="schema-changes">
+<!-- <fo:table-and-caption>-->
+<!-- <fo:table-caption>New Tables</fo:table-caption>-->
+ <fo:block font-style="italic" text-align="center">New Tables</fo:block>
+ <fo:table table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(1)"/>
+ <fo:table-column column-width="proportional-column-width(1)"/>
+ <fo:table-column column-width="proportional-column-width(1)"/>
+ <fo:table-column column-width="proportional-column-width(1)"/>
+ <fo:table-header>
+
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block font-weight="bold">Table Name</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block font-weight="bold">Class Name</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block font-weight="bold">Explanation</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block font-weight="bold">Contributor</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+
+ <fo:table-body>
+ <xsl:for-each select="new-table">
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block><xsl:value-of select="@name"/></fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>
+ <xsl:call-template name="class-wrapper">
+ <xsl:with-param name="str" select="@class"/>
+ </xsl:call-template>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block><xsl:value-of select="explanation"/></fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block><xsl:value-of select="contributor"/></fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </xsl:for-each>
+ </fo:table-body>
+ </fo:table>
+<!-- </fo:table-and-caption>-->
+
+<!-- <fo:table-and-caption>-->
+<!-- <fo:table-caption>Modified Tables</fo:table-caption>-->
+ <fo:block font-style="italic" text-align="center">Modified Tables</fo:block>
+ <fo:table table-layout="fixed" width="100%">
+ <fo:table-column column-width="proportional-column-width(1)"/>
+ <fo:table-column column-width="proportional-column-width(1)"/>
+ <fo:table-column column-width="proportional-column-width(1)"/>
+ <fo:table-column column-width="proportional-column-width(1)"/>
+ <fo:table-column column-width="proportional-column-width(1)"/>
+ <fo:table-column column-width="proportional-column-width(1)"/>
+ <fo:table-header>
+
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block font-weight="bold">Table Name</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block font-weight="bold">Class Name</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block font-weight="bold">Changed Field</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block font-weight="bold">New Definition</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block font-weight="bold">Explanation</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block font-weight="bold">Contributor</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-header>
+ <fo:table-body>
+ <xsl:for-each select="changed-table">
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block><xsl:value-of select="@name"/></fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>
+ <xsl:call-template name="class-wrapper">
+ <xsl:with-param name="str" select="@class"/>
+ </xsl:call-template>
+ </fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block><xsl:value-of select="newField"/></fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block><xsl:value-of select="definition"/></fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block><xsl:value-of select="explanation"/></fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <fo:block>contributor</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </xsl:for-each>
+ </fo:table-body>
+ </fo:table>
+<!-- </fo:table-and-caption>-->
+ </xsl:template>
+
+
+ <xsl:template match="experimental">
+ <fo:block font-style="italic" color="red">
+ Experimental
+ </fo:block>
+ </xsl:template>
+
+ <xsl:template match="contributor">
+ <fo:block font-style="italic">
+ Contributed By: <xsl:value-of select="."/>
+ </fo:block>
+ </xsl:template>
+
+
+ <!-- ============================================
+ This template creates the table of contents.
+ =============================================== -->
+
+ <xsl:template name="toc">
+ <fo:block space-after="30pt">
+ <fo:block space-after="12pt" id="TableOfContents"
+ line-height="21pt" font-size="18pt" text-align="start">
+ Table of Contents
+ </fo:block>
+ <xsl:for-each select="/changelog/project">
+ <xsl:for-each select="version">
+ <fo:block text-align-last="justify" line-height="17pt"
+ font-size="14pt" space-after="3pt" text-align="start"
+ text-indent="-1cm">
+ <xsl:attribute name="start-indent">
+ <xsl:text>1cm</xsl:text>
+ </xsl:attribute>
+ <fo:basic-link color="blue">
+ <xsl:attribute name="internal-destination">
+ <xsl:value-of select="generate-id()"/>
+ </xsl:attribute>
+ Version <xsl:value-of select="@name"/>
+ </fo:basic-link>
+ <fo:leader leader-pattern="dots"
+ leader-pattern-width="5pt"/>
+ <fo:page-number-citation>
+ <xsl:attribute name="ref-id">
+ <xsl:value-of select="generate-id()"/>
+ </xsl:attribute>
+ </fo:page-number-citation>
+ </fo:block>
+
+ <xsl:if test="api-change">
+ <fo:block text-align-last="justify" line-height="17pt"
+ font-size="12pt" space-after="3pt" text-align="start"
+ text-indent="-1cm">
+ <xsl:attribute name="start-indent">
+ <xsl:text>1.5cm</xsl:text>
+ </xsl:attribute>
+ <fo:basic-link color="blue">
+ <xsl:attribute name="internal-destination">
+ <xsl:value-of select="generate-id(api-change)"/>
+ </xsl:attribute>
+ API Changes
+ </fo:basic-link>
+ <fo:leader leader-pattern="dots" leader-pattern-width="5pt"/>
+ <fo:page-number-citation>
+ <xsl:attribute name="ref-id">
+ <xsl:value-of select="generate-id(api-change)"/>
+ </xsl:attribute>
+ </fo:page-number-citation>
+ </fo:block>
+ </xsl:if>
+
+ <xsl:if test="schema-changes">
+ <fo:block text-align-last="justify" line-height="17pt"
+ font-size="12pt" space-after="3pt" text-align="start"
+ text-indent="-1cm">
+ <xsl:attribute name="start-indent">
+ <xsl:text>1.5cm</xsl:text>
+ </xsl:attribute>
+ <fo:basic-link color="blue">
+ <xsl:attribute name="internal-destination">
+ <xsl:value-of select="generate-id(schema-changes)"/>
+ </xsl:attribute>
+ Schema Changes
+ </fo:basic-link>
+ <fo:leader leader-pattern="dots" leader-pattern-width="5pt"/>
+ <fo:page-number-citation>
+ <xsl:attribute name="ref-id">
+ <xsl:value-of select="generate-id(schema-changes)"/>
+ </xsl:attribute>
+ </fo:page-number-citation>
+ </fo:block>
+ </xsl:if>
+
+ <xsl:if test="new-feature">
+ <fo:block text-align-last="justify" line-height="17pt"
+ font-size="12pt" space-after="3pt" text-align="start"
+ text-indent="-1cm">
+ <xsl:attribute name="start-indent">
+ <xsl:text>1.5cm</xsl:text>
+ </xsl:attribute>
+ <fo:basic-link color="blue">
+ <xsl:attribute name="internal-destination">
+ <xsl:value-of select="generate-id(new-feature)"/>
+ </xsl:attribute>
+ New Features
+ </fo:basic-link>
+ <fo:leader leader-pattern="dots" leader-pattern-width="5pt"/>
+ <fo:page-number-citation>
+ <xsl:attribute name="ref-id">
+ <xsl:value-of select="generate-id(new-feature)"/>
+ </xsl:attribute>
+ </fo:page-number-citation>
+ </fo:block>
+ </xsl:if>
+
+ <xsl:if test="bug-fix">
+ <fo:block text-align-last="justify" line-height="17pt"
+ font-size="12pt" space-after="3pt" text-align="start"
+ text-indent="-1cm">
+ <xsl:attribute name="start-indent">
+ <xsl:text>1.5cm</xsl:text>
+ </xsl:attribute>
+ <fo:basic-link color="blue">
+ <xsl:attribute name="internal-destination">
+ <xsl:value-of select="generate-id(bug-fix)"/>
+ </xsl:attribute>
+ Bugs Fixed
+ </fo:basic-link>
+ <fo:leader leader-pattern="dots" leader-pattern-width="5pt"/>
+ <fo:page-number-citation>
+ <xsl:attribute name="ref-id">
+ <xsl:value-of select="generate-id(bug-fix)"/>
+ </xsl:attribute>
+ </fo:page-number-citation>
+ </fo:block>
+ </xsl:if>
+
+ <xsl:if test="performance-improvement">
+ <fo:block text-align-last="justify" line-height="17pt"
+ font-size="12pt" space-after="3pt" text-align="start"
+ text-indent="-1cm">
+ <xsl:attribute name="start-indent">
+ <xsl:text>1.5cm</xsl:text>
+ </xsl:attribute>
+ <fo:basic-link color="blue">
+ <xsl:attribute name="internal-destination">
+ <xsl:value-of select="generate-id(performance-improvement)"/>
+ </xsl:attribute>
+ Performance Improvements
+ </fo:basic-link>
+ <fo:leader leader-pattern="dots" leader-pattern-width="5pt"/>
+ <fo:page-number-citation>
+ <xsl:attribute name="ref-id">
+ <xsl:value-of select="generate-id(performance-improvement)"/>
+ </xsl:attribute>
+ </fo:page-number-citation>
+ </fo:block>
+ </xsl:if>
+
+ <xsl:if test="changed-feature">
+ <fo:block text-align-last="justify" line-height="17pt"
+ font-size="12pt" space-after="3pt" text-align="start"
+ text-indent="-1cm">
+ <xsl:attribute name="start-indent">
+ <xsl:text>1.5cm</xsl:text>
+ </xsl:attribute>
+ <fo:basic-link color="blue">
+ <xsl:attribute name="internal-destination">
+ <xsl:value-of select="generate-id(changed-feature)"/>
+ </xsl:attribute>
+ Changed Features
+ </fo:basic-link>
+ <fo:leader leader-pattern="dots" leader-pattern-width="5pt"/>
+ <fo:page-number-citation>
+ <xsl:attribute name="ref-id">
+ <xsl:value-of select="generate-id(changed-feature)"/>
+ </xsl:attribute>
+ </fo:page-number-citation>
+ </fo:block>
+ </xsl:if>
+
+ <xsl:if test="misc-change">
+ <fo:block text-align-last="justify" line-height="17pt"
+ font-size="12pt" space-after="3pt" text-align="start"
+ text-indent="-1cm">
+ <xsl:attribute name="start-indent">
+ <xsl:text>1.5cm</xsl:text>
+ </xsl:attribute>
+ <fo:basic-link color="blue">
+ <xsl:attribute name="internal-destination">
+ <xsl:value-of select="generate-id(misc-change)"/>
+ </xsl:attribute>
+ Miscellaneous Changes
+ </fo:basic-link>
+ <fo:leader leader-pattern="dots" leader-pattern-width="5pt"/>
+ <fo:page-number-citation>
+ <xsl:attribute name="ref-id">
+ <xsl:value-of select="generate-id(misc-change)"/>
+ </xsl:attribute>
+ </fo:page-number-citation>
+ </fo:block>
+ </xsl:if>
+
+ <xsl:if test="package-changes">
+ <fo:block text-align-last="justify" line-height="17pt"
+ font-size="12pt" space-after="3pt" text-align="start"
+ text-indent="-1cm">
+ <xsl:attribute name="start-indent">
+ <xsl:text>1.5cm</xsl:text>
+ </xsl:attribute>
+ <fo:basic-link color="blue">
+ <xsl:attribute name="internal-destination">
+ <xsl:value-of select="generate-id(package-changes)"/>
+ </xsl:attribute>
+ Package Changes
+ </fo:basic-link>
+ <fo:leader leader-pattern="dots" leader-pattern-width="5pt"/>
+ <fo:page-number-citation>
+ <xsl:attribute name="ref-id">
+ <xsl:value-of select="generate-id(package-changes)"/>
+ </xsl:attribute>
+ </fo:page-number-citation>
+ </fo:block>
+ </xsl:if>
+
+ </xsl:for-each>
+ </xsl:for-each>
+ </fo:block>
+ </xsl:template>
+
+
+ <!-- ============================================
+ This template creates the PDF bookmarks
+ supported by FOP.
+ =============================================== -->
+
+ <xsl:template name="generate-bookmarks">
+ <fox:outline internal-destination="TableOfContents">
+ <fox:label>Table of Contents</fox:label>
+ </fox:outline>
+ <xsl:for-each select="/changelog/project/version">
+ <xsl:variable name="current-version" select="generate-id()"/>
+ <fox:outline>
+ <xsl:attribute name="internal-destination">
+ <xsl:value-of select="generate-id()"/>
+ </xsl:attribute>
+ <fox:label>Version <xsl:value-of select="@name"/></fox:label>
+
+ <xsl:if test="api-change">
+ <fox:outline>
+ <xsl:attribute name="internal-destination">
+ <xsl:value-of select="generate-id(api-change)"/>
+ </xsl:attribute>
+ <fox:label>API Changes</fox:label>
+ </fox:outline>
+ </xsl:if>
+ <xsl:if test="schema-changes">
+ <fox:outline>
+ <xsl:attribute name="internal-destination">
+ <xsl:value-of select="generate-id(schema-changes)"/>
+ </xsl:attribute>
+ <fox:label>Schema Changes</fox:label>
+ </fox:outline>
+ </xsl:if>
+ <xsl:if test="new-feature">
+ <fox:outline>
+ <xsl:attribute name="internal-destination">
+ <xsl:value-of select="generate-id(new-feature)"/>
+ </xsl:attribute>
+ <fox:label>New Features</fox:label>
+ </fox:outline>
+ </xsl:if>
+ <xsl:if test="bug-fix">
+ <fox:outline>
+ <xsl:attribute name="internal-destination">
+ <xsl:value-of select="generate-id(bug-fix)"/>
+ </xsl:attribute>
+ <fox:label>Bugs Fixed</fox:label>
+ </fox:outline>
+ </xsl:if>
+ <xsl:if test="performance-improvement">
+ <fox:outline>
+ <xsl:attribute name="internal-destination">
+ <xsl:value-of select="generate-id(performance-improvement)"/>
+ </xsl:attribute>
+ <fox:label>Performance Improvements</fox:label>
+ </fox:outline>
+ </xsl:if>
+ <xsl:if test="changed-feature">
+ <fox:outline>
+ <xsl:attribute name="internal-destination">
+ <xsl:value-of select="generate-id(changed-feature)"/>
+ </xsl:attribute>
+ <fox:label>Changed Features</fox:label>
+ </fox:outline>
+ </xsl:if>
+ <xsl:if test="misc-change">
+ <fox:outline>
+ <xsl:attribute name="internal-destination">
+ <xsl:value-of select="generate-id(misc-change)"/>
+ </xsl:attribute>
+ <fox:label>Miscellaneous Changes</fox:label>
+ </fox:outline>
+ </xsl:if>
+ <xsl:if test="package-changes">
+ <fox:outline>
+ <xsl:attribute name="internal-destination">
+ <xsl:value-of select="generate-id(package-changes)"/>
+ </xsl:attribute>
+ <fox:label>Package Changes</fox:label>
+ </fox:outline>
+ </xsl:if>
+ </fox:outline>
+ </xsl:for-each>
+ </xsl:template>
+
+ <!-- ============================================
+ This template will insert a zero length space after "."
+ in strings to allow for wrapping (useful for long class
+ names)
+ =============================================== -->
+ <xsl:template name="class-wrapper">
+ <xsl:param name="str"/>
+ <xsl:if test="string-length($str) > 0">
+ <xsl:variable name="tok" select="str:tokenize($str, '.')"/>
+ <xsl:for-each select="$tok">
+ <xsl:value-of select="."/>
+ <xsl:if test="position() != last()">
+ <xsl:text>.</xsl:text>
+ <xsl:text> </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:if>
+ </xsl:template>
+
+</xsl:stylesheet>
More information about the cvs
mailing list