[jsword-devel] jsword-devel Digest, Vol 56, Issue 4

Yiguang Hu yighu at yahoo.com
Wed Jan 28 12:44:02 MST 2009


Please see the inline comment on gsword


--- On Wed, 1/28/09, jsword-devel-request at crosswire.org <jsword-devel-request at crosswire.org> wrote:

> From: jsword-devel-request at crosswire.org <jsword-devel-request at crosswire.org>
> Subject: jsword-devel Digest, Vol 56, Issue 4
> To: jsword-devel at crosswire.org
> Date: Wednesday, January 28, 2009, 2:00 PM
> Send jsword-devel mailing list submissions to
> 	jsword-devel at crosswire.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://www.crosswire.org/mailman/listinfo/jsword-devel
> or, via email, send a message with subject or body
> 'help' to
> 	jsword-devel-request at crosswire.org
> 
> You can reach the person managing the list at
> 	jsword-devel-owner at crosswire.org
> 
> When replying, please edit your Subject line so it is more
> specific
> than "Re: Contents of jsword-devel digest..."
> 
> 
> Today's Topics:
> 
>    1. Re: JSword and Map/Image modules (Brian Fernandes)
>    2. Re: gsword (Peter von Kaehne)
>    3. Re: JSword and Map/Image modules (DM Smith)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Wed, 28 Jan 2009 15:24:53 +0530
> From: Brian Fernandes <infernalproteus at gmail.com>
> Subject: Re: [jsword-devel] JSword and Map/Image modules
> To: J-Sword Developers Mailing List
> <jsword-devel at crosswire.org>
> Message-ID: <49802B6D.3050602 at gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> To answer my own questions:
> 
> 1) Map modules can be both hierarchical and simple lists. I
> should have 
> realized that all the modules I talked about earlier were
> in fact Map 
> modules; but two (FrarsiBibleAtlas and AbsMaps) were stored
> in gen book 
> format? (not sure of the right terminology here). The other
> two were in 
> dictionary format.
> 
> So basically we'll have to make a small change to BD
> code to see which 
> of these formats is being used and use a list or a tree
> accordingly.
> 
> 
> 2) NetMaps was not working because it's content is
> something like this:
> 
> <br><br>Journey of Paul (JP) #1, grid
> D2<br><img 
> src="/images/jp1.jpg"/><br><br>Journey
> of Paul (JP) #2, grid D2<br><img 
> src="/images/jp2.jpg"/><br><br>Journey
> of Paul (JP) #3, grid D2<br><img 
> src="/images/jp3.jpg"/><br><br>Journey
> of Paul (JP) #4, grid D2<br><img 
> src="/images/jp4.jpg"/>
> 
> 
> This is not valid XML as the <br> tags are not closed
> and the fallback 
> code simply removes all tags in an effort to display
> something.
> 
> If you replace <br> with <br/>, it works just
> fine. The THMLFilter class 
> makes 3 attempts to parse the text.
> 
> a) The first attempt is made after removing invalid
> '&' characters in 
> the text.
> 
> b) If the above fails, it does some further character clean
> up, removing 
> disallowed characters from the XML.
> 
> c) If this still fails, it simply removes all tags.
> 
> Maybe we can add an additional step between b and c which
> would replace 
> "<br>" with "<br/>"?  Or
> perhaps do it as part of step b. Any other tags 
> like this which we may want to clean up?
> 
> DM, what do you think?
> 
> Brian.
> 
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Wed, 28 Jan 2009 14:55:02 +0000
> From: Peter von Kaehne <refdoc at gmx.net>
> Subject: Re: [jsword-devel] gsword
> To: yighu at yahoo.com, 	J-Sword Developers Mailing List
> 	<jsword-devel at crosswire.org>
> Message-ID: <498071C6.3010302 at gmx.net>
> Content-Type: text/plain; charset=UTF-8
> 
> Yiguang Hu wrote:
> > Dear brother/sisters,
> > 
> > I got some time during the Christmas and exposed some
> of the JSword functions onto the web (based on lots of
> discussions on this list long time ago). I call it gsword
> since I used groovy and grails for this work. The xslt is
> done on the server side because I run into problems before
> when the xslt is done through javascript.
> > 
> > 
> > http://rock.ccim.org:8080/gsword/gbook/init
> > 
> > I might need a separate module to make this public
> through crosswire since it will not compile from javac
> though it depends on jsword. 
> > 
> > Yiguang
> > 
> 
> Hi Yiguang,
> 
> Just had another look. You are clearly continueing to
> improve looks. It
> looks nice. When do you think you will make it available
> for
> installation etc?
> 
> Another matter - the ESV is copyrighted. This means, while
> we at
> CrossWire are allowed by the publisher to distribute the
> module, you
> would need to seek your own and separate permissions to
> display  the
> text on the web. They might allow or might object. It is a
> matter
> totally unconnected to this being a CrossWire module etc.
> It might be
> better simply to put up some other not copyrighted text
> like the WEB.
> 
> Peter
> 

