RE: Cannot build simple DOcBook document with fop svn 637076; works with 0.94

2008-03-16 Thread John Brown


Andreas Delmelle wrote:

 What I could do, is make the necessary adjustments to your FO to
 avoid the error, but I'm not certain if the result is still what you
 expect: see attachment FO + result PDF.

 HTH!


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? It seems
that there are *no* line breaks in the FO produced by fop. 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?
That is, if my FO had 500 pages instead of 5 pages, how much work
would it be to edit the FO by hand?

3) What did you use to edit the FO?

_
Need to know the score, the latest news, or you need your HotmailĀ®-get your 
fix.
http://www.msnmobilefix.com/Default.aspx
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cannot build simple DOcBook document with fop svn 637076; works with 0.94

2008-03-16 Thread Andreas Delmelle

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]



Re: [SOLVED] Ant unable to locate tools.jar when building FOP trunk

2008-03-16 Thread Andreas Delmelle

On Mar 15, 2008, at 23:06, John Brown wrote:


snip /
Another possibility: what do you get when you type 'set JAVACMD'?

Just noticed that, if that variable exists and points to another
java.exe, that JVM is ultimately used and JAVA_HOME is completely
ignored by Ant.




You found it!

snip /
Unfortunately, the Ant installation instructions at
http://ant.apache.org/manual/install.html#installing
say nothing about JAVACMD.


Indeed not in the installation instructions, but there is a very  
short reference to it at

http://ant.apache.org/manual/running.html#envvars

Admitted, it's very easy to overlook... I myself only noticed  
yesterday. :-)


Anyway, glad to see it worked out.


Cheers

Andreas

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



RE: Cannot build simple DOcBook document with fop svn 637076; works with 0.94

2008-03-16 Thread John Brown





Andreas Delmelle wrote:

 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.
 
[snip]

I suppose that this means that I could fix the problem by modifying the
Docbook stylesheets (not easy with my Hello, world! knowledge), but
which is wrong, fop or the stylesheets?
 
By the way, I just discovered that xmllint --format can indent the FO.

_
Need to know the score, the latest news, or you need your HotmailĀ®-get your 
fix.
http://www.msnmobilefix.com/Default.aspx