[sword-devel] osis2mod output (Bisaya-Inunhan NT)
Jonathan Marsden
jmarsden at fastmail.fm
Wed Apr 29 15:59:20 MST 2009
DM Smith wrote:
> No it is not a translator's error. It is correct.
>> If not, what versification schemes do have that verse, but are
>> otherwise compatible with KJV versification?
> NRSV
> AFAICT, this differs from the KJV in having 3 John 1:15 and Revelation
> 12:18.
Thanks. You definitely win the prize for providing me the most exactly
correct answer so far :)
> The OSIS manual gives the NRSVA as the standard (it is NRSV "with
> Apocrypha"). Here is our copy of it:
> http://crosswire.org/svn/sword-tools/trunk/versification/Bible.NRSVA.xml
OK. Good. Although that leads to: why doesn't SWORD use NRSV(A) as its
default, just as OSIS does, so that things match up naturally for OSIS
input files, which are the officially "best" way to get stuff into SWORD
nowadays?
Further, shouldn't osis2mod check what versification the input XML
specifies (or fails to specify and so implies), and then emit a warning
(or even just fail??) if that versification system is one that SWORD
does not know about? (Yet another osis2mod enhancement request from me!)
Similarly, since one can specify a versification system inside the OSIS
XML file, why does osis2mod need a -v switch to select a versification
system? Can't it just use the one specified in the XML input (and
default to the OSIS default, if one is not specified in the OSIS XML)?
>> More generally, how can a module developer find out which
>> versification schemes have a verse X Y:Z for any given values of book
>> X, chapter Y and verse Z?
This is going to become more and more important as more versifications
are added... your idea of an automatic versification identifier tool
sounds good, although it might be awkward (or need to be fairly smart!)
if in practice there is still a need to do the "well, it's sort of
nearly KJV, so let's just call it that" kind of thing that others have
suggested, at least for some modules (just not for this one).
> I have a question though, does someone have a portable C++ way to
> identify a new line? Mac, Windows and Unix use different combinations of
> \n and \r. At this time we don't care how the lines are ended in the
> file. As far as osis2mod cares, it is just a character that returns true
> to isspace(ch), that is, whitespace.
I *think* the standard C++ iostream library handles this for you, behind
the scenes, and you will see a '\n' on all platforms? That's from
memory, not recent actual use, though :)
>> But this kind of thing would need the ability for the library to
>> accept dynamically generated custom versifications, which at the
>> moment it does not seem able to handle? Is this something planned for
>> a future release? Or am I looking at this "all wrong"?
> Peter gave a good response to this. The problem with a dynamically
> generate custom versification is that it won't be mappable. Mapping is
> important to parallel display and to using references generated against
> one versification with a Bible using another.
Makes sense. You could maybe include a single mapping back to a
standard versification (NRSVA would seem logical, since it is OSIS's
standard!) with each custom mapping... that should be reasonable. If
you truly need to add N-1 different mappings when you add the Nth
versification, life is going to get really awkward long term -- no-one
will want to create 100 mappings just to add the 101st versification :|
>> One more minor request: osis2mod currently does not seem to accept XML
>> from stdin, either with just a module name parameter, or if you
>> specify - as the input filename. ...
> This would be good. Not sure if it is portable to Windows. I'm thinking
> that if a '-' is found where the input file name is expected it would
> read standard in. I used to know how to do this and it will take me a
> bit of time to remember. A patch or a snippet of code would be great!
> (I coded C++ from 1.0 up until 3.0 on a regular basis, but it has been
> too long since then, so help is appreciated!)
In old-fashioned C, you'd do:
FILE *f;
if ((filename[0] == '-') && (filename[1] == 0)) {
f = stdin;
} else {
f = fopen(filename, "r");
}
I'm not sure what the exact equivalent C++ is. It should work fine on
Windows too. The standard I/O library has stdin and stdout and stderr,
even under Windows :)
> Jonathan, again thanks. It is new users who help make the process easier.
Sure. I rather suspected that my becoming a novice user of the module
developer tools would find an issue or two ... I didn't expect to do so
quite this quickly, though :)
Jonathan
More information about the sword-devel
mailing list