[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 3 Questions about FOP.
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|