[sword-devel] Config file for thml module

DM Smith dmsmith at crosswire.org
Mon Nov 29 11:25:18 MST 2010

On 11/29/2010 12:30 PM, Greg Hellings wrote:
> And ThML continues to be used to create Bible modules because it is 
> the best tool for module creators who care about their presentation

The problem I have with that part of the statement is that often 
presentation is presumed to be rather singular: How it looks in one 
Have you seen how the rich markup is stripped from The SWORD Project for 
Windows? How about what it looks like on a phone?

> more than some semantic dream world of markup.
I guess you mean OSIS? Where does OSIS lack in markup that it cannot be 
presented well? JSword/BibleDesktop transforms ThML into OSIS and then 
renders that. So how is one better than the other? What does BD/JS lack 
in it's presentation?

But that is besides the point. Transforming ThML into OSIS does not 
really add much. And my guess is that it is not lossy. But the real 
value come in running it through osis2mod, which will point out problems 
with the input and will transform it into something that SWORD and 
JSword can digest fairly well.

> To create a ThML Bible or commentary you will need to use the imp 
> format and then just markup within the verses with the markup you 
> want. For example
> $$$Matthew 1:1
> The book of the genealogy of the Christ<br/><I>From</I> Abraham to the...
> $$$Matthew 1:2
> And Abraham begot Isaac<br/>And Isaac <I>begot</I> Jacob and his brothers
> $$$Matthew 1:3
> ...
> Then run imp2mod on that input and set its source as ThML and live 
> happily ever after. The imp file probably will not form a valid ThML 
> XML document, but that is unavoidable in this case.
The imp file is not xml and it will not be well-formed, let alone valid 
XML. This is not a bad thing in and of itself, but unless the ThML 
fragments are otherwise valid, such a module may not work well. It might 
work in part. For example, at worse, JSword will strip out all the 
markup and present the plain text of offending text. Notes and 
references will be inlined.

If your ThML file passes XML validation and your conversion to IMP 
format merely replaces the start verse markers with IMP markers and 
deletes the end verse marker, it should work well.

Stick with the ThML markup that SWORD and JSword supports. Specifically 
this is mentioned at: http://www.crosswire.org/wiki/ThML_modules

Hope this helps.

In Him,

More information about the sword-devel mailing list