[sword-devel] Sword enhancement proposal [was: HTML filter cross references link]

Chris Little chrislit at crosswire.org
Tue Jul 29 00:25:44 MST 2008



Manfred Bergmann wrote:
> Am 29.07.2008 um 09:10 schrieb Chris Little:
> 
>>
>> Greg Hellings wrote:
>>> On Tue, Jul 29, 2008 at 1:45 AM, Manfred Bergmann  
>>> <bergmannmd at web.de> wrote:
>>>> Although I don't understand right now how the Sword module data is  
>>>> stored,
>>>> my proposal here is that Sword should have a simple intermediate  
>>>> XML format
>>>> that can be used by API users to have full access to the module  
>>>> data.
>>>> Simple HTML/RTF can still be produced from this intermediate  
>>>> format by
>>>> Sword. But HTML should not be used to give access to the module  
>>>> data while
>>>> at the same time raw data access should not be used.
>>>> Having XSDs would make is easy for API-users to use XML->Object  
>>>> binding (I
>>>> only know JAXB in Java but this might be available to most  
>>>> languages as it
>>>> is used in protocols like SOAP).
>>>> Also XSLT stylesheets can be used to produce HTML or whatever  
>>>> output.
>>>> Frontends could choose to use the HTML rendered output or choose  
>>>> totally
>>>> different approaches by using the data of the intermediate XML.
>>>> Let me know what you think.
>>> It seems to me that this is one of the better ideas.  After all, the
>>> library should supply display-agnostic data to the front end, which
>>> then renders it into a display format, rather than presenting it with
>>> a list of a few preselected display formats which are supported at  
>>> the
>>> engine level.
>> If you want OSIS, just ask the engine for OSIS. There's no requirement
>> that you tell the API to render text as HTML or RTF. You can just as
>> easily tell the API to render to OSIS, and it will happily perform (or
>> at least attempt) the conversion from GBF and ThML to OSIS. The  
>> GBFOSIS
>> and ThMLOSIS filters might need a little more work, but they should
>> already work fairly well.
> 
> So that means, basically, there is something like intermediate XML  
> produced on the fly.

Not by default, but you can certainly ask the API for XML in a single 
format.

> Does that work for dictionaries, too?

Certainly. It will work for all modules of all module types, provided 
that the correct filters exist. So dictionaries marked up with GBF, 
ThML, or OSIS would work, but the new TEI dictionaries would not. But 
that's just because a TEI to OSIS filter hasn't been written. The TEI to 
HTML and RTF filters are also currently lacking, and none of the TEI 
modules will be released until we have written some good filters--so TEI 
filters are a fairly high priority.

--Chris



More information about the sword-devel mailing list