[sword-devel] HELP! Need your feedback on XML Markup Language

Bobby Nations sword-devel@crosswire.org
Thu, 30 Aug 2001 21:37:30 -0500

Kirt Christensen wrote:

> Being only slightly familiar with XML or Sword, I'll offer some limited
> thoughts.
> >       XML doesn't allow more than one hierarchy in a document.  Here's an
> >example of logical XML markup.
> >
> ><Book NAME="Genesis"><Chapter NUMBER="1"><Verse NUMBER="1">In the
> >beginning...</Verse>...</Chapter>...</Book>
> >
> >This is all fine and dandy, but what about <Quote></Quote>, Intro,
> >Paragraph, Red, Bold, Italic, etc!  Most of these things WILL cross over
> >the single hierachy limit of XML.

I didn't catch the initial posting, but I think that you could handle this
problem by making the verse tag an empty tag in the DTD like so.


That way, the verse tag would serve as a marker for the beginning of a new
verse but wouldn't actually surround the text.  That is you wouldn't see

<verse number=1>In the beginning .... </verse> ...

Instead, it would be

<verse number=1/>In the beginning, ....<verse number=2> ...

and so on.  At least potentially, that might work.

> I think that the above example is of attributes which are set for
> presentation.  Presentation in XML is controlled by a seperate layer of
> logic in XLS scripts. I wonder if Presentation attributes could be used for
> this?  Like below:
> <Book NAME="Genesis" FONT="Bold"><Chapter NUMBER="1"><Verse NUMBER="1"
> FONT="Red" >In the
> beginning...</Verse>...</Chapter>...</Book>

Generally, it's best when designing a tagging language using XML to leave the
presentation elements out of the XML entirely and let the XSL handle that
aspect of things.  That goes for quotes as well, since they're additions to the
original texts (that is, they weren't there in the Greek, Aramaic or Hebrew
originals).  That goes for all punctuation marks as well.

> As for the example below, why would a quote that spans two verses?  It
> sounds like a problem with the guys who organized the verse markers for our
> bible.

It's a bit late to rework the chapter and verse markup since it's been around
for so long as to become the accepted rendering.  Sometimes you've just got to
live with the legacy systems warts.

> I understand why some people might want to be able to access the
> quote information as an object or set of objects for review.  Personally,
> the quote is just another character in the verse and not significant
> logically.
> >
> ><Verse>Text for <Quote>a verse</Verse><Verse>text for the </Quote>next
> >verse</Verse>
> >
> >
> >       What do you guys think?
> >
> >               -Troy.

I think that you're dead on about that being invalid, but, I don't think that
this has to be a show stopper for using XML.  Rather it's more of an
interesting design problem.

The real fun, in my opinion, will come with trying to figure out ways to tie in
all of the legitimate additions such as translators notes and alternate


Bobby Nations

> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp