[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

3 Questions about FOP.

Subject: 3 Questions about FOP.
From: "Hewko, Doug" <Doug.Hewko@xxxxxxxxxxxxxxx>
Date: Fri, 5 Oct 2001 10:04:05 -0400
fop vertical align
I have a couple of questions about FO, but first some background. I am using
Cocoon2 and Tomcat for my programming. Xalan is also installed.

Question 1:

How can I position a document title so it is on a single page and centered
vertically? I tried the "vertical-align='middle'" attribute but it didn't
have any effect. 

My XSL template is:
		<xsl:template match="title">
			<fo:block font-size="28pt" 
				text-align="center" 
				font-weight="bold">
				<xsl:apply-templates/>
			</fo:block>
		</xsl:template>

Question 2:

How do I centre a table? When I use the "text-align='center'" in the
fo:block declaration before the able (see XSL below), the text in the table
gets centered but not the table itself. I want the equivalence of HTML's
"<center><table> .... </table></center>"

	<fo:block font-size="10pt" >
	<xsl:for-each select=".">
		<fo:table>
			....
	</fo:block>

Question 3:

The only way I could get a graphic to appear is by using "external-graphic".
Is there another way? Preferably, I would like to use relative links. Also,
how can I get my image to appear in the size it was created in and not
stretch to fill a page? I also have a linke below my image which I do not
know where it came form.

Here's my XSL:
<xsl:template match="graphic">
	<fo:block font-weight="bold">
		<xsl:value-of select="name"/>
	</fo:block>
	<fo:block
    text-align="center" 
    margin-top=".75in"
    page-break-after="always">
	   <fo:external-graphic>
	   <xsl:attribute
name="src">http://workstation/cocoon/development/_images/<xsl:value-of
select="location"/></xsl:attribute>
	   </fo:external-graphic>
</fo:block>

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.