[bt-devel] ThML
Chris Little
bt-devel@crosswire.org
Fri, 23 Feb 2001 09:27:11 -0800
> -----Original Message-----
> From: owner-bt-devel@crosswire.org
> [mailto:owner-bt-devel@crosswire.org]On Behalf Of Martin Gruner
> Sent: Monday, February 19, 2001 12:45 PM
> To: bt-devel@crosswire.org
> Subject: Re: [bt-devel] ThML
>
>
> Chris,
>
> am I right with my assumption that the frontends will not have to
> handle all
> of the ThML tags due to the architecture of sword?
They shouldn't need to. ThML is mostly just XHTML, so that takes care of
most of the formatting tags. The sync and scripRef tags will have to be
parsed and handled by you. The only alternative would be sending files
through the ThML to HTML filter, but then you'll lose the meaning behind
many ThML tags. We may want to add functions to Sword to convert some of
the verse numbers that ThML allows into a more standard format, because
Roman numerals among other things are allowed in the tags. For our own
modules, everything is fairly clean (no Roman numerals, standard
abbreviations, etc.) but the actual standard isn't that strict.
> Would you have some wishes / suggestions for features you'd like
> to see in
> bibletime which would help you with module creation?
Yeah, just implement ThML support so I can test modules in Linux. :)
> Could you give us hints on how to implement ThML support? Are
> there traps we
> should be aware of?
It should be pretty much like any other text format you support. There are
a lot of tags that I didn't handle in the filters, for things like page
breaks, because they don't necessarily our projects. The big, important
tags are sync and scripRef. Most of the others are just XHTML. The only
trap I would mention is to remember that ThML has XHTML at its heart, not
HTML, so all tags need closing. All the modules I've done so far for ThML
do NOT conform to XHTML like they should and are going to be fixed.
Another thing of some importance is to make sure you can support images.
They way I planned to do images is by using IMG tags with the module's root
directory as the root for the images. So <img src="images/cathedral.jpg">
would reference cathedral.jpg in $SWORD_HOME/modules/<path to
module>/images/cathedral.jpg.
--Chris