XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Tina FleishmanSubject: fo:block-container
Author: Tina Fleishman
Date: 05 Jan 2007 01:36 PM
Originally Posted: 05 Jan 2007 12:17 PM
I'm very new to xsl and I'm learning pretty quick however I'm really stuck at the moment.

I'm trying to create a table-cell which will display text that has been rotated 90 degrees. So the text is vertical bottom to top and the text faces left to right so you have to tilt your head to read.

I've seen you can do this with <fo:block-container> when I try doing this I have two problems, this is not supported in Stylus Studio 2007 (the text is orange), but it doesn't give me an error, it just doesn't display any text within the tag.

So I have 2 questions, is there another way to do this? And if this is the only way, how do I get it to work?

Here is the code I have...

<fo:table table-layout="fixed">
<fo:table-column column-width="50pt"/>
<fo:table-column column-width="200pt"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block-container reference-orientation="90">
<fo:block>
<xsl:text>Vertical Text</xsl:text>
</fo:block>
</fo:block-container>
</fo:table-cell>
<fo:table-cell>
<fo:block>
<xsl:text>Horizontal Text</xsl:text>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>

Thanks for your help in advance.

Postnext
(Deleted User) Subject: fo:block-container
Author: (Deleted User)
Date: 05 Jan 2007 02:41 PM
<fo:block-container width="100pt" reference-orientation="90">

does rotate content. It is supported by RenderX, but is not supported by FOP.

You can select FO processor by opening scenario properties, page "Post-process" and checking "Post process with RenderX XEP" radio button.

Postnext
Tina FleishmanSubject: fo:block-container
Author: Tina Fleishman
Date: 05 Jan 2007 02:50 PM
Thank you for your fast response. I switched the post-process to RenderX and it still does not display any text. I have a regular block in the same cell and that displays but the text in the block-container does not. Any ideas?

Postnext
(Deleted User) Subject: fo:block-container
Author: (Deleted User)
Date: 05 Jan 2007 03:04 PM
It is hard to tell without actual FO you are processing.
You can post your FO here and we will take a look.
I am attaching simple XSLT I was using to validate text rotation.


Unknownvert_text.xsl

Postnext
Tina FleishmanSubject: fo:block-container
Author: Tina Fleishman
Date: 05 Jan 2007 03:08 PM
Here is the exact code I am using.

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.1" xmlns:saxon="http://icl.com/saxon" extension-element-prefixes="saxon" xmlns:fox="http://xml.apache.org/fop/extensions">

<xsl:template match="*|@*">
<xsl:apply-templates select="*|@*"/>
</xsl:template>
<xsl:template match="CO">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="serif" font-size="10pt" text-align="justify">
<fo:layout-master-set>
<fo:simple-page-master master-name="pagemaster1" page-height="792pt" page-width="612pt">
<fo:region-body margin-left="25pt" margin-top="25pt" margin-bottom="45pt" margin-right="25pt"/>
<fo:region-before extent="25pt"/>
<fo:region-after extent="45pt"/>
<fo:region-start extent="25pt"/>
<fo:region-end extent="25pt"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="pagemaster1">
<fo:static-content flow-name="xsl-region-before"/>
<fo:static-content flow-name="xsl-region-after"/>
<fo:static-content flow-name="xsl-region-start"/>
<fo:static-content flow-name="xsl-region-end"/>
<fo:flow flow-name="xsl-region-body">
<fo:block>
<xsl:call-template name="Body"/>
</fo:block>
<fo:block id="EOD"/>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>

<xsl:template name="Body">
<fo:table table-layout="fixed">
<fo:table-column column-width="50pt"/>
<fo:table-column column-width="200pt"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block-container reference-orientation="90">
<fo:block>
<xsl:text>Vertical Text</xsl:text>
</fo:block>
</fo:block-container>
</fo:table-cell>
<fo:table-cell>
<fo:block>
<xsl:text>Horizontal Text</xsl:text>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:template>
</xsl:stylesheet>

