[sword-devel] Android SWORD

DM Smith dmsmith at crosswire.org
Thu Sep 30 07:07:04 MST 2010


  On 09/30/2010 05:24 AM, David Hollands wrote:
> My two pence.. feel free to ignore.
>
> * OSIS ->  XSLT ->  XHTML is unnecessarily complicated.
I'm interested in other ways that OSIS (xml in general) can be rendered. 
Some browsers (maybe all modern ones by now) are able to apply CSS 
directly to xml to produce output. Flying Saucer 
(https://xhtmlrenderer.dev.java.net/) looks promising to me as something 
that can be used by a Java program.

> * Indeed, it is easy enough to get the raw text. If you still prefer
> to convert raw text to OSIS first, given an XML parser/sequencer and a
> DOM, the programming language (Java) is all you need to produce the
> output (HTML). Personally, I've found using XSLT/XPath a bit
> cumbersome.

The biggest gain I see in using xslt is to have parameter driven output. 
E.g. the style of verse references, whether to show notes or not, ....

The second gain is that it is simple, though it takes a bit of learning.

The problem with raw text from an OSIS document is things like quotes, 
Words of Christ and Divine Name, i.e. Lord are marked up in such a way 
that they don't appear right in raw text.

> Love in Christ,
>
> David
>
>
>
> On 1 September 2010 18:23, DM Smith<dmsmith at crosswire.org>  wrote:
>>   On 09/01/2010 12:48 PM, Manfred Bergmann wrote:
>>> Can the html rendering in JSword be simplified?
>> I'm not sure what you mean by simplified? Do you mean the process or the
>> output?
>>
>> The process is basically this:
>> Get the verses from the module.
>> Convert them to OSIS. (For modules already in OSIS this is almost a
>> pass-through)
>> Use xslt to convert the OSIS into xhtml.
>>
>> The output is the final step. Another stylesheet can be used to simplify the
>> output.
>>
>> Alternatively, one can create another mechanism to convert the raw text into
>> html. It is easy enough to get the raw text.
>>
>>
>> In Him,
>>     DM
>>
>> _______________________________________________
>> sword-devel mailing list: sword-devel at crosswire.org
>> http://www.crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
>>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page




More information about the sword-devel mailing list