[sword-devel] IMAGES in SWORD

Joachim Ansorg sword-devel@crosswire.org
Mon, 4 Mar 2002 11:56:19 +0100


Troy,
	thanks for implementing this!

> And besides, I just added image support.  Here's how it works...
>
> Make the src of your image look like this  <img src="/pic.jpg"> or if
> you prefer, <img src="/images/pic.jpg>
>
> the src MUST begin with a '/', otherwise, the filter assumes you know
> what you're doing (possibly referencing an external source somewhere)
> and leaves the tag unchanged.

The thmlhtml filter works almost right ;)

You wrote 
	c++;            // skip '/'
but if you skip the slash you have to make 		
module->getConfigEntry("AbsoluteDataPath")
have a trailing one, otherwise the path will be wrong.

And AbsoluteDataPath doesn't work for lexicons and books, because the 
DataPath of them looks like
	DataPath=./modules/lexdict/rawld/isbe/isbe
The base name of the datafiles is appended, so the path will be wrong if 
AbsolueDataPath is called for a book or a lexicon.

Thanks!

Joachim