Postnext
(Deleted User) Subject: fo:block-container
Author: (Deleted User)
Date: 05 Jan 2007 05:06 PM
Try to use latest FOP. Stylus uses version 0.20.5, it is possible that latest one has block-container support.

Answering to your previous post, remember that PDF generation is 2-step
process. First, your XSLT processes your XML input and generates FO. Second, this FO is processed by renderer ( FOP or RenderX ) which converts it into PDF file. By selecting renderer using "Post-process" properties page you do not change FO, you just choose processor which
will convert it into PDF. So, the PDF displayed in the preview window is generated using renderer specified on this property page from the FO generated by your XSLT.

Postnext
(Deleted User) Subject: fo:block-container
Author: (Deleted User)
Date: 05 Jan 2007 05:07 PM
Try to use latest FOP. Stylus uses version 0.20.5, it is possible that latest one has block-container support.

Answering to your previous post, remember that PDF generation is 2-step
process. First, your XSLT processes your XML input and generates FO. Second, this FO is processed by renderer ( FOP or RenderX ) which converts it into PDF file. By selecting renderer using "Post-process" properties page you do not change FO, you just choose processor which
will convert it into PDF. So, the PDF displayed in the preview window is generated using renderer specified on this property page from the FO generated by your XSLT.

Postnext
Tina FleishmanSubject: fo:block-container
Author: Tina Fleishman
Date: 05 Jan 2007 03:13 PM
I tested the code that you attached and that doesn't display anything for me either.

Postnext
(Deleted User) Subject: fo:block-container
Author: (Deleted User)
Date: 05 Jan 2007 03:24 PM
I am getting "Vertical Text" at the bottom-left corner of the page.
As I don't have your input xml I modified XSLT to be independent from
input, but I think it must not impact generated FO. Try to run attached file.


Unknownvert_text(1).xsl

Postnext
Tina FleishmanSubject: fo:block-container
Author: Tina Fleishman
Date: 05 Jan 2007 03:29 PM
I see the Horizontal text but not the vertical text.

Postnext
(Deleted User) Subject: fo:block-container
Author: (Deleted User)
Date: 05 Jan 2007 03:28 PM
And I am also attaching generated PDF...


Unknownvertical_text.pdf

Postnext
(Deleted User) Subject: fo:block-container
Author: (Deleted User)
Date: 05 Jan 2007 03:34 PM
<fo:block-container width="100pt" reference-orientation="90">

does rotate content. It is supported by RenderX, but is not supported by FOP.

You can select FO processor by opening scenario properties, page "Post-process" and checking "Post process with RenderX XEP" radio button.

Postnext
(Deleted User) Subject: fo:block-container
Author: (Deleted User)
Date: 05 Jan 2007 03:35 PM
Can you also post FO and PDF document you are getting ?

Postnext
Tina FleishmanSubject: fo:block-container
Author: Tina Fleishman
Date: 05 Jan 2007 03:42 PM
I'm not sure what you mean to post the FO but here is the PDF.


Unknowntest.pdf

Postnext
(Deleted User) Subject: fo:block-container
Author: (Deleted User)
Date: 05 Jan 2007 03:40 PM
Can you also post FO and PDF document you are getting ?

Postnext
Tina FleishmanSubject: fo:block-container
Author: Tina Fleishman
Date: 05 Jan 2007 03:46 PM
I just realized something. I'm using xsl to create a PDF. But the way I create the PDF is through customized system we use as our database. When I look at the settings there it is using FOP. I think that might be why I can't display it. I have to find out if we can use RenderX with them.

Postnext
Tina FleishmanSubject: fo:block-container
Author: Tina Fleishman
Date: 05 Jan 2007 03:58 PM
If I can not use RenderX with the software, is there another way to acomplish this?

Posttop
(Deleted User) Subject: fo:block-container
Author: (Deleted User)
Date: 05 Jan 2007 05:10 PM
Try to use latest FOP. It is possible that it supports block-container.

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.