Skip to content

Commit

Permalink
adding chapterversereference
Browse files Browse the repository at this point in the history
  • Loading branch information
vicmortelmans committed Aug 23, 2012
1 parent e1657c9 commit e51c433
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions bible/bibleref.xml
Expand Up @@ -123,6 +123,7 @@
<book>{book}</book>
<localbook>{localbook}</localbook>
<chapterversereference>{chapterversereference}</chapterversereference>
<verseinbook>{verseinbook(osisbook,chapter,verse)}</verseinbook>
<chapter>{chapter}</chapter>
<verse>{verse}</verse>
<phrase>{phrase}</phrase>
Expand Down Expand Up @@ -363,6 +364,19 @@
num += key[m[0]];
return num;
}
function verseinbook(osisbook,chapter,verse)
{
var sum = 0;
for (c in bookoutlinerecord.chapter)
{
if (c.@number < chapter)
{
sum += c.@number_of_verses;
}
}
sum += verse;
return sum;
}
/* functions for determining the function of separators */
Expand Down

0 comments on commit e51c433

Please sign in to comment.