How to Include the Scriptures with the Song Titles

The following information is applicable to the Sing Out Joyfully to Jehovah publication.

By following the steps below you will be able to include the scriptures on your Workbook or Worksheet.

Step 1

Create a XML data file that includes all of the scripture citations. The following is correct for English:

<?xml version="1.0" encoding="utf-8"?>
<ScripturesForSongs>
 <Song Number="1">(Revelation 4:11)</Song>
 <Song Number="2">(Psalm 83:18)</Song>
 <Song Number="3">(Proverbs 14:26)</Song>
 <Song Number="4">(Psalm 23)</Song>
 <Song Number="5">(Psalm 139)</Song>
 <Song Number="6">(Psalm 19)</Song>
 <Song Number="7">(Isaiah 12:2)</Song>
 <Song Number="8">(Psalm 91)</Song>
 <Song Number="9">(Psalm 97:1)</Song>
 <Song Number="10">(Psalm 145:12)</Song>
 <Song Number="11">(Psalm 19)</Song>
 <Song Number="12">(Exodus 34:6, 7)</Song>
 <Song Number="13">(1 Peter 2:21)</Song>
 <Song Number="14">(Psalm 2:12)</Song>
 <Song Number="15">(Hebrews 1:6)</Song>
 <Song Number="16">(Revelation 21:2)</Song>
 <Song Number="17">(Luke 5:13)</Song>
 <Song Number="18">(Luke 22:20)</Song>
 <Song Number="19">(Matthew 26:26-30)</Song>
 <Song Number="20">(1 John 4:9)</Song>
 <Song Number="21">(Matthew 6:33)</Song>
 <Song Number="22">(Revelation 11:15; 12:10)</Song>
 <Song Number="23">(Revelation 11:15)</Song>
 <Song Number="24">(Isaiah 2:2-4)</Song>
 <Song Number="25">(1 Peter 2:9)</Song>
 <Song Number="26">(Matthew 25:34-40)</Song>
 <Song Number="27">(Romans 8:19)</Song>
 <Song Number="28">(Psalm 15)</Song>
 <Song Number="29">(Isaiah 43:10-12)</Song>
 <Song Number="30">(Hebrews 6:10)</Song>
 <Song Number="31">(Micah 6:8)</Song>
 <Song Number="32">(Exodus 32:26)</Song>
 <Song Number="33">(Psalm 55)</Song>
 <Song Number="34">(Psalm 26)</Song>
 <Song Number="35">(Philippians 1:10)</Song>
 <Song Number="36">(Proverbs 4:23)</Song>
 <Song Number="37">(Matthew 22:37)</Song>
 <Song Number="38">(1 Peter 5:10)</Song>
 <Song Number="39">(Ecclesiastes 7:1)</Song>
 <Song Number="40">(Romans 14:8)</Song>
 <Song Number="41">(Psalm 54)</Song>
 <Song Number="42">(Ephesians 6:18)</Song>
 <Song Number="43">(Psalm 95:2)</Song>
 <Song Number="44">(Psalm 4:1)</Song>
 <Song Number="45">(Psalm 19:14)</Song>
 <Song Number="46">(1 Thessalonians 5:18)</Song>
 <Song Number="47">(1 Thessalonians 5:17)</Song>
 <Song Number="48">(Micah 6:8)</Song>
 <Song Number="49">(Proverbs 27:11)</Song>
 <Song Number="50">(Matthew 22:37)</Song>
 <Song Number="51">(Matthew 16:24)</Song>
 <Song Number="52">(Hebrews 10:7, 9)</Song>
 <Song Number="53">(Jeremiah 1:17)</Song>
 <Song Number="54">(Isaiah 30:20, 21)</Song>
 <Song Number="55">(Matthew 10:28)</Song>
 <Song Number="56">(Proverbs 3:1, 2)</Song>
 <Song Number="57">(1 Timothy 2:4)</Song>
 <Song Number="58">(Luke 10:6)</Song>
 <Song Number="59">(Psalm 146:2)</Song>
 <Song Number="60">(Ezekiel 3:17-19)</Song>
 <Song Number="61">(Luke 16:16)</Song>
 <Song Number="62">(Psalm 98)</Song>
 <Song Number="63">(Isaiah 43:10-12)</Song>
 <Song Number="64">(Matthew 13:1-23)</Song>
 <Song Number="65">(Hebrews 6:1)</Song>
 <Song Number="66">(Revelation 14:6, 7)</Song>
 <Song Number="67">(2 Timothy 4:2)</Song>
 <Song Number="68">(Matthew 13:4-8)</Song>
 <Song Number="69">(2 Timothy 4:5)</Song>
 <Song Number="70">(Matthew 10:11-15)</Song>
 <Song Number="71">(Joel 2:7)</Song>
 <Song Number="72">(Acts 20:20, 21)</Song>
 <Song Number="73">(Acts 4:29)</Song>
 <Song Number="74">(Psalm 98:1)</Song>
 <Song Number="75">(Isaiah 6:8)</Song>
 <Song Number="76">(Hebrews 13:15)</Song>
 <Song Number="77">(2 Corinthians 4:6)</Song>
 <Song Number="78">(Acts 18:11)</Song>
 <Song Number="79">(Matthew 28:19, 20)</Song>
 <Song Number="80">(Psalm 34:8)</Song>
 <Song Number="81">(Ecclesiastes 11:6)</Song>
 <Song Number="82">(Matthew 5:16)</Song>
 <Song Number="83">(Acts 20:20)</Song>
 <Song Number="84">(Matthew 9:37, 38)</Song>
 <Song Number="85">(Romans 15:7)</Song>
 <Song Number="86">(Isaiah 50:4; 54:13)</Song>
 <Song Number="87">(Hebrews 10:24, 25)</Song>
 <Song Number="88">(Psalm 25:4)</Song>
 <Song Number="89">(Luke 11:28)</Song>
 <Song Number="90">(Hebrews 10:24, 25)</Song>
 <Song Number="91">(Psalm 127:1)</Song>
 <Song Number="92">(1 Chronicles 29:16)</Song>
 <Song Number="93">(Hebrews 10:24, 25)</Song>
 <Song Number="94">(Philippians 2:16)</Song>
 <Song Number="95">(Proverbs 4:18)</Song>
 <Song Number="96">(Proverbs 2:1)</Song>
 <Song Number="97">(Matthew 4:4)</Song>
 <Song Number="98">(2 Timothy 3:16, 17)</Song>
 <Song Number="99">(Revelation 7:9, 10)</Song>
 <Song Number="100">(Acts 17:7)</Song>
 <Song Number="101">(Ephesians 4:3)</Song>
 <Song Number="102">(Acts 20:35)</Song>
 <Song Number="103">(Ephesians 4:8)</Song>
 <Song Number="104">(Luke 11:13)</Song>
 <Song Number="105">(1 John 4:7, 8)</Song>
 <Song Number="106">(1 Corinthians 13:1-8)</Song>
 <Song Number="107">(1 John 4:19)</Song>
 <Song Number="108">(Isaiah 55:1-3)</Song>
 <Song Number="109">(1 Peter 1:22)</Song>
 <Song Number="110">(Nehemiah 8:10)</Song>
 <Song Number="111">(Matthew 5:12)</Song>
 <Song Number="112">(Philippians 4:9)</Song>
 <Song Number="113">(John 14:27)</Song>
 <Song Number="114">(James 5:8)</Song>
 <Song Number="115">(2 Peter 3:15)</Song>
 <Song Number="116">(Ephesians 4:32)</Song>
 <Song Number="117">(2 Chronicles 6:41)</Song>
 <Song Number="118">(Luke 17:5)</Song>
 <Song Number="119">(Hebrews 10:38, 39)</Song>
 <Song Number="120">(Matthew 11:28-30)</Song>
 <Song Number="121">(Romans 7:14-25)</Song>
 <Song Number="122">(1 Corinthians 15:58)</Song>
 <Song Number="123">(1 Corinthians 14:33)</Song>
 <Song Number="124">(Psalm 18:25)</Song>
 <Song Number="125">(Matthew 5:7)</Song>
 <Song Number="126">(1 Corinthians 16:13)</Song>
 <Song Number="127">(2 Peter 3:11)</Song>
 <Song Number="128">(Matthew 24:13)</Song>
 <Song Number="129">(Matthew 24:13)</Song>
 <Song Number="130">(Psalm 86:5)</Song>
 <Song Number="131">(Matthew 19:5, 6)</Song>
 <Song Number="132">(Genesis 2:23, 24)</Song>
 <Song Number="133">(Ecclesiastes 12:1)</Song>
 <Song Number="134">(Psalm 127:3-5)</Song>
 <Song Number="135">(Proverbs 27:11)</Song>
 <Song Number="136">(Ruth 2:12)</Song>
 <Song Number="137">(Romans 16:2)</Song>
 <Song Number="138">(Proverbs 16:31)</Song>
 <Song Number="139">(Revelation 21:1-5)</Song>
 <Song Number="140">(John 3:16)</Song>
 <Song Number="141">(Psalm 36:9)</Song>
 <Song Number="142">(Hebrews 6:18, 19)</Song>
 <Song Number="143">(Romans 8:20-25)</Song>
 <Song Number="144">(2 Corinthians 4:18)</Song>
 <Song Number="145">(Luke 23:43)</Song>
 <Song Number="146">(Revelation 21:1-5)</Song>
 <Song Number="147">(Psalm 37:29)</Song>
 <Song Number="148">(2 Samuel 22:1-8)</Song>
 <Song Number="149">(Exodus 15:1)</Song>
 <Song Number="150">(Zephaniah 2:3)</Song>
 <Song Number="151">(Job 14:13-15)</Song>
