This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
3 Questions about FOP.
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] 3 Questions about FOP.
- From: "Hewko, Doug" <Doug dot Hewko at ccra-adrc dot gc dot ca>
- Date: Fri, 5 Oct 2001 10:04:05 -0400
- Reply-To: xsl-list at lists dot mulberrytech dot com
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