[jsword-devel] JSword and Map/Image modules
Brian Fernandes
infernalproteus at gmail.com
Wed Jan 28 02:54:53 MST 2009
To answer my own questions:
1) Map modules can be both hierarchical and simple lists. I should have
realized that all the modules I talked about earlier were in fact Map
modules; but two (FrarsiBibleAtlas and AbsMaps) were stored in gen book
format? (not sure of the right terminology here). The other two were in
dictionary format.
So basically we'll have to make a small change to BD code to see which
of these formats is being used and use a list or a tree accordingly.
2) NetMaps was not working because it's content is something like this:
<br><br>Journey of Paul (JP) #1, grid D2<br><img
src="/images/jp1.jpg"/><br><br>Journey of Paul (JP) #2, grid D2<br><img
src="/images/jp2.jpg"/><br><br>Journey of Paul (JP) #3, grid D2<br><img
src="/images/jp3.jpg"/><br><br>Journey of Paul (JP) #4, grid D2<br><img
src="/images/jp4.jpg"/>
This is not valid XML as the <br> tags are not closed and the fallback
code simply removes all tags in an effort to display something.
If you replace <br> with <br/>, it works just fine. The THMLFilter class
makes 3 attempts to parse the text.
a) The first attempt is made after removing invalid '&' characters in
the text.
b) If the above fails, it does some further character clean up, removing
disallowed characters from the XML.
c) If this still fails, it simply removes all tags.
Maybe we can add an additional step between b and c which would replace
"<br>" with "<br/>"? Or perhaps do it as part of step b. Any other tags
like this which we may want to clean up?
DM, what do you think?
Brian.
More information about the jsword-devel
mailing list