[sword-devel] General Sword question - java jni lib

Troy A. Griffitts scribe at crosswire.org
Wed Aug 18 20:56:35 MST 2010


Dear Gary,

My apologies for not replying sooner.  Glad you got subscribed to
sword-devel.  Often you'll get a faster better reply from others on the
list.

So, you'll probably want at least a basic understanding of the SWORD
engine if you're planning to maintain a full featured Android client.
Though I understand wanting to get something put together quickly get
the ball rolling.

SWORD modules use all sorts of different markup internally.  When you
create your library factory, you can tell it what sort of markup you
want as output from RenderText.  I have not yet added a means in the JNI
wrapper to specify output markup; it is currently hardcoded to FMT_WEBIF
here:

http://www.crosswire.org/svn/sword/trunk/bindings/java-jni/jni/webmgr.hpp

This format is the same markup we output for our web frontend here:

http://crosswire.org/study/

I would think this should be close to what you want for a nice rich
output with formatting, footnotes, xrefs, clickable strongs, etc.

You can change this to FMT_PLAIN for plain text output, but this
wouldn't be nice in the long run.

StripText is for obtaining the same buffer used for a search.

Hope this helps,

Troy



On 08/18/2010 06:06 PM, Gary Lo wrote:
> Hi All,
> 
> This is my first post, hope I'm doing the right thing. I've been using
> the java jni library that Troy has written
> (http://crosswire.org/svn/sword/trunk/bindings/java-jni/)
> to create an Android port of sword. It's almost ready to be tested
> however there's one BIG problem. The method getstriptext () from
> http://crosswire.org/svn/sword/trunk/bindings/java-jni/src/org/crosswire/android/sword/SWModule.java
> loses all apostropes and inverted commas. And I do not use render text
> because its got all sorts if html tags which I don't want. Is there some
> way to remove the html markup? I haver a similar problem with some
> headings as well a font tag will appear e.g psalm 33's heading for ESV.
> 
> I apologise for my lack of sword knowledge, hope I vs. make it up with
> my experience with Android.Hope to hear from you guys soon.
> 
> Cheers,
> Gary
> 
> 
> 
> _______________________________________________
> 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