This article describes the process of creating your own lectionary for the Lectionary Viewer Addin.
Creating Your Own Lectionary
To create your own lectionary, you need to have a working knowledge of XML, because the data for each lectionary is stored in an XML file. It will also help to have some knowledge of HTML.
This process is best explained with a tutorial, so let’s create a very simple lectionary called the 'Christmas Lectionary'.
For our new lectionary to be shown in the Lectionaries feature of Libronix DLS, we must put the lectionary data file in a particular place. Open your "Documents" or “My Documents” folder, then open the “Libronix DLS” folder, and then open the “Lectionaries” folder. If there is no “Lectionaries” folder, you will need to create it inside the “Libronix DLS” folder. Make sure you spell the name of the folder correctly.
We’ll create our lectionary data file in the “Lectionaries” folder. Let’s call it “ChristmasLectionary.xml”. You can use your favorite text or XML editor to create the file.
You can also view or download the completed file: ChristmasLectionary.xml. (To view the file in your browser, simply click on the link. To download the file, right-click on the link, select “Save Target As...”, and place the file in the “Lectionaries” folder described above.)
Let’s start the XML file with the standard XML declaration.
The document element of our XML file is <lbx-lectionary>.
<lbx-lectionary category="Lectionaries" name="Christmas Lectionary">
The “category” attribute must be set to “Lectionaries”, and the “name” attribute should be set to the name of the file (minus the “.xml”).
The first thing to do with your lectionary is to set the title, description and (to give credit where credit is due) include the source. You do this in the <metadata> element:
<metadata> <title xml:lang="en">The Christmas Lectionary</title> <source>Public Knowledge</source> <description>The Christmas Lectionary -- a collection of the best nativity passages, strategically timed to reduce the stress of the Season.</description> </metadata>
The <title>, <source> and <description> elements contain the lectionary title, the source of the lectionary data and the purpose of the lectionary, respectively.
Notice the xml:lang attribute on the <title> element -- this is particularly important because the LectionaryViewer uses this to determine what language to render the Bible references in. If you are a building a Spanish lectionary, set xml:lang to "es".
Lectionaries can alternate readings so that you don't end up with the exact same readings on a particular day (i.e. Christmas Day) each year. To allow for alternating readings on different years, we assign a unique identifier for alternating years in a <years> element:
<years> <year id="A"> <title>Year A</title> </year> <year id="B"> <title>Year B</title> </year> </years>
To allow a lectionary reading to be categorized in a season (and to display a color per season), add a <season> element, with an identifier. The html-color attribute on the <color> element is the color that will be rendered to the HTML and the title within the <title> element is the season title that will be displayed above the day entry in the Lectionary Viewer:
<seasons> <season id="Christmas"> <title>Christmas</title> <color html-color="white">White</color> </season> </seasons>
Next we add a <day> to our <days> collection:
<days> <day id="ChristmasEve" season="Christmas">
Within our day, we create a reading set. It is possible to have multiple reading sets -- for instance, a "dawn" and "evening" set for Christmas Day. Here we will create an "evening" reading set for Christmas Eve:
<set number="1" type="evening"> <color html-color="white">White</color> <description></description> <titles> <title>Nativity of the Lord</title> <subtitle>Christmas Eve</subtitle> <subtitle>Proper 1</subtitle> </titles>
The <description> element can contain a more in-depth description of the reading set. The <title> and <subtitle> elements are displayed above the readings. Of course, the most important part of the reading set are the readings themselves:
<readings all="true"> <reading type="ot"> <passage>Isaiah 9:2-7</passage> </reading> <reading type="psalm"> <passage>Psalm 96:</passage> </reading> <reading type="nt"> <passage>Titus 2:11-14</passage> </reading> <reading type="gospel"> <passage>Luke 2:1-14 </passage> <passage optional="yes">Luke 2:15-20</passage> </reading> </readings>
Here are four readings, one from the Old Testament, one from the Psalms, one from the New Testament and one from the Gospels. Notice that the last reading contains two passages, the second of which is optional. Since we are done with Christmas eve, we can now close the reading <set> element and the <day> element:
Now, to demonstrate that we can have a day with two reading sets in it, let's create "dawn" and "day" reading sets for Christmas Day:
<day id="ChristmasDay" season="Christmas"> <set number="1" type="dawn"> <color html-color="white">White</color> <description></description> <titles> <title>Nativity of the Lord</title> <subtitle>Christmas Day</subtitle> </titles> <readings all="true"> <reading type="ot"> <passage>Isaiah 62:6-12</passage> </reading> <reading type="psalm"> <passage>Psalm 97:</passage> </reading> </readings> </set>
Notice that this time, we just included two readings, one from the Old Testament and one from the Psalms, to keep things easy. Now let's create the "day" reading set:
<set number="2" type="day"> <color html-color="white">White</color> <description></description> <titles> <title>Nativity of the Lord</title> <subtitle>Christmas Day</subtitle> </titles> <readings all="true"> <reading type="ot"> <passage>Isaiah 52:7-10</passage> </reading> <reading type="psalm"> <passage>Psalm 98:</passage> </reading> </readings> </set>
With both reading sets done, we can close the <day> element and the <days> element like so:
The only thing left to do is decide on which dates to place these days. This is especially important for days like Easter, which occur on different dates depending on the year:
<calendar-year start="2004" id="3" type="A"> <entry day="ChristmasEve" date="2004-12-24" /> <entry day="ChristmasDay" date="2004-12-25"/> </calendar-year>
Notice that our day attributes (ChristmasEve and ChristmasDay) match the id attribute for those specific days. Last of all, we need to close the lbx-lectionary element like so:
Now, save the file and open Libronix. Click on Tools | Bible Data | Lectionary Viewer. Click on Properties and choose “Christmas Lectionary” from the Lectionary drop-down list; click OK to see your new lectionary!