[sword-devel] Sword support of indents and line breaks

DM Smith dmsmith at crosswire.org
Sat Apr 13 07:29:33 MST 2013


On Apr 13, 2013, at 9:24 AM, Nic Carter <niccarter at mac.com> wrote:

> 
> On 13/04/2013, at 11:09 PM, DM Smith <dmsmith at crosswire.org> wrote:
> 
>> I would add that the new HTML filter is a work in progress. It is moving to class attributes as a way to abstract presentation out of the filter.
>> 
>> This is goodness. I'd recommend that we take the OSIS spec and create a mapping of each element to the corresponding HTML element and class variables (i.e. a design doc, fancy that ;)
>> 
>> A full implementation would represent all OSIS in HTML and move presentation to the front-end, where it belongs.
> 
> Having looked briefly at this, I gave up. I couldn't figure out how to deal with the BCV model output, given that the input is the other model. At least, to me it seemed like we needed a major refactoring of how the filters work. I think it was BPBible that I was looking at that had done things quite differently to handle this? But given we have both the need to be able to correctly display a single verse by itself as well as a verse in it's context, it appeared that the filters needed some sort of state saved so we knew what sorts of containers we are currently in and which we are currently not in?
> My understanding led me to realise that <br /> was the wise choice to use throughout the filters, rather than trying to deal with opening and closing <p> markers depending on how many verses in context were currently being displayed?
> 
> But this is just my quick interpretation based on trying to add bits and pieces to the filters over the last three years... Which reminds me, did I ever submit a patch for getting OSIS underline working in osishtmlhref?
> 
> My quick 2 cents...  :)
> 
> 
> Thanks, ybic
> 	nic...  :)
> 
> ps: sure, this may just be a challenge for someone to prove how wrong I am and how quick and easy it is to get this all working properly?

Don't you love it when a thread gets hijacked! ;)

As the maintainer of osis2mod I've been thinking about this for years. It is not an easy problem to solve.

Recently, I've been coming to the conclusion that we need two filters (or a context flag) to distinguish between display of verse in context and verse in isolation.

The basic difference between the two is that inter-verse vertical whitespace is nearly eliminated for verse in isolation.

The problem of verse in isolation is that it is used in a context where the verse may have begin tags w/o end tags or visa versa.

osis2mod solves this by converting from BSP to BCV. If osis2mod did not do this (leaving the doc as BSP) but left it to the filter to close or remove these when used in isolation, this would help.

I'm working on JSword to allow this.

In Him,
	DM




More information about the sword-devel mailing list