</ScripturesForSongs>

This file is also available on PastebinScripturesForSongs.xml

Step 2

Next, you need to modify a copy of the XSL stylesheet you are using. It depends upon how your XSL file is constructed. For example:

<!--Open / Close song-->
<xsl:template match="SongOpen|SongEnd">
<td class="textItemWithPadding">
 <xsl:value-of select="//Labels/Song"/>
 <xsl:text> </xsl:text>
 <xsl:value-of select="."/>
 <xsl:text> - </xsl:text>
 <xsl:value-of select="@Title"/>
 <xsl:variable name="ScripturesForSongs" select="document('ScripturesForSongs.xml')"/>
 <xsl:variable name="SongNumber" select="."/>
 &#160;
 <xsl:value-of select="$ScripturesForSongs/ScripturesForSongs/Song[@Number=$SongNumber]"/>
</td>
</xsl:template>

<!--Middle song-->
<xsl:template match="SongMiddle">
<tr>
 <td class="textItemWithPadding">
 <xsl:value-of select="//Labels/Song"/>
 <xsl:text> </xsl:text>
 <xsl:value-of select="."/>
 <xsl:text> - </xsl:text>
 <xsl:value-of select="@Title"/>
 <xsl:variable name="ScripturesForSongs" select="document('ScripturesForSongs.xml')"/>
 <xsl:variable name="SongNumber" select="."/>
 &#160;
 <xsl:value-of select="$ScripturesForSongs/ScripturesForSongs/Song[@Number=$SongNumber]"/>
 </td>
 <td class="textTime">
 <xsl:value-of select="@EndTime12"/>
 </td>
