On Mar 16, 2008, at 08:46, John Brown wrote:

Hi John,


I finally looked at your PDF and saw that it looked just the way that it
ought to look in my opinion. The table of contents and chapter 1 both
start on odd-numbered pages.

I have a few questions.

1) Can you explain briefly what changes you made to the FO?

As I recall, the only small things I altered were:
-> remove the region-name property from the fo:region-body in the very first fo:simple-page-master -> on that same fo:region-body, set the margin-bottom and -top such that the region has zero height -> a bit further on, there were some fo:static-contents that mapped to the 'blank body' region; I commented those out.

It seems that there are *no* line breaks in the FO produced by fop.

Correct. That is generally the case when you take a look at serialized XML. The XML is far from optimized to be viewed by humans, but very friendly for consuming processes (no excess whitespace, linefeeds..)

Since the FO was very small, I used jEdit to open it. It has an XML Indenter plugin to aid with the readability. Another option would have been to use an identity transform: run the serialized FO through a very simple XSLT which does no more than copy the source, but uses the indent='yes' hint on the xsl:output element.

The only editor that I have that can edit it is vi. I was hoping to format the FO
by displaying it in Internet Explorer, and then Copy+Paste into a text
editor, but the '+' and '-' used to expand and collapse the tree are
also copied.

2) Did you have to search the whole file looking for the tag(s) that
needed to be changed, or did you have to make only one change?

I did it with simple trial-and-error:
1) run the FO through FOP, and see what errors/warnings arise
2) adapt the FO, and re-run

It took me only three iterations before the FO worked without errors. I also noticed, but ignored the font-related warnings.

That is, if my FO had 500 pages instead of 5 pages, how much work
would it be to edit the FO by hand?

If your FO would have had 500 pages, I honestly would never have edited it by hand completely. Practically all text-editors I know of, have problems with files that large (especially if it's XML, and the editor wants to validate it...) There are some editors available that focus on being able to load huge files, but these don't come with the nifty syntax highlighting features, of course...

I would probably have extracted one or two page-sequences (again: using a very simple XSLT stylesheet), and have a look at that, before wading through megabytes of XSL-FO.

3) What did you use to edit the FO?

jEdit[*], a pure Java text-editor, is quite OK for this purpose, although it is a bit bloated and can be slow at times (depends on which plugins you have installed). It comes equipped with syntax- highlighting and code-completion for FO, amongst others. Notepad++, which I discovered only recently, would also be a good choice for the Windows-platform. It only knows XML (not XSL-FO specifically), but being a native Windows-app, it is very light- weight and fast.

[*] = http://www.jedit.org
[**] = http://notepad-plus.sourceforge.net


HTH!

Cheers

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to