Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XSL-FO - Formatting single line with different text-alignments

Reply
Thread Tools

XSL-FO - Formatting single line with different text-alignments

 
 
Lorentz
Guest
Posts: n/a
 
      02-25-2004
Greetings.

I have a process that takes data from a MS Access2000 database and
produces .pdf files. Everything works fine... but I'm trying to
format the header and footer of the pdf file so that the a line can
contain 2 tex-alignments (center and right). Thus far, I've had no
success in achieving this criteria. Does anyone have any
suggestions...?

Here's what I have so far (the result is on 2 separate lines):
<fo:static-content flow-name="xsl-region-before">
<fo:block font-family="Times" font-size="10pt" text-align="center">
Centered Text
</fo:block>
<fo:block font-family="Times" font-size="10pt" text-align="right">
Right Justified Text
</fo:block>
</fo:static-content>

If anyone can help, I appreciate the assistance.

Thank you in advance,
Lorentz
 
Reply With Quote
 
 
 
 
Paul A. Hoadley
Guest
Posts: n/a
 
      02-26-2004
On 25 Feb 2004 09:13:32 -0800, Lorentz <(E-Mail Removed)> wrote:

> I'm trying to format the header and footer of the pdf file so that
> the a line can contain 2 tex-alignments (center and right).


The simplest way is to use a leader:

<fo:block text-align-last="justify">
<xsl:text>Text on the left</xsl:text>
<fo:leader leader-pattern="space"/>
<xsl:text>Text on the right</xsl:text>
</fo:block>

You could also use a table.


--
Paul.

Logic Squad -- Technical Publishing with XML -- http://logicsquad.net/
 
Reply With Quote
 
 
 
 
Lorentz
Guest
Posts: n/a
 
      02-26-2004
Thanks for the help Paul...

Unfortunately the code does not work. I cut and pasted your example
into my .xsl file and generated the pdf - the header information was
not complete. Here is what it produced:
Text on the

So... I'm not sure what I'm doing wrong. I will look into the table
option... but I'd rather format the line; seems easier...!

Thanks again.
-Lorentz
"Paul A. Hoadley" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)> ...
> On 25 Feb 2004 09:13:32 -0800, Lorentz <(E-Mail Removed)> wrote:
>
> > I'm trying to format the header and footer of the pdf file so that
> > the a line can contain 2 tex-alignments (center and right).

>
> The simplest way is to use a leader:
>
> <fo:block text-align-last="justify">
> <xsl:text>Text on the left</xsl:text>
> <fo:leader leader-pattern="space"/>
> <xsl:text>Text on the right</xsl:text>
> </fo:block>
>
> You could also use a table.

 
Reply With Quote
 
Paul A. Hoadley
Guest
Posts: n/a
 
      02-27-2004
On 26 Feb 2004 08:41:28 -0800, Lorentz <(E-Mail Removed)> wrote:

> Unfortunately the code does not work.


What formatter are you using? XEP renders that fragment correctly.


--
Paul.

Logic Squad -- Technical Publishing with XML -- http://logicsquad.net/
 
Reply With Quote
 
Lorentz
Guest
Posts: n/a
 
      02-27-2004
"Paul A. Hoadley" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)> ...
> On 26 Feb 2004 08:41:28 -0800, Lorentz <(E-Mail Removed)> wrote:
>
> > Unfortunately the code does not work.

>
> What formatter are you using? XEP renders that fragment correctly.


Paul,

Thanks for your help and advice. I'm not sure what formatter we're
using... I ended up using tables... and I know this will be easier to
work with!

Thanks again,

Lorentz
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
resolve single line with multiple items into mutliple lines, single items ela Perl Misc 12 04-06-2009 06:47 PM
Create single application run on different devices communication with different interface nishadixit Java 0 05-24-2005 10:23 AM
Formatting a single line without effecting the entire table with the Text::Table module Mothra Perl Misc 10 03-11-2005 03:56 PM
Read a file line by line with a maximum number of characters per line Hugo Java 10 10-18-2004 11:42 AM



Advertisments