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

DM Smith dmsmith at crosswire.org
Fri May 31 06:41:26 MST 2013


Regarding your <br /> rule. I think it is generally good. But I'm wondering whether the rule should be that 3 or more are condensed to two (instead of 2+ into 1).

I think regarding titles, most HTML renders them with extra vertical whitespace (half line above and below), so it'd be good to consider it as 2 high.

In looking at the <div> issue again. There is one use of <div> that is non-standard.

In OSIS, <p> is the only document level container that cannot be milestoned. osis2mod replaces <p>...</p> with <div sID="xxx" type="paragraph"/>...<div eID="xxx" type="paragraph"/>, where xxx is unique in the doc. (Ostensibly, this is bad OSIS, which Chris has aptly pointed out.)

These should produce vertical whitespace.

In Him,
	DM

On May 29, 2013, at 11:53 PM, "Troy A. Griffitts" <scribe at crosswire.org> wrote:

> Just checked in another update for the whitespace issues.
> 
> This checkin attempts to track vertical whitespace by counting block and <br/> output and mutes more than 2 contiguous vspace directives.
> 
> e.g., This was changed in the osisReference output:
> 
> </tbody></table>
> <br />
> <br />
> 
> to:
> 
> </tbody></table>
> <br />
> 
> Question: should <h...> directives be automatically considered 2 vspace.  I am only counting them as 1 right now. e.g., should
> <h1>Title</h1>
> <br />
> 
> be changed to simply:
> 
> <h1>Title</h1>
> 
> ?
> 
> I'm thinking so, but other 'block' tags I'm only ++ the vspace counter.  It's simply enough to +=2 the counter for <h...> tags.
> 
> Hope I didn't break too much.
> 
> Troy
> 
> 
> 
> On 05/21/2013 05:55 PM, Troy A. Griffitts wrote:
>> Thanks for the feedback Peter. I'm not sure I understand what you mean. Could you give me a line in the OSISReference document which you feel is not rendered well.
>> 
>> I just checked in an update which has preliminary support for tables, sub, and super. Here's the latest output:
>> 
>> <h1 class="bookHeader">Old Testament</h1>
>> 
>> <h1 class="bookHeader">THE FIRST BOOK OF MOSES CALLED GENESIS</h1>
>> 
>> <h1 class="bookHeader">Introduction and Outline</h1>
>> 
>> <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><span class="sup">1</span>Creation of Heaven and Earth, 1:1-2:4a</li>
>> <li><span class="sup">2</span>Creation of Man and Woman, 2:4b-25</li>
>> <li><span class="sub">3</span>Fall, 3:1-24</li>
>> <li>...</li>
>> </ul>
>> <br />
>> <br />
>> Tables work like this: <table><tbody>
>> <tr> <td><b>Column 1 Label</b></td> <td><b>Column 2 Label</b></td> </tr>
>> <tr> <td>Column 1, Row 1</td> <td>Column 2, Row 1</td> </tr>
>> <tr> <td>Column 1, Row 2</td> <td>Column 2, Row 2</td> </tr>
>> </tbody></table>
>> <br />
>> 
>> <h2 class="chapterHeader">From Creation to Abraham (1:1–11:9)</h2>
>> 
>> 
>> <h3>Creation of the Heavens and the Earth</h3>
>> 
>> <br />
>> 
>> [ Genesis 1:1 ] In the beginning God created the heaven and the earth. <br />
>> 
>> <br />
>> 
>> [ Genesis 1:2 ] Text of verse 2.
>> 
>> 
>> 
>> 
>> On 05/20/2013 07:31 AM, Peter von Kaehne wrote:
>>> On Sun, 2013-05-19 at 22:29 -0700, Troy A. Griffitts wrote:
>>>> OK, so here's my latest cut at the whitespace issue.  From the
>>>> osisReference document here:
>>>> 
>>>> http://crosswire.org/svn/sword/trunk/tests/testsuite/osisReference.xml
>>>> 
>>>> ... we now get this output from the osisxhtml filter set when rendering
>>>> module top until Gen.1.2 (not the greatest output, but I believe a great
>>>> step forward, any comments?):
>>> Ok, I like what you have done. Question:
>>> 
>>> chapter group titles (Psalm 1-40, Sermon on the mount etc) and
>>> subsection titles are not catered for, or did I miss this?
>>> 
>>> Peter
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> 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




More information about the sword-devel mailing list