See below. The key is how you set up your page layout.
<data>
<p rev="1">text with revbar</p>
<note>
<p>text in a note No revbar</p>
<p rev="1">text in a note with revbar</p>
</note>
<p>no rev bar</p>
</data>
xslt:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:r="http://nwalsh.com/xmlns/extreme2006/recipes/"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
<xsl:template match="data">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="A4"
page-height="11in"
page-width="8.5in" margin-top="0.5in" margin-left="0.5in"
margin-right="1.0in">
<fo:region-body
region-name="xsl-region-body" margin-top=".6in"
margin-bottom="1in" overflow="auto"/>
<fo:region-before
region-name="xsl-region-before" extent="1in"/>
<fo:region-after
region-name="xsl-region-after-last-even"
extent="0.75in"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="A4">
<fo:flow flow-name="xsl-region-body">
<xsl:apply-templates/>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="p">
<fo:block>
<xsl:call-template name="rev.bar"/>
<xsl:attribute name="margin-top">5px</xsl:attribute>
<xsl:attribute name="margin-bottom">5px</xsl:attribute>
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<xsl:template match="note">
<fo:block>
<xsl:attribute name="text-align">center</xsl:attribute>
<xsl:attribute name="font-size">10pt</xsl:attribute>
<xsl:attribute name="font-weight">bold</xsl:attribute>
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<xsl:template name="rev.bar">
<xsl:if test="@rev">
<xsl:attribute
name="border-start-color">black</xsl:attribute>
<xsl:attribute
name="border-start-style">solid</xsl:attribute>
<xsl:attribute name="padding-start">13pt</xsl:attribute>
<xsl:attribute
name="border-start-width">2pt</xsl:attribute>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
--
View this message in context:
http://apache-fop.1065347.n5.nabble.com/Implementing-Change-bars-tp16058p38762.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]