</tr>
</xsl:template>

The above conveys the principles but you will have to adapt it to match the way your XSL style sheet is working.

Results

Here is an example of how it can look on your schedule. The image shown is from a customized XSL stylesheet used by one of our Twi users:

Songs with Scripture Citations

Including the page numbers from the school book on the Worksheet

It is true that more and more individuals are using digital devices for viewing publications at our Christian meetings. However, during the Midweek meeting we have the student items where we use this publication:

Benefit From Theocratic Ministry School Education
Benefit From Theocratic Ministry School Education

As you know, the publication includes a counsel form:

At the moment this counsel form is not available in an electronic format to keep it up to date (when you have a student item). Thus, usually students are encouraged to bring their book with them so that it can be updated by hand.

As a result, it is not uncommon for the chairman to desire to make reference to the page number of the book when he is referring to counsel points. This is because we are all encouraged to follow along as we are all students too!

How To Include the Page Number on the Chairman Worksheet

It is assumed that you already know how to copy the existing style sheets to a new name for further customization. It is beyond the scope of this blog post.

Step 1

Create an XML document that includes all the page numbers for the study points. This file needs to be put it into the Meeting Schedule Assistant user application data folder.

This is what the file should look like (page numbers correct for the English publication):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?xml version="1.0" encoding="utf-8"?>
<Lessons>
  <Study Number="1" Page="83"/>
  <Study Number="2" Page="86"/>
  <Study Number="3" Page="89"/>
  <Study Number="4" Page="93"/>
  <Study Number="5" Page="97"/>
  <Study Number="6" Page="101"/>
  <Study Number="7" Page="105"/>
  <Study Number="8" Page="107"/>
  <Study Number="9" Page="111"/>
  <Study Number="10" Page="115"/>
  <Study Number="11" Page="118"/>
  <Study Number="12" Page="121"/>
  <Study Number="13" Page="124"/>
  <Study Number="14" Page="128"/>
  <Study Number="15" Page="131"/>
  <Study Number="16" Page="135"/>
  <Study Number="17" Page="139"/>
  <Study Number="18" Page="143"/>
  <Study Number="19" Page="145"/>
  <Study Number="20" Page="147"/>
  <Study Number="21" Page="150"/>
  <Study Number="22" Page="153"/>
  <Study Number="23" Page="157"/>
  <Study Number="24" Page="160"/>
  <Study Number="25" Page="166"/>
  <Study Number="26" Page="170"/>
  <Study Number="27" Page="174"/>
  <Study Number="28" Page="179"/>
  <Study Number="29" Page="181"/>
  <Study Number="30" Page="186"/>
  <Study Number="31" Page="190"/>
  <Study Number="32" Page="194"/>
  <Study Number="33" Page="197"/>
  <Study Number="34" Page="202"/>
  <Study Number="35" Page="206"/>
  <Study Number="36" Page="209"/>
  <Study Number="37" Page="212"/>
  <Study Number="38" Page="215"/>
  <Study Number="39" Page="220"/>
  <Study Number="40" Page="223"/>
  <Study Number="41" Page="226"/>
  <Study Number="42" Page="230"/>
  <Study Number="43" Page="234"/>
  <Study Number="44" Page="236"/>
  <Study Number="45" Page="240"/>
  <Study Number="46" Page="244"/>
  <Study Number="47" Page="247"/>
  <Study Number="48" Page="251"/>
  <Study Number="49" Page="255"/>
  <Study Number="50" Page="258"/>
  <Study Number="51" Page="263"/>
  <Study Number="52" Page="265"/>
  <Study Number="53" Page="268"/>
