RE: [xsl] [XSL] extracting a verse [long]

Subject: RE: [xsl] [XSL] extracting a verse [long]
From: Jim_Albright@xxxxxxxxxxxx
Date: Thu, 19 Dec 2002 16:29:32 -0500
Thank you all for your interest and help on this problem. I am in the
middle of converting legacy flat files to XML using a program called C2X
and then doing several XSL Transformations to get to the XML that I want.
(XSEM. See
http://www.sil.org/computing/xsem/documentation/Documentation.html)  I will
keep you informed on merits of the various approaches as soon as I get the
whole Bible transformed into XSEM. Right now I have the New Testament and
Genesis to Isaiah done.

The problem domain is in three parts.
The first is serving Scripture up on the Web. People may want to see just
the Scripture by verse. Thus the need to serve up just the verse.
The second domain is in checking for correct markup and translation. I am
leaning on the ability to just jump to a verse based on its id. This would
not mean serving up just one verse or verse range then.
The third domain is in making dramatized scripts for recording an audio
dramatized version of the Scripture I will need  a quote centric model of
the text.

My first impressions of all so far is to make transformations to verse
centric and quote centric models to work from. Then serving up verse or
quote is trivial. But I will see how much processing power it takes to do
the suggested transformations. You guys/gals are great at coming up with
ideas. Thanks again.

Here is a bit more of the sample text to see some more of the complexity.

All verses and verseEnds have unique IDs.
   <text>
      <div>
         <chapter id="BCV-GEN-1" to="BCV-GEN-1-END" value="1"/>
         <head>The Story of#Creation
</head>
         <p>
            <verse id="BCV-GEN-1.1" to="BCV-GEN-1.1-END" value="1"/>In the
beginning, when God created the universe,
<note type="translation">
               <refText>In#the#beginning . . . the universe;
</refText>or<reading> In the beginning God created the universe;
</reading>or<reading> When God began to create the universe.</reading>
            </note>
            <verseEnd id="BCV-GEN-1.1-END" from="BCV-GEN-1.1"/>
            <verse id="BCV-GEN-1.2" to="BCV-GEN-1.2-END" value="2"/>the
earth was formless and desolate. The raging ocean that covered everything
was engulfed in total darkness, and the Spirit of God
<note type="translation">
               <refText>the#Spirit#of God; </refText>or<reading> the power
of God; </reading>or<reading> a wind from God; </reading>or<reading> an
awesome wind.</reading>
            </note> was moving over the water.<verseEnd id
="BCV-GEN-1.2-END" from="BCV-GEN-1.2"/>
            <verse id="BCV-GEN-1.3" to="BCV-GEN-1.3-END" value="3"/>
            <note type="xref">[1:3] <canonRef book="2MA" chapter="7" verse
="28"/>
               <canonRef book="2CO" chapter="4" verse="6"/>
            </note> Then God commanded,
<q to="Q-BCV-GEN-1.3-00002-END" id="Q-BCV-GEN-1.3-00002"/>Let there be
light<qEnd from="Q-BCV-GEN-1.3-00002" id="Q-BCV-GEN-1.3-00002-END"/>
|amp|ccBridge;and light appeared.<verseEnd id="BCV-GEN-1.3-END" from
="BCV-GEN-1.3"/>
            <verse id="BCV-GEN-1.4" to="BCV-GEN-1.4-END" value="4"/>God was
pleased with what he saw. Then he separated the light from the
darkness,<verseEnd id="BCV-GEN-1.4-END" from="BCV-GEN-1.4"/>
            <verse id="BCV-GEN-1.5" to="BCV-GEN-1.5-END" value="5"/>and he
named the light
<q to="Q-BCV-GEN-1.5-00003-END" id="Q-BCV-GEN-1.5-00003"/>Day<qEnd from
="Q-BCV-GEN-1.5-00003" id="Q-BCV-GEN-1.5-00003-END"/> and the darkness
<q to="Q-BCV-GEN-1.5-00004-END" id="Q-BCV-GEN-1.5-00004"/>Night.<qEnd from
="Q-BCV-GEN-1.5-00004" id="Q-BCV-GEN-1.5-00004-END"/> Evening passed and
morning came|amp|ccBridge;that was the first#day.
<verseEnd id="BCV-GEN-1.5-END" from="BCV-GEN-1.5"/>
         </p>
         <p>
            <verse id="BCV-GEN-1.6-7" to="BCV-GEN-1.6-7-END" value="6-7"/>
            <note type="xref">[1:6] <canonRef book="2PE" chapter="3" verse
="5"/>
            </note> Then God commanded,
<q to="Q-BCV-GEN-1.6-7-00005-END" id="Q-BCV-GEN-1.6-7-00005"/>Let there be
a dome to divide the water and to keep it in two separate places<qEnd from
="Q-BCV-GEN-1.6-7-00005" id="Q-BCV-GEN-1.6-7-00005-END"/>|amp|ccBridge;and
it was done. So God made a dome, and it separated the water under it from
the water above it.<verseEnd id="BCV-GEN-1.6-7-END" from="BCV-GEN-1.6-7"/>
            <verse id="BCV-GEN-1.8" to="BCV-GEN-1.8-END" value="8"/>He
named the dome
<q to="Q-BCV-GEN-1.8-00006-END" id="Q-BCV-GEN-1.8-00006"/>Sky.<qEnd from
="Q-BCV-GEN-1.8-00006" id="Q-BCV-GEN-1.8-00006-END"/> Evening passed and
morning came|amp|ccBridge;that was the second#day.
<verseEnd id="BCV-GEN-1.8-END" from="BCV-GEN-1.8"/>
         </p>
         <p>
            <verse id="BCV-GEN-1.9" to="BCV-GEN-1.9-END" value="9"/>Then
God commanded,
<q to="Q-BCV-GEN-1.9-00007-END" id="Q-BCV-GEN-1.9-00007"/>Let the water
below the sky come together in one place, so that the land will appear<qEnd
from="Q-BCV-GEN-1.9-00007" id="Q-BCV-GEN-1.9-00007-END"/>|amp|ccBridge;and
it was done.<verseEnd id="BCV-GEN-1.9-END" from="BCV-GEN-1.9"/>
            <verse id="BCV-GEN-1.10" to="BCV-GEN-1.10-END" value="10"/>He
named the land
<q to="Q-BCV-GEN-1.10-00008-END" id="Q-BCV-GEN-1.10-00008"/>Earth,<qEnd
from="Q-BCV-GEN-1.10-00008" id="Q-BCV-GEN-1.10-00008-END"/> and the water
which had come together he named
<q to="Q-BCV-GEN-1.10-00009-END" id="Q-BCV-GEN-1.10-00009"/>Sea.<qEnd from
="Q-BCV-GEN-1.10-00009" id="Q-BCV-GEN-1.10-00009-END"/> And God was pleased
with what he saw.<verseEnd id="BCV-GEN-1.10-END" from="BCV-GEN-1.10"/>
            <verse id="BCV-GEN-1.11" to="BCV-GEN-1.11-END" value="11"/>Then
he commanded,
<q to="Q-BCV-GEN-1.11-00010-END" id="Q-BCV-GEN-1.11-00010"/>Let the earth
produce all kinds of plants, those that bear grain and those that bear
fruit<qEnd from="Q-BCV-GEN-1.11-00010" id="Q-BCV-GEN-1.11-00010-END"/>
|amp|ccBridge;and it was done.<verseEnd id="BCV-GEN-1.11-END" from
="BCV-GEN-1.11"/>
            <verse id="BCV-GEN-1.12" to="BCV-GEN-1.12-END" value="12"/>So
the earth produced all kinds of plants, and God was pleased with what he
saw.<verseEnd id="BCV-GEN-1.12-END" from="BCV-GEN-1.12"/>
            <verse id="BCV-GEN-1.13" to="BCV-GEN-1.13-END" value
="13"/>Evening passed and morning came|amp|ccBridge;that was the third#day.
<verseEnd id="BCV-GEN-1.13-END" from="BCV-GEN-1.13"/>
         </p>
.....


Jim Albright
704 843-0582
Wycliffe Bible Translators





 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread