[sword-devel] USFM conformance in usfm2osis.py

refdoc@gmx.net refdoc at gmx.net
Wed Aug 1 00:02:37 MST 2012

My immediate thought is, there is no USFM text which conforms to spec. And those that try to still vary in their interpretation and the semantics. So a tool to transform needs to be flexible and editable.
Sent from my HTC

----- Reply message -----
From: "Chris Little" <chrislit at crosswire.org>
To: "SWORD Developers' Collaboration Forum" <sword-devel at crosswire.org>
Subject: [sword-devel] USFM conformance in usfm2osis.py
Date: Wed, Aug 1, 2012 3:16 am

My new usfm2osis.py script is progressing quite nicely. I've got it generating valid OSIS from one Bible that uses a very minimal set of USFM elements. At the moment, I'm working to make it process all tags present within the USFM versions of the WEB and RV, and this has raised an issue.

I've been working primarily with the USFM reference from UBS ICAP, treating it as a sort of specification. My question is: should this new utility accept USFM that does not conform to the reference at UBS ICAP?

Should it accept & interpret USFM tags that are not present in the reference?

One specific example is that the WEB uses \fqa*, which is obviously intended as an end-tag version of \fqa (used to mark alternate translations). But the USFM reference does not identify this as a valid end-tag, by my reading.

So... should we...

a) Make the new utility accept non-conformant USFM (from the perspective of the USFM reference). I'm leery of this, since one of my reasons for writing the new utility was to keep it pristinely spec-conformant and I have a feeling we might start incorporating tags and syntax that are less obviously interpretable than \fqa*.

b) Write a separate utility to convert common and interpretable non-conformant tags/syntax to conformant markup.

c) Add a command-line switch to usfm2osis.py so that it performs a pre-processing step of making non-conformant tags/syntax into conformant markup. (This would be the same as option b, but would place everything in a single utility.)

d) Punt on the issue, and let those performing conversion deal with non-conformant markup on a case by case basis.


sword-devel mailing list: sword-devel at crosswire.org
Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20120801/e4d8671c/attachment.html>

More information about the sword-devel mailing list