</Lessons>

This file is also available on Pastebin: Study Point Page Numbers.

Step 2

Next, you need to open your own copy of the worksheet with a plain text editor (like Notepad++). You need to add a new template that will be applied to all StudyPoint attributes:

303
304
305
306
307
308
309
310
311
312
313
314
315
316
<!--Display the study number, description and page number.-->
<xsl:template match="@StudyPoint">
<xsl:choose>
  <xsl:when test="current()!=''">
    <xsl:variable name="StudyPageNumbers" select="document('StudyPointPageNumbers.xml')"/>
    <xsl:text> (Page: </xsl:text>
    <xsl:value-of select="$StudyPageNumbers/Lessons/Study[@Number=current()]/@Page"/>
    <xsl:text>)</xsl:text>
  </xsl:when>
  <xsl:otherwise>
    <xsl:text>No study point.</xsl:text>
  </xsl:otherwise>
</xsl:choose>
</xsl:template>

For example, if the study number was 12 then this will be displayed:

12 Gestures and Facial Expressions (Page: 121)

Or, if no study point was present, then this will be displayed:

No Study Point.

Step 3

There are several locations in the XSL script that you need to apply the above template. Here is one of those locations:

258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
<xsl:choose>
  <xsl:when test="$Class='M'">
    <xsl:value-of select="BibleReadingM/@StudyPoint"/>&#160;
    <xsl:value-of select="BibleReadingM/@StudyPointDescription"/>
    <xsl:apply-templates select="BibleReadingM/@StudyPoint"/>
  </xsl:when>
  <xsl:when test="$Class='1'">
    <xsl:value-of select="BibleReading1/@StudyPoint"/>&#160;
    <xsl:value-of select="BibleReading1/@StudyPointDescription"/>
    <xsl:apply-templates select="BibleReading1/@StudyPoint"/>
  </xsl:when>
  <xsl:when test="$Class='2'">
    <xsl:value-of select="BibleReading2/@StudyPoint"/>&#160;
    <xsl:value-of select="BibleReading2/@StudyPointDescription"/>
    <xsl:apply-templates select="BibleReading2/@StudyPoint"/>
  </xsl:when>
</xsl:choose>

As you can see, we have made 3 changes to the script and added the calls to apply-templates.

There are three more locations in the XSL script that you will need to do a similar exercise.

This file is also available on PastebinWorksheet-Next Students-PageNo.XSL

The Result

If you have made the changes correctly then the page numbers should show in the editor:

Student Study Points with Page numbers

Addendum

As per the note I made in the comments  section below, there is an alternative way to get this done. On the surface you will not see any performance improvement but it is good to be aware of this other methodology.

It has to do with using keys. You establish a cross-reference and then the system caches this information and kind of uses a lookup table. This in the long run would be quicker if you had a larger document. The only change to the above instructions is a revised step 2.

Revised Step 2

This is the new code that you would require in the XSL file:

303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
<!--The key to cross reference the study number with the page in the book-->
<xsl:key name="studies" match="Study" use="@Number" />

<!--Display the study number, description and page number.-->
<xsl:template match="@StudyPoint">
<xsl:choose>
  <xsl:when test="current()!=''">
    <xsl:text> (Page: </xsl:text>
    <xsl:variable name="num" select="." />
    <!-- change context to use a key -->
    <xsl:for-each select="document('StudyPointPageNumbers.xml')">
      <xsl:value-of select="key('studies', $num)/@Page"/>
    </xsl:for-each>
    <xsl:text>)</xsl:text>
  </xsl:when>
  <xsl:otherwise>
    <xsl:text>No study point.</xsl:text>
  </xsl:otherwise>
</xsl:choose>
</xsl:template>

This file is also available on PastebinWorksheet-Next Students-PageNo2.XSL