[jsword-svn] r1186 - trunk/jsword-web/src/web

dmsmith at www.crosswire.org dmsmith at www.crosswire.org
Mon Nov 13 14:57:37 MST 2006


Author: dmsmith
Date: 2006-11-13 14:57:36 -0700 (Mon, 13 Nov 2006)
New Revision: 1186

Modified:
   trunk/jsword-web/src/web/passage.html
Log:
updated the passage design

Modified: trunk/jsword-web/src/web/passage.html
===================================================================
--- trunk/jsword-web/src/web/passage.html	2006-11-13 13:32:18 UTC (rev 1185)
+++ trunk/jsword-web/src/web/passage.html	2006-11-13 21:57:36 UTC (rev 1186)
@@ -70,15 +70,9 @@
 In some languages the number is followed by a '.' as in 1. Moses.
 Names may be abbreviated by simple truncation, such as 1 Cor or 1co.
 Or abbreviated in other ways Jn for John, Jas for James, SOS for Songs.
+Names may also have internal abbreviations, such as Revelation of St. John.
+Abbreviations may or may not be followed by a '.'
 </p>
-<p>
-In the diagram, a book name may begin with a leading number, and is followed by an optional punctuation and a sequence of one or more words.
-From an ease of programming, a reasonable compromise is to gather everything until a digit, range character or a sepaator is found.
-</p>
-<p>
-The diagram allows for a name of one book to be followed without a separator by another as in "Gen Lev."
-This has to be distinguished from books with multi-word names as in "Gen Song of Songs Mal".
-</p>
 <h3>Chapter recognition</h3>
 <p>
 When a number follows a book name, it seems fairly easy to know that it is a chapter.
@@ -88,19 +82,82 @@
 But it is equally permissible for it to be written as Jude 1:3.
 </p>
 <p>
-What this points out is past the book name everything needs too be interpreted in terms of its contextual basis.
-The context of a chapter is its book. An example where that comes into play:<br/>
-Gen 1,3 - Gen is the context of 1 and because 1 has no verse, the 3 is a chapter as well.
+A chapter may also be prefixed with "ch" or "chap" to make it explicit that the number following is a chapter.
+Note that these abbreviations are fixed, but not case sensitive and are not internationalized.
+It may be followed by a period.
 </p>
 <h3>Verse recognition</h3>
 <p>
-When a number follows a chapter number, it might also seem to be a trivial identification.
-But there odd, very rare situatons where that does not work (e.g. Gen 2 2 Peter)
-A number that follows a verse number typically is a verse number, For example:<br/>
-Gen 2 3 5 - should be understood as Gen 2:3,5.
+When a number follows a chapter number, it almost always is a verse number.
+But there odd, very rare situatons where it is not, explained below.
 </p>
-<h3>Non Contiguous Chapters and Verses.</h3>
 <p>
+A verse may also be prefixed with "v" or "ver" to make it explicit that the number following is a verse.
+Note that these abbreviations are fixed, but not case sensitive and are not internationalized.
+It may be followed by a period.
 </p>
+<h3>Ranged References</h3>
+<p>
+A biblical reference may specify a range using a '-' to separate two simple references. The range starts
+with the first verse in the first reference and ends with the last verse of the second reference.
+The references may be of any kind; book alone; book and chapter; or book, chapter and verse.
+</p>
+<p>
+A special range marker is 'ff', which means to the end. It can only follow a chapter, where it means
+the last chapter in a book, or a verse where it means the last verse in a chapter.
+It may or may not be preceded by a '-'. Examples include: Gen 22-ff, Gen 22ff, Gen 2:3-FF.
+</p>
+<h3>Non-Contiguous References.</h3>
+<p>
+Also a biblical reference may contain books, chapters or verses that are not next to each other.
+For example Gen 1, 3, would refer to chapters 1 and 3 of Genesis. Gen 1:3,5 would refer to
+verses 3 and 5 of Genesis chapter 1. Gen 1:3,2:5 refers to 2 verses in 2 chapters. Gen, Deut
+would refer to the entire books of Genesis and Deuteronomy.
+</p>
+<p>
+It is perfectly valid to write a range consisting of adjacent numbers as a Non-Contiguous Reference,
+e.g. Gen 1:4,5.
+<h3>Passage Punctuation</h3>
+<p>
+In a passage, punctuation has the following meaning:
+</p>
+<table>
+<tr><td>'-'</td><td>Specifies a range</td></tr>
+<tr><td>',' or ';'</td><td>Terminates a reference and introduces another.</td></tr>
+<tr><td>':'</td><td>Separates a chapter from a verse.</td></tr>
+<tr><td>'.'</td><td>Separates a chapter from a verse when it follows a chapter.<br/>
+Otherwise, it denotes an abbreviation.</td></tr>
+<tr><td>Other</td><td>Treated as a space</td></tr>
+</table>
+<p>
+Multiple spaces are treated as one. Other than '-', the others are optional.
+</p>
+<p>
+An example of a fully formed passage: 1 Ptr 3:3-5,7;Rev 9-10:4,5,14:2
+</p>
+<h3>Disabmiguation</h3>
+<p>
+With punctuation being mostly optional, this will lead to ambiguity. Rules are needed to disambiguate.
+The following principles should be practiced.
+</p>
+<ul>
+<li>Greedy - In determining a reference, as much of the input should be used as possible when parsing from left to right.</li>
+<li>Successful - Greedy should never invalidate what follows.</li>
+</ul>
+<p>
+A number belongs to the book name that follows, if it requires a number to be successful.<br/>
+e.g. John 2 Peter 1:4 becomes John; 2 Peter 1:4 since John 2; Peter 1:4 would fail.<br/>
+However, John 2 John 3:4 must be John 2, John 3:4, since 2 John only has 1 chapter.<br/>
+But, John 2 John 12 could be either John; 2 John 12 or John 2; John 12.
+The latter will be chosen because the 2 is not necessary to go with John 12.
+</p>
+<p>
+A number that follows a chapter could be understood as either a chapter or a verse, as in Gen 2 3.
+However, we will take it as the verse, becoming Gen 2:3, not Gen 2,3.
+</p>
+<p>
+A number that follows a verse is another verse number, as Gen 2:3 4 becomes Gen 2:3,4.
+Unless of course it is part of the name that follows, as in Gen 2:3 3 Peter 2, which becomes Gen 2:3; 3 Pet 2.
+</p>
 </body>
 </html>




More information about the jsword-svn mailing list