press-release/tools fdp-pr.xsl,NONE,1.1 Makefile,1.2,1.3
Tommy Reynolds (jtr)
fedora-docs-commits at redhat.com
Sun Aug 13 19:25:55 UTC 2006
Author: jtr
Update of /cvs/docs/press-release/tools
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14538/tools
Modified Files:
Makefile
Added Files:
fdp-pr.xsl
Log Message:
Open for business
--- NEW FILE fdp-pr.xsl ---
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:date="http://exslt.org/dates-and-times"
extension-element-prefixes="date">
<xsl:output encoding="UTF-8" indent="yes" media-type="letter" omit-xml-declaration="no" standalone="no"/>
<xsl:param name="lang">en_US</xsl:param>
<xsl:param name="today">2006-02-06</xsl:param>
<xsl:param name="fonts">Verdana, Courier, Helvetica, Sans, Serif</xsl:param>
<xsl:param name="font.size.header">12pt</xsl:param>
<xsl:param name="font.size.body">12pt</xsl:param>
<xsl:param name="font.size.footer">12pt</xsl:param>
<xsl:param name="indent.para">0em</xsl:param>
<xsl:param name="indent.list">2em</xsl:param>
<xsl:template match="/">
<xsl:element name="fo:root">
<xsl:attribute name="xmlns:fo">
http://www.w3.org/1999/XSL/Format
</xsl:attribute>
<xsl:attribute name="language">
<xsl:value-of select="$lang"/>
</xsl:attribute>
<fo:layout-master-set>
<fo:simple-page-master master-name="Letter" margin-bottom="0.3in" margin-left="0.3in" margin-right="0.3in" margin-top="0.6in" page-height="11in" page-width="8.5in">
<fo:region-body margin-bottom="1.5in" margin-left="0.6in" margin-right="0.6in" margin-top="0.5in"/>
<fo:region-before extent="1.5in"/>
<fo:region-after extent="0.75in"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="PressRelease">
<fo:repeatable-page-master-reference master-reference="Letter"/>
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="PressRelease">
<fo:static-content flow-name="xsl-region-before" font-family="{$fonts}" font-size="{$font.size.header}" margin-left="0.3in" margin-right="1in">
<fo:table border-collapse="separate" table-layout="fixed" width="100%">
<fo:table-column column-number="1" column-width="50%"/>
<fo:table-column column-number="2" column-width="50%"/>
<fo:table-body>
<!-- Header Line #1 -->
<fo:table-row>
<fo:table-cell text-align="left">
<fo:block>
<xsl:value-of select="/fdp-pr/@embargo"/>
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="right">
<fo:block>
<xsl:value-of select="/fdp-pr/@org"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<!-- Header Line #2 -->
<fo:table-row>
<fo:table-cell text-align="left">
<fo:block>
<xsl:value-of select="/fdp-pr/@spare"/>
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="right">
<fo:block>
<xsl:value-of select="/fdp-pr/@kind"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:static-content>
<fo:static-content flow-name="xsl-region-after" font-family="{$fonts}" font-size="{$font.size.footer}" margin-left="0.3in" margin-right="1in">
<fo:table border-collapse="separate" table-layout="fixed" width="100%">
<fo:table-column column-number="1" column-width="40%"/>
<fo:table-column column-number="2" column-width="60%"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell text-align="left">
<fo:block>
<fo:page-number/>
<xsl:text>/</xsl:text>
<fo:page-number-citation ref-id="EOF"/>
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="center">
<fo:block>
<xsl:value-of select="$today"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:static-content>
<fo:flow flow-name="xsl-region-body" font-family="{$fonts}" font-size="{$font.size.body}">
<xsl:apply-templates select="*" />
<fo:block id="EOF" space-before="2.00em" text-align="center">
<xsl:value-of select="/fdp-pr/@end"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</xsl:element>
</xsl:template>
<xsl:template match="source">
<!-- Dummy template until I figure out what this element should do --></xsl:template>
<xsl:template match="header">
<fo:block font-weight="bold" keep-with-next="always" space-after="0.25em" space-before="1.0em">
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<xsl:template match="para">
<fo:block keep-together="always" margin-left="{$indent.para}" space-before="1.25em">
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<xsl:template match="dateline">
<xsl:variable name="when">
<xsl:value-of select="date"/>
</xsl:variable>
<fo:inline font-weight="bold">
<xsl:value-of select="location"/>
<xsl:text>; </xsl:text>
<xsl:value-of select="concat( date:day-in-month($when), ' ', date:month-name($when), ' ', date:year($when))"/>
<xsl:text>. </xsl:text>
</fo:inline>
</xsl:template>
<xsl:template match="ulink">
<fo:inline font-weight="bold">
<xsl:value-of select="@url"/>
</fo:inline>
</xsl:template>
<xsl:template match="list">
<xsl:variable name="mark">
<xsl:choose>
<xsl:when test="@mark = "dot"">
<xsl:text>•</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>*</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<fo:list-block margin-left="{$indent.list}" provisional-distance-between-starts="18pt" provisional-label-separation="6pt" space-before="0.5em">
<xsl:for-each select="item">
<fo:list-item space-before="1.25em">
<fo:list-item-label end-indent="label-end()">
<fo:block>
<xsl:value-of select="$mark"/>
</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>
<xsl:apply-templates/>
</fo:block>
</fo:list-item-body>
</fo:list-item>
</xsl:for-each>
</fo:list-block>
</xsl:template>
</xsl:stylesheet>
Index: Makefile
===================================================================
RCS file: /cvs/docs/press-release/tools/Makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Makefile 13 Aug 2006 18:51:44 -0000 1.2
+++ Makefile 13 Aug 2006 19:25:53 -0000 1.3
@@ -1,4 +1,9 @@
########################################################################
+# The ${TOOLS} symbol gives the path to the press-release/tools dir
+# from the document's working directory point of view. You can use an
+# absolute path if you like...
+# TOOLS=../../tools
+########################################################################
# The ${DOC_BASE} symbol provides the basic name for this document.
# DOC_BASE=fdp-pr
########################################################################
@@ -122,6 +127,9 @@
${DOC_BASE}.pot:: ${DOC_BASE}-${PRI_LANG}.xml
xml2po -o $@ $<
+clean::
+ ${RM} .xml2po.po
+
help::
@printf "${HFMT}" "${DOC_BASE}.pot" "Generate .POT file for translation"
########################################################################
@@ -192,5 +200,10 @@
${RM} *.pdf
${RM} *.txt
########################################################################
+showvars::
+ @echo "DOC_BASE=${DOC_BASE}"
+ @echo "PRI_LANG=${PRI_LANG}"
+ @echo "OTHERS=${OTHERS}"
+########################################################################
# End of Makefile
########################################################################
More information about the Fedora-docs-commits
mailing list