<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">The n attribute is probably the best for what you want. It is useful for footnote markers, verse numbers (especially when the verse is really a passage, ala The Message), ...<div><br></div><div>So, the markup would be something like (not showing all attributes):</div><div> <div type="book" n="1. Moos."></div><div><chapter n="3"></div><div><verse n="8"></div><div><br></div><div>You typically wouldn't want to put the full reference on the verse.</div><div><br></div><div><br></div><div>In Him,</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>DM<br><div><div>On Nov 14, 2012, at 5:40 AM, Markku Pihlaja <<a href="mailto:markku.pihlaja@sempre.fi">markku.pihlaja@sempre.fi</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br></div><div>Thanks Peter,</div><div><br></div>I guess I need to enlighten you on the goals of our project a bit.<div><br></div><div>But since this is a rather lengthy explanation, I'll just mention to those who read my original questions that two questions still remain relevant:</div>
<div><br></div><div>-----------</div><div><br></div><div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px;background-color:rgb(255,255,255)">1) Is it possible to declare new custon attributes to tags, such as </div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px;background-color:rgb(255,255,255)"><verse osisID="Gen.3.8" sID="Gen.3.8" <b>x-FI_ID</b>="1. Moos. 3:8" /></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px;background-color:rgb(255,255,255)">and how do I do that, if it is possible?</div></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px;background-color:rgb(255,255,255)">2) Is this ok for encoding the same special character for different usages:</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px;background-color:rgb(255,255,255)">
<div><milestone type="x-punctuation-dash" marker="mdash" /></div><div><milestone type="x-range-dash" marker="mdash" /></div></div><div><br></div><div>-----------</div><div>
<br></div><div>And now to the explanation.</div><div><br><div>We are not creating a file solely for use for programmers to produce different electronic applications of the Bible. Actually, that might not even be our primary goal. Or well, it is one of two. The main point of this project is to update the official source version of the current official Finnish translation of the Bible, which was made in 1992. The source files are word processor files also from that time and in need of technical updating.</div>
<div><br></div><div>In addition to just updating the file format, we naturally also want to supply structural info about the contents instead of the more formatting oriented info in the old versions.</div><div><br></div><div>
There are two different main target groups for this source file. Those interested in electronic applications are one - a growing one, admittedly. But we also want to serve the more traditional target group: book publishers. This is why our goal is not to produce highly optimized XML code but rather consider also "readability" and "usability" of the code. Those words are in quotation marks because we're not talking in purely human reading. But we admit that the technical facilities of book publishers might not always be perfect, and in particular using some external library or coding in general might be quite an effort for some of them. So the processing might be half-human - that means for example using search & replace operations to produce the desired formatting for a printed product.</div>
<div><br></div><div>Including the Finnish abbreviation in every single verse might be an overkill, I admit. The abbreviation seldom gets printed into every verse. Usually not into every chapter, either. But for those cases when they do, we want to supply - as an alternative - something easier than code libraries and lookup tables. The extra x-FI-ID attribute would enable relatively simple search & replace operations to reach the goal. I also believe it might make things easier for the programmer as well.</div>
<div><br></div><div>I'm perfectly aware that from a purely technical point of view it does mean loads of redundant data. But in database terms, we don't need normal forms for our database, we'd rather supply more flexible alternative ways of processing the data.</div>
<div><br></div><div>-----------</div><div><br></div><div>As for encoding the ranges in titles as ranges: I will very probably do that. But I'm still keeping in mind the search & replace type of publisher / editor. Having done quite a lot of searching & replacing myself, I know how easy it is to do a global replace that accidentally turns also Bill Gates into Bsick Geatss ;), especially when dealing with too large amounts of data to confirm every replace. That was my original motivation for avoiding use of e.g. the actual em dash character "–" for several different purposes. And the display part of the range would still include the dash even though the range was encoded.</div>
<div><br></div><div>But yes, it certainly also makes sense to me what you suggest: that for an application it's definitely a better approach to search for a range markup than scan for characters that look like a range.</div>
</div><div><br></div><div>About the SWORD library:</div><div>We are planning to include some references to tools that can be utilized with our OSIS file and will be glad to mention SWORD there. But could you write me a "hard facts" nutshell about it? I tried browsing the SWORD website for a while but didn't really find some essential info, such as what programming language the library is for - and what exactly it is meant for. For example "Research manipulation of Biblical texts" doesn't really say much.</div>
<div><br></div><div>Markku</div><div><br></div><div><br></div><div>-----------</div><div><br></div><div class="gmail_quote">2012/11/13 Peter von Kaehne <span dir="ltr"><<a href="mailto:refdoc@gmx.net" target="_blank">refdoc@gmx.net</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 13/11/12 16:29, Markku Pihlaja wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks again!<br>
<br>
I'll first give you one further question and then comment on your<br>
previous answers.<br>
<br>
What would be a good way of including language versions of verse and<br>
chapter id's in the markup? I previously checked here that osisID's have<br>
to use the standard keywords and syntax. But I'd love to be able to<br>
supply the Finnish abbreviation of each verse as additional information.<br>
That is: when the osisID of a verse is "Gen.3.8", it would make life<br>
much easier for utilizers of this OSIS file if the verse also somehow<br>
contained the Finnish standard notation "1. Moos. 3:8".<br>
</blockquote>
<br></div>
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:<br>
<br>
1) how to find a Finnish referenced verse ("1. Moos. 3:8") or verse range,<br>
<br>
2) ensure appropriate display of references.<br>
<br>
Both can be easily solved without having this kind of information a million times repeated within the text.<br>
<br>
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.<br>
<br>
For (2) - again, this is a matter of simple lookup in a table during rendering. Again, the Sword library would solve that for you.<br>
<br>
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.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The "obvious" way would be to be able to add a new attribute to the<br>
verse tag, like:<br>
<verse osisID="Gen.3.8" sID="Gen.3.8" FI_ID="1. Moos. 3:8" /><br>
but that probably isn't possible, is it? Or can I somehow declare new<br>
custom attributes like Chris declared new custom dash entities in his<br>
last reply?<br>
</blockquote>
<br></div>
As an aside, any extra attributes you wish to use should look like x-MyAttribute. so, here e.g. "x-fi_ID"<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2012/11/8 Peter von Kaehne <<a href="mailto:refdoc@gmx.net" target="_blank">refdoc@gmx.net</a> <mailto:<a href="mailto:refdoc@gmx.net" target="_blank">refdoc@gmx.net</a>>><div class="im"><br>
<br>
> I'd like to be able to use some code or entity instead of an<br>
actual dash<br>
> characters (– or —), at least in some places, since we have two<br>
> different semantics for the dashes and I'd like to keep them<br>
separate in the code.<br>
<br>
Don't have an answer for that, but what is the semantic and is there<br>
not a better way to code it than the somewhat arbitrary length of a<br>
dash character?<br>
<br>
<br>
That's a fair question. Indeed it would be nice to find a better way<br>
(I'm not using the length to separate these cases but just different<br>
notations of the same length), but I haven't (at least yet) found the<br>
better way.<br>
<br>
The two different cases are normal em dashes within sentences as<br>
punctuation – just like the dashes in this sentence – and then to<br>
indicate a range of chapters and verses in some headings. The latter is<br>
not in the markup but in the content to be printed (or otherwise shown<br>
to the reader). For example: "Second Speech of Moses (4:44–11:32)" just<br>
before Deut.4.44. The range has been included in the official<br>
translation by the translation committee and thus cannot be omitted.<br>
</div></blockquote>
<br>
References as part of titles exist in OSIS and would encode what you want to encode.<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
At least in Finnish we nowadays use the em dash to indicate ranges as<br>
well as punctuation. And I'd just like to enable the users of this OSIS<br>
file to search for one or the other without getting ambiguous or extra<br>
results.<br>
</blockquote>
<br></div>
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?<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2012/11/9 Chris Little <<a href="mailto:chrislit@crosswire.org" target="_blank">chrislit@crosswire.org</a><br>
<mailto:<a href="mailto:chrislit@crosswire.org" target="_blank">chrislit@crosswire.org</a><u></u>>><div class="im"><br>
<br>
How would you suggest that an exception like this should be<br>
coded? Add<br>
some custom type attribute value to indicate special handling in<br>
layout?<br>
<br>
<br>
This was exactly the case for which <chapter> was made milestonable.<br>
You can switch all of your chapter elements to milestones:<br>
<br>
<br>
I was hoping for some other solution. My impression is that these<br>
milestone versions of structure indicators weaken the value and<br>
usability of markup: I'd guess there are numerous tools that assume<br>
"strong" markup where at least the basic structures are marked with<br>
proper start and end tags instead of milestones.<br>
</div></blockquote>
<br>
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.<br>
<br>
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.<span class="HOEnZb"><font color="#888888"><br>
<br>
Peter</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
osis-users mailing list<br>
<a href="mailto:osis-users@crosswire.org" target="_blank">osis-users@crosswire.org</a><br>
<a href="http://www.crosswire.org/mailman/listinfo/osis-users" target="_blank">http://www.crosswire.org/<u></u>mailman/listinfo/osis-users</a><br>
</div></div></blockquote></div><br>
_______________________________________________<br>osis-users mailing list<br><a href="mailto:osis-users@crosswire.org">osis-users@crosswire.org</a><br>http://www.crosswire.org/mailman/listinfo/osis-users<br></blockquote></div><br></div></body></html>