[sword-devel] Sword enhancement proposal [was: HTML filter cross references link]
Chris Little
chrislit at crosswire.org
Tue Jul 29 00:10:12 MST 2008
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.
--Chris
More information about the sword-devel
mailing list