473,385 Members | 1,256 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

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
Jul 20 '05 #1
4 2822
On 25 Feb 2004 09:13:32 -0800, Lorentz <ts*****@hotmail.com> 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/
Jul 20 '05 #2
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" <pa***@logicsquad.net> wrote in message news:<sl*******************@grover.logicsquad.net> ...
On 25 Feb 2004 09:13:32 -0800, Lorentz <ts*****@hotmail.com> 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.

Jul 20 '05 #3
On 26 Feb 2004 08:41:28 -0800, Lorentz <ts*****@hotmail.com> 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/
Jul 20 '05 #4
"Paul A. Hoadley" <pa***@logicsquad.net> wrote in message news:<sl*******************@grover.logicsquad.net> ...
On 26 Feb 2004 08:41:28 -0800, Lorentz <ts*****@hotmail.com> 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
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: chris | last post by:
Hi, After going back through the XSL tutorials and the help here I have largely solved the problem of merging two XHTML files, but one small detail remains... The parser outputs <html...
29
by: Thomas | last post by:
Hi I have an XSL stylesheet: <xsl:for-each select="TRACKS/TRACK"> <tr class="TDL"> <td width="90%"><xsl:number value="position()" format="1" /> - <xsl:value-of select="TRACKTITLE"/></td>...
4
by: Kasp | last post by:
Below is a XSL that I can barely understand being a newbie to XSL world. Can someone let me know what do these 3 lines do exactly? - <xsl:attribute name="MemberKey"> <xsl:number level="multiple"...
4
by: sylvain.loiseau | last post by:
Hello Given a node set, I try to compute the total of the string-length value of each node. For instance, with : <xsl:for-each select="//q"> <!-- the length of each node is compute with:...
2
by: Sebek | last post by:
Hello, I'm transforming a XML document in XHTML but I have problems using sub-strings, it will be clearer with an exemple: What I have: <form...
1
by: j erickson | last post by:
with the following xsl and xml file, the display of the gif file with the <image/url> tag works. However, the gif file in the <description> tag using the name attribute "src" won't make the correct...
4
by: Pat Turner | last post by:
Hi, I have some XML like this: <family> <person name="bob"> <father ref="../../person" /> </person> <person name="charlie"> <child ref="../../person" />
2
by: shapper | last post by:
Hello, I am for days trying to apply a XSL transformation to a XML file and display the result in a the browser. I am using Asp.Net 2.0. Please, could someone post just a simple code example,...
14
by: ajfish | last post by:
Hi, I am trying to allocate a unique ID to every instance of tag 'foo' in a large XML document. currently I'm doing this: <xsl:variable name="UniqueId"> <xsl:number count="foo" level="any"/>...
2
by: tschwartz | last post by:
I have an xml document in which elements are hierarchically related to eachother conceptually. Unfortunately, the hierarchical relationship is not modelled in the schema (i.e., the elements are...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.