This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Help with FOP/XSLFO
Scott Wright writes:
> I've started using the FOP product for pdf output and need some help with
> some of the formatting objects. There doesn't appear to be a lot of
> help/support off of apache's site so I thought I'd look here. I'm currently
> using FOP, the XML4J parser, and XT (for XSL translation).
You may consider asking in FOP dev-list (http://xml.apache.org/mail.html).
> 1. I've read the features/limitations section for FOP and it says that it
> has minimal support for tables, table-columns, and table-cells. I'm trying
> to use the number-columns-spanned property but when I try to use that
> property and run the xml and xsl through the FOP application I get a
> 'Number of cells in row don't match number of columns' error.
As far as I know, FOP implements a subset of XSL WD 1999-04-21;
at that time, the property was spelled 'n-columns-spanned'.
> 2. Using <fo:block text-decoration="underline"> to generate underline text
> in the pdf file doesn't appear to be working.
I don't know much about FOP, but still dare a suggestion: try
<fo:block><fo:inline-sequence text-decoration="underline">.
Maybe they haven't implemented inheritance from fo:block
to inline-level in a proper way ;-)...
> 3. Is there somewhere I can get a list of characters codes so that I can
> output whitespaces, <, >, &, etc... (The ampersand is very important)
Read the XML Spec: they are <, >, and &, respectively. "
for double quote and ' for single quote are also defined by XML.
As for whitespaces, the story is more complicated. Read the XSL WD
1999-04-21 about whitespace-treatment and wrap-option.
> 4. Does anyone have a working example of displaying table borders in an
> output pdf? Every example that I try doesn't output anything.
Have you seen our set of examples at www.RenderX.com/testcases.html?
There's some table-related stuff there. You can use them to get an idea of
XSL FO syntax; however, most of them can hardly be rendered by FOP in its
current shape.
> 5. Is there a code for inserting line breaks into a single <fo:block>?
> Right now, If I want to force a new line I just start a new block.
In my opinion, you are doing the right thing. You can also insert line
breaks explicitly if you specify white-space-treatment="preserve"
(FOP spells it this way; in the 1999-04-21 specs, you can find
both white-space-treatment and whitespace-treatment ;-)). But IMHO,
splitting text into separate blocks is much more in the spirit of XSL FO.
Best regards,
Nikolai Grigoriev
RenderX
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list