[sword-devel] Android SWORD

Martin Denham mjdenham at gmail.com
Thu Sep 30 09:08:22 MST 2010


Hi,

I must confess that to make JSword perform a little better and due to lack
of xslt support on early versions of Android I tweaked jsword OSIS
processing so as to use OSIS XML -> SAX processor -> HTML.  I thus removed
jdom and xslt.  I realise there are various arguments for using jdom and
xslt but performance was my main driver on such small, low powered mobile
phones.

I may switch back to using xslt in the future because there is a lot of
logic in the xslt stylesheet that was difficult to reproduce in SAX.  Also,
now, I think I may have been able to get xslt going on old Android s/w but
am putting my effort into other areas.

Jdom may add too much overhead for such intense processing on small devices
although it works great on pcs.

Best regards
Martin

On 30 September 2010 15:07, DM Smith <dmsmith at crosswire.org> wrote:

>  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
>>
>
>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20100930/3370c9ad/attachment-0001.html>


More information about the sword-devel mailing list