[jsword-devel] Handling of titles
Chris Burrell
chris at burrell.me.uk
Tue Apr 9 14:05:12 MST 2013
Hi DM
I've updated against the latest version, but JSword still seems to be
outputting xgen titles with the verse 0 inside. For example, for Exo
3:5-5:12
I get the following titles in the OSIS:
<title type="x-gen">Exodus 3:5-22</title>
<title type="x-gen">Exodus 4</title>
<title type="x-gen">Exodus 5:0-12</title>
Can you point me to where you made a change around this? Also, any chance
you can point me to the commit/patch for simple.xsl. I'll have to integrate
that to STEP as well.
Chris
On 28 February 2013 13:57, DM Smith <dmsmith at crosswire.org> wrote:
> The OSIS module builder, osis2mod, creates markup for material that stands
> before the verse number. JSword needed to be changed to handle this.
>
> FYI, a module does not have the <verse> tag in it. It is the
> responsibility of the engine (SWORD/JSword) to support the frontend in
> putting in that number. SWORD and JSword handle it differently. In JSword,
> we put back in the verse number. In SWORD, they split the content into two
> parts that can be retrieved independently.
>
> I changed how JSword figures out where to put the verse tag.
>
> In the past, JSword merely wrapped the content from the module (having
> been converted to OSIS) with a verse element. Then the xslt when handling
> the verse element, pulled titles and put them before the verse.
>
> Now, JSword iterates through the OSIS content looking for the best place
> to split the content. Basically, it looks for the last element to have
> subType="x-preverse" to be the split.
>
> In looking at this, I examined all Bible modules in all repositories and
> looked at Psalm 3:0-2 for misplaced verse markers. The reason for this is
> that Psalm titles are canonical and are not marked up well in modules. The
> reason to include 0 and 2 is that some modules put the title in verse 0.
> Others have the title as verse 1.
>
> I found that titles marked type="psalm" may not have been marked
> subType="x-preverse" and canonical="true". I adjusted the code to update
> these if there were not conflict.
>
> The upshot of this is that the xslt can now be simpler. It can handle the
> title directly, not within the verse container.
>
> Doing that fixes an existing bug in the stylesheet. It would not show
> titles in verse 0 if they were marked x-preverse. There were a lot of these.
>
> So you may want to grab a new copy of simple.xsl from Bible Desktop. It
> has a number of other improvements as well.
>
> In Him,
> DM
> _______________________________________________
> jsword-devel mailing list
> jsword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/jsword-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20130409/b95f5283/attachment.html>
More information about the jsword-devel
mailing list