[sword-devel] XHTML Rendering of OSIS Reference Doc - Whitespace

DM Smith dmsmith at crosswire.org
Thu May 9 06:54:50 MST 2013


+1

I agree that OSIS uses divs in a different manner than HTML. IMHO, they should be ignored.

We've outlined best practices regarding div in the wiki. They bound Bible, testament, book, chapter and section. Regarding the first four there is no reason to introduce any whitespace. Regarding sections, the recommendation is that the content of a section has a title and possibly paragraphs, tables or poetry. If any of these are present at the start of a div then appropriate whitespace is (should be) introduced.

osis2mod also introduces a "pre-verse" div which merely marks the beginning and the end of where content coming before the verse is located. These divs should never be rendered in any fashion.

I think this will solve the majority of the whitespace issues.

The other vertical whitespace issues regard poetry, especially the <lg> element, and verse per line rendering (and other verse in isolation conditions).

Regarding horizontal whitespace, if it hasn't been done already, there should be some respect to the level attribute on an <l> element, at least as a HTML class attribute.

In Him,
	DM

On May 9, 2013, at 7:01 AM, "Troy A. Griffitts" <scribe at crosswire.org> wrote:

> 
> 
> On 05/08/2013 12:31 PM, Troy A. Griffitts wrote:
> 
> OK, so from this:
> 
>> <div sID="gen1" type="bookGroup"/> <h3>Old Testament</h3> <div osisID="Gen" sID="gen2" type="book"/> <h3>THE FIRST BOOK OF MOSES CALLED GENESIS</h3> <div sID="gen3" type="section"/> <h3>Introduction and Outline</h3> <br /> This is the <b>Book of Genesis</b>, the <i>first</i> book in the Bible. It may be outlined as follows: <br /><br /> <ul> <li><i>1</i>Creation of Heaven and Earth, 1:1-2:4a</li> <li><i>2</i>Creation of Man and Woman, 2:4b-25</li> <li><i>3</i>Fall, 3:1-24</li> <li>...</li> </ul> <br /><br /> Tables work like this: <b>Column 1 Label</b> <b>Column 2 Label</b> Column 1, Row 1 Column 2, Row 1 Column 1, Row 2 Column 2, Row 2 <br /><div eID="gen3" type="section"/>
>> <div sID="gen7" type="majorSection"/> <h3>From Creation to Abraham (1:1–11:9)</h3>
>> [ Genesis 1:1 ] In the beginning God created the heaven and the earth. <br />
>> [ Genesis 1:2 ] Text of verse 2.
> 
> As a first run, I'm going to shoot for this below.  Will this make everyone happy regarding whitespace?  Please ignore the poor table output-- that another issue.
> 
> <h3>Old Testament</h3>
> 
> <h3>THE FIRST BOOK OF MOSES CALLED GENESIS</h3>
> 
> <h3>Introduction and Outline</h3>
> 
> <br />
> This is the <b>Book of Genesis</b>, the <i>first</i> book in the Bible. It may be outlined as follows:<br />
> <br />
> <ul>
>    <li><i>1</i>Creation of Heaven and Earth, 1:1-2:4a</li>
>    <li><i>2</i>Creation of Man and Woman, 2:4b-25</li>
>    <li><i>3</i>Fall, 3:1-24</li>
>    <li>...</li>
> </ul>
> <br />
> <br />
> Tables work like this: <b>Column 1 Label</b> <b>Column 2 Label</b> Column 1, Row 1 Column 2, Row 1 Column 1, Row 2 Column 2, Row 2 <br />
> <h3>From Creation to Abraham (1:1–11:9)</h3>
> 
> [ Genesis 1:1 ] In the beginning God created the heaven and the earth. <br />
> [ Genesis 1:2 ] Text of verse 2.
> 
> ________________________________
> 
> 
> Really, thanks for all the feedback on the removal of the divs and otherwise.  I am sorry to force this thread to concentrate on an immediate solution for release.  I'm happy to talk future solutions and value your input for those.  I just need your help on this solution right now.
> 
> Nic, regarding round-trip, the OSISXHTML Render filter wouldn't be used for the round-trip.  We would use the OSISOSIS filter for that (it goes from "SWORD annotated OSIS" (like the x-preverse stuff and any other augmentation we might make in the markup to help with our on-demand internal processing) -> OSIS proper.  So, we can strip the divs out in the OSISXHTML Render filter and not worry about breaking the round-trip.
> 
> Thanks for the input!
> 
> Troy
> 
> _______________________________________________
> 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