[osis-users] Validation related OSIS questions

Peter von Kaehne refdoc at gmx.net
Tue Nov 13 14:48:17 MST 2012


On 13/11/12 16:29, Markku Pihlaja wrote:
> Thanks again!
>
> I'll first give you one further question and then comment on your
> previous answers.
>
> What would be a good way of including language versions of verse and
> chapter id's in the markup? I previously checked here that osisID's have
> to use the standard keywords and syntax. But I'd love to be able to
> supply the Finnish abbreviation of each verse as additional information.
> That is: when the osisID of a verse is "Gen.3.8", it would make life
> much easier for utilizers of this OSIS file if the verse also somehow
> contained the Finnish standard notation "1. Moos. 3:8".

I think this is in general total overkill. Assuming you are not creating 
an OSIS document because OSIS so beautiful, but you are creating an OSIS 
document in order to use it in software you have two problems:

1) how to find a Finnish referenced verse ("1. Moos. 3:8") or verse range,

2) ensure appropriate display of references.

Both can be easily solved without having this kind of information a 
million times repeated within the text.

For (1) you need a parsing solution which will parse arbitrary Finnish 
references and create an OSIS reference from that. CrossWire's Sword 
library does that and does it well.

For (2) - again, this is a matter of simple lookup in a table during 
rendering. Again, the Sword library would solve that for you.

In essence, you should not look at the OSIS references as English 
abbreviations but as tokens for the computer which happen to be somewhat 
similar to English abbreviations.

> The "obvious" way would be to be able to add a new attribute to the
> verse tag, like:
> <verse osisID="Gen.3.8"  sID="Gen.3.8" FI_ID="1. Moos. 3:8" />
> but that probably isn't possible, is it? Or can I somehow declare new
> custom attributes like Chris declared new custom dash entities in his
> last reply?

As an aside, any extra attributes you wish to use should look like 
x-MyAttribute. so, here e.g. "x-fi_ID"

> 2012/11/8 Peter von Kaehne <refdoc at gmx.net <mailto:refdoc at gmx.net>>
>
>      > I'd like to be able to use some code or entity instead of an
>     actual dash
>      > characters (– or —), at least in some places, since we have two
>      > different semantics for the dashes and I'd like to keep them
>     separate in the code.
>
>     Don't have an answer for that, but what is the semantic and is there
>     not a better way to code it than the somewhat arbitrary length of a
>     dash character?
>
>
> That's a fair question. Indeed it would be nice to find a better way
> (I'm not using the length to separate these cases but just different
> notations of the same length), but I haven't (at least yet) found the
> better way.
>
> The two different cases are normal em dashes within sentences as
> punctuation – just like the dashes in this sentence – and then to
> indicate a range of chapters and verses in some headings. The latter is
> not in the markup but in the content to be printed (or otherwise shown
> to the reader). For example: "Second Speech of Moses (4:44–11:32)" just
> before Deut.4.44. The range has been included in the official
> translation by the translation committee and thus cannot be omitted.

References as part of titles exist in OSIS and would encode what you 
want to encode.
>
> At least in Finnish we nowadays use the em dash to indicate ranges as
> well as punctuation. And I'd just like to enable the users of this OSIS
> file to search for one or the other without getting ambiguous or extra
> results.

So, if you encode the range properly your search should then go for the 
range/passage  rather than simply for a string of text which happen to 
look like a reference. Does this make sense?

>   2012/11/9 Chris Little <chrislit at crosswire.org
> <mailto:chrislit at crosswire.org>>
>
>         How would you suggest that an exception like this should be
>         coded? Add
>         some custom type attribute value to indicate special handling in
>         layout?
>
>
>     This was exactly the case for which <chapter> was made milestonable.
>     You can switch all of your chapter elements to milestones:
>
>
> I was hoping for some other solution. My impression is that these
> milestone versions of structure indicators weaken the value and
> usability of markup: I'd guess there are numerous tools that assume
> "strong" markup where at least the basic structures are marked with
> proper start and end tags instead of milestones.

You are right wrt generic xml tools. Specifically a DOM query or an 
XPATH expression based query which picks up what is easily described as 
a "child" of a verse or chapter is a lot more complicated to create if 
start and end tag are milestoned.

But - bear in mind again, the Sword library is a entirely different 
tool, not an XML tool and it is set up to give you fine grained access. 
Irrespective of XML niceties.

Peter





More information about the osis-users mailing list