Gav.... wrote:

-----Original Message-----
From: Ross Gardler (JIRA) [mailto:[EMAIL PROTECTED]
Sent: Saturday, 13 May 2006 9:29 AM
To: dev@forrest.apache.org
Subject: [jira] Commented: (FOR-635) images not reproduced in PDFs, if
sources are in xdocs/images directory

   [ http://issues.apache.org/jira/browse/FOR-
635?page=comments#action_12383339 ]

Ross Gardler commented on FOR-635:
----------------------------------

(some notes I'm working on about 3 issues at once due to Forrest Friday
and IRC - need this so we don't forget what we have discovered)

Looking at http://localhost:8888/samples/sample.fo

we see that an xdoc entry of:

<icon height="22" width="26" src="../images/icon.png" alt="feather"/>


Why use ../ at all ?

It's legacy, but that is not important, the key is that the URL works for HTML but not for PDF. We need to standardise somewhere. Sure it should be in the sources, but then we can't control the users sources. If we can make the handling of URLs work regardless of the rubbish put in by users then Forrest is a big hit with users.

The two images directories are static so this relevant from document rubbish
Is not needed.
And, is ../images intended to be /resources/images or /xdocs/images ?

Again, legacy. Images used to be in one location, then moved to another, then to another etc.

There can also be ../../../images/icon.png if the nested directories are
deep enough. In all nested or root cases specifying /images/icon.png would
Always work. Can we do away with dotdots ?

Only if you are prepared to edit every single users source documents for them ;-)

Seriously, we can choose to only support images/icon.png and correct our sources. But if we can it would be better if we handle all potential user error - less work for us on the user lists.

So how do we do it?

How about stripping ay leading dotdots before we process image references?


(NOTE we should still tidy up our example docs to conform to our "best practice" recomendations)

I don't think the idea of adding special matches for possible matches is a good idea, that could be a never ending task.


Ross