[sword-devel] Poetry Encoding

DM Smith dmsmith at crosswire.org
Mon Mar 30 07:33:00 MST 2009


David (Mailing List Addy) wrote:
> On Friday 27 March 2009 08:39:34 am Chris Little wrote:
>   
>> <l> may only occur within <lg>
>>     
>
> So then, are all <lg>'s orthographic or poetic lines? Or at least 
> supposed to be only orthographic or poetic lines? I ask so I can 
> determine some sort of logic for interpreting <lg>'s and if they are 
> poetry/orthographic automatically and formatting accordingly

I don't know that one can conclude that <lg> is solely used for those 
two purposes. OSIS has two ways of creating a new line in a flow of 
text: <l>...</l> and <lb/>. In earlier editions of OSIS, both could 
occur only in <lg>. Now, <lb/> can occur outside of it.

When doing a programmatic conversion of text into OSIS, there is some 
level of analysis that needs to be done to map source markup to target 
markup. Such a map is best when it can take context into consideration. 
But invariably, a map will produce valid, but inappropriate markup.

I find that source material sometimes (frequently???) doesn't care about 
correctness of markup but only resultant appearance. E.g. <br/> and 
&nbsp; used to break lines and introduce spacing. This might indicate 
poetry, but it might also indicate something else. (E.g. While not 
pertaining to line groups, I frequently see <p/>, the empty paragraph, 
being used to separate paragraphs or add a blank line.)

While <lg> may have been designed for poetry and such, it can be used 
for any purpose. E.g. a FAQ with Q and A being separate lines and each 
pair being a line group.

There are no predefined types for <lg>, but it would be appropriate to 
distinguish usage on it using x-type (e.g. x-poetry, x-orth, x-faq) but 
I'm pretty sure that frontends won't care about x-type attributes as 
they are non-standard.

In Christ,
    DM



More information about the sword-devel mailing list