Trevor,
what you're looking for is fo:float, but as you can see here:
http://xmlgraphics.apache.org/fop/compliance.html#fo-object-float
this object is not implemented, yet.
As an alternative, you can investigate using fo:block-containers if you
are happy enough to have the version numbers placed on the right side of
the normal text flow.
On 01.03.2011 14:36:27 Trevor Nicholls wrote:
> I wonder if the following is do-able; perhaps somebody has been there before
> me?
>
> I have a document schema which includes paragraphs, tables, code fragments,
> notes, various levels of nested sections, etc. Every "block" element carries
> an optional "version" attribute, and this version needs to be presented in
> the right margin of the main document flow.
>
> When my XML is converted to HTML this is achieved with a CSS float, like
> so:
>
> (XML)
> <para version="123">Para text...</para>
>
>
> (XSL)
> <xsl:template match="para">
> <xsl:call-template name="testversion" />
> <p><xsl:apply-templates /></p>
> </xsl:template>
>
> <xsl:template name="testversion">
> <xsl:if test="@version != ''">
> <div class="version-float">
> <xsl:value-of select="@version" />
> </div>
> </xsl:if>
> </xsl:template>
>
>
> (CSS)
> .version-float {
> float: right;
> font-size: 10pt;
> font-weight: normal;
> color: #666;
> background-color: #ffd;
> margin: 0;
> padding: 0 0.2em;
> border-top: 1px solid #ccc;
> border-left: 1px solid #ccc;
> border-right: 1px solid #888;
> border-bottom: 1px solid #888;
> }
>
>
> This appears in the browser like so:
>
> Para text para text para text para | 123 |
> text para text para text para text -------
> para text para text para text para text para
> text para text para text para text para text.
>
>
> I would like to achieve a similar effect in the PDF output which is
> generated by FOP but I am not sure how to achieve it. Can anyone assist
> please?
>
> We are using FOP 0.95.
>
> Cheers
> Trevor
>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]