Thanks Peter,
I will remove ESV until I have a permit. I didn't give it much thought about this issue before.
I and a friend at ccim are changing the lay out as time permits.
I still need to improve the content lay out before it is available for more.

Yiguang

> 
> 
> ------------------------------
> 
> Message: 3
> Date: Wed, 28 Jan 2009 09:59:52 -0500
> From: DM Smith <dmsmith555 at yahoo.com>
> Subject: Re: [jsword-devel] JSword and Map/Image modules
> To: J-Sword Developers Mailing List
> <jsword-devel at crosswire.org>
> Message-ID: <498072E8.1090306 at yahoo.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> Brian Fernandes wrote:
> > To answer my own questions:
> >
> > 1) Map modules can be both hierarchical and simple
> lists. I should 
> > have realized that all the modules I talked about
> earlier were in fact 
> > Map modules; but two (FrarsiBibleAtlas and AbsMaps)
> were stored in gen 
> > book format? (not sure of the right terminology here).
> The other two 
> > were in dictionary format.
> >
> > So basically we'll have to make a small change to
> BD code to see which 
> > of these formats is being used and use a list or a
> tree accordingly.
> 
> This should be handled already. All dictionary modules are
> treated as 
> lists and all gen book modules are treated as trees.
> 
> >
> >
> > 2) NetMaps was not working because it's content is
> something like this:
> >
> > <br><br>Journey of Paul (JP) #1, grid
> D2<br><img 
> >
> src="/images/jp1.jpg"/><br><br>Journey
> of Paul (JP) #2, grid 
> > D2<br><img
> src="/images/jp2.jpg"/><br><br>Journey
> of Paul (JP) #3, 
> > grid D2<br><img
> src="/images/jp3.jpg"/><br><br>Journey
> of Paul (JP) 
> > #4, grid D2<br><img
> src="/images/jp4.jpg"/>
> >
> >
> > This is not valid XML as the <br> tags are not
> closed and the fallback 
> > code simply removes all tags in an effort to display
> something.
> >
> > If you replace <br> with <br/>, it works
> just fine. The THMLFilter 
> > class makes 3 attempts to parse the text.
> >
> > a) The first attempt is made after removing invalid
> '&' characters in 
> > the text.
> >
> > b) If the above fails, it does some further character
> clean up, 
> > removing disallowed characters from the XML.
> >
> > c) If this still fails, it simply removes all tags.
> >
> > Maybe we can add an additional step between b and c
> which would 
> > replace "<br>" with
> "<br/>"?  Or perhaps do it as part of step
> b. Any 
> > other tags like this which we may want to clean up?
> >
> > DM, what do you think? 
> The behavior of JSword certainly could be improved. The
> typical problem 
> that JSword encounters is a verse that is not well-formed
> XML. This can 
> readily happen in modules. I have tracked the problem to
> the following:
> - Modules built from IMP format and are not validated
> against the spec. 
> For ThML and OSIS, this should be both well-formed XML and
> valid against 
> the schema. Further for ThML it should only contain the
> SWORD supported 
> elements. For GBF, it should match the spec. When it is in
> IMP format, 
> there are no validation tools. Also, osis2mod is
> transformational to 
> what SWORD can handle. This is side stepped, which can
> cause problems.
> - OSIS modules in BSP structure can build verses that are
> not 
> well-formed. This causes problems for all front-ends. But
> for JSword it 
> is worse than all others. The version of osis2mod in SVN
> fixes this by 
> using milestoned versions of all
> - The module building tools do not validate input. It is
> expected that 
> the module creator does that first. In fact the module
> creators are 
> relatively brain-dead and merely look for start and end of
> verses and 
> pass everything in between as
> 
> Here is what I think the fallback mechanism should be
> changed by adding 
> another step (before the tag stripping):
> As each un-matched end element is encountered, an opening
> tag for that 
> element should be prefixed.
> As each un-matched begin tag is encountered, a closing tag
> for that 
> element should be suffixed.
> This is not trivial, essentially a quasi-xml streaming
> parser needs to 
> be written that uses a stack to know what is opened and
> what is closed. 
> And the insertions need to be written in the correct order.
> I say quasi because the xml parser standard requires it to
> fail on bad 
> input.
> 
> One of the reasons I advocate using an XML parser for our
> module creator 
> is that it would not allow input that is not well-formed.
> 
> The other thing would be to change the ThML filter to not
> use an XML 
> parser. This too is not trivial.
> 
> Bottom Line: The definition of ThML is that it is not a
> superset of html 
> but of xhtml. I don't think we should handle invalid
> ThML but only valid 
> ThML.
> 
> Karl is very responsive to fixing problems in his modules.
> (Yeah!!!) I 
> think that Karl should fix his module to be valid ThML.
> 
> In Him,
>     DM
> 
> 
> 
> 
> 
> ------------------------------
> 
> _______________________________________________
> jsword-devel mailing list
> jsword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/jsword-devel
> 
> 
> End of jsword-devel Digest, Vol 56, Issue 4
> *******************************************


      



More information about the jsword-devel mailing list