[thelist] Marking up chapter.verse (or chapter.section)

Tim Luoma luomat at peak.org
Mon Dec 15 01:37:23 CST 2003


I'm trying to do this for Scripture (specifically the New Testament) but I 
suppose it would apply to a lot of things, especially legal documents 
which have chapters and sub-chapters.

I'm trying to figure out how to properly mark up the references using 
XHTML strict, both for styling purposes as well as reference.

To do this I would need to be able to reference by book, chapter, and 
verse.  Book is relatively easy, either link to chapter 1 or wrap the book 
in a DIV.

Chapter is easy, Matthew 1 becomes <a id="matthew1">Matthew 1</a>

Verses are where it all falls apart.  To quote a verse appropriate for the 
season (and hopefully without offense):

23 "Look, the virgin shall conceive and bear a son, and they shall name 
him Emmanuel," which means, "God is with us."

Now that would normally be referred to as "Matthew 1:23"... I guess the 
question is how to mark it up.  I suppose this is where XML might come in 
handy if I wanted to start making up my own tags

<christianbible>
<newtestament>
<matthew>
<chapter1>
<verse>
<23>
<q>Look, the virgin shall conceive and bear a son, and they shall name
him Emmanuel,</q> which means, <q>God is with us.</q>
</23>
</verse>
</chapter1>
</matthew>
</newtestament>
</christianbible>

That doesn't seem like a particularly good idea, not to mention the fact 
that it would take something like 5 years to code it all.

So... I guess that leaves me with XHTML strict so that I can use tools to
extract information out of it with some precision... but I'm stuck as to 
how it should be marked up.  Here's my goal:

1) Be able to style the verse number (23, in the example above).  I assume 
this means wrapping it in a tag of its own... is there anything better 
than: <span class="verse">23</span> ?

2) Be able to link to a verse.  This could be an ID if unique.... 
<span id="matthew1verse23" class="verse">23</span>

3) Be able to parse out a verse or range of verses (i.e. 20-23) which I 
guess depends on having a parser smart enough to figure out the markup we 
use.

For example, in #2 just above,  that wouldn't be helpful verse 23 is 
just the verse number, it isn't the verse itsel... so I guess that should be:

<span id="matthew1verse23">
<span class="verse">23</span>
"Look, the virgin shall conceive and bear a son, and they shall name
him Emmanuel," which means, "God is with us."
</span>

I guess I was hoping for something with a little more semantic value, but 
perhaps it doesn't exist.

Anyway, like I said it must be the same issue others have dealt with for 
legal documents, etc which use similar reference patterns.  What have 
others done to deal with it?

Thanks all
TjL



More information about the thelist mailing list