S-89 Slips – Highlight when Study Point not assigned

S-89 Assignment Slips – Script Customization

Recently I was asked the following question:

Recently I was asked the following question:
Is it possible to highlight in the editor on the S-89 slip when a part has been assigned without a study point?stefano
This would be easier to implement for the Workbook and Worksheet views because they have a dedicated setting:

1
2
3
4
5
6
7
8
9
10
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="Workbook-S-140 - start.xsl"?>
<MeetingWorkBook>
    <Settings>
        <LanguageCode>en</LanguageCode>
        <EditorMode>1</EditorMode>
        <Direction>ltr</Direction>
    </Settings>
    <!-- Remaining content removed for clarifity -->
</MeetingWorkBook>

There is a workaround for the Slips view. The following information is for advanced script users.

The syntax of the S-89 Slips

If you right click the view and select View Source you will the syntax of the XML document. Eg:

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
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="AssignmentSlips.xsl"?>
<AssignmentSlips Version="180900">
    <Settings>
        <LanguageCode>en</LanguageCode>
        <Template Style="s-89-eng.css">s-89-eng.jpg</Template>
        <Direction>ltr</Direction>
    </Settings>
    <Page PageBreakBefore="0">
        <StudentSlip>
            <Student>Brother Happy</Student>
            <StudyPoint></StudyPoint>
            <Assignment>1</Assignment>
            <Location>1</Location>
            <Date>05 July 2018</Date>
        </StudentSlip>
        <StudentSlip>
            <Student>Sister Happy</Student>
            <Assistant>Sister Kind</Assistant>
            <StudyPoint>39 - Effective Conclusion</StudyPoint>
            <Assignment>3</Assignment>
            <Location>1</Location>
            <Date>05 July 2018</Date>
        </StudentSlip>
        <StudentSlip>
            <Student>Brother Patient</Student>
            <Assistant>Brother Merciful</Assistant>
            <StudyPoint>27 - Extemporaneous Delivery</StudyPoint>
            <Assignment>6</Assignment>
            <Location>1</Location>
            <Date>05 July 2018</Date>
        </StudentSlip>
    </Page>
</AssignmentSlips>

I have highlighted an example of where a study point has not been assigned: <StudyPoint></StudyPoint>.

The Changes

It it assumed that you are already working on a copy of the original script/stylesheet files. Locate this bit of script (should be line 57):

57
58
59
60
61
62
<div class="fieldCounsel">
  <xsl:attribute name="dir">
    <xsl:value-of select="//Settings/Direction"/>
  </xsl:attribute>
  <xsl:value-of select="StudyPoint"/>
</div>

We need to adjust the hilighted line and test if the study point has a value. If it doesn’t then show asterixes and introduce a new class:

52
53
54
55
56
57
58
59
60
61
62
63
64
65
<div class="fieldCounsel">
  <xsl:attribute name="dir">
    <xsl:value-of select="//Settings/Direction"/>
  </xsl:attribute>
  <xsl:choose>
    <xsl:when test="StudyPoint=''">
          <xsl:attribute name="class">highlight fieldCounsel</xsl:attribute>
      <xsl:text>**********</xsl:text>
    </xsl:when>
    <xsl:otherwise>
      <xsl:value-of select="StudyPoint"/>
    </xsl:otherwise>
  </xsl:choose>
</div>

The Styling

The last thing we need to do make some changes to the stylesheet. We add the new class at the bottom of the script:

79
80
81
82
83
84
85
86
87
88
89
.highlight {
    background-color: #FFFF00;
    font-weight: bold;
}

@media print
{
    .highlight{
        display:none;
    }
}

When you use the editor now you will have any unassigned study number highlighted:

Slip

We have used @media print to hide this highlighted text from the print out.

Compact Workbook Schedule – With Student Assistants

Compact Workbook – Script Customization

Recently I was asked the following question:

Recently I was asked the following question:
I would like to put the assistent to the Apply Yourself To The Field Ministry as a second row. Can you please give me directions on how to do this?Shilbert

Our brother was using the Workbook-S-140-Compact_ENG_Weekly script which you can find here on the website. He had already made some adjustments to the script to make some extra room for the additional assignment information.

Changes to the Script

I have highlighted in the snapshot below the changes that you are required to make to the script (line numbers are indicative only!):

1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
<!--This is used to insert the Treasures 1, Student or Special Event-->
  <xsl:template match="Name | Event | Student" mode="FirstRow">
    <xsl:param name="strClass"/>
    <td class="{$strClass}">
      <xsl:if test="self::Event">
        <xsl:attribute name="rowspan">3</xsl:attribute>
      </xsl:if>
      <xsl:value-of select="."/>
      <xsl:if test="self::Student">
        <xsl:apply-templates select="../Assistant"/>
      </xsl:if>
    </td>
  </xsl:template>

  <!--This is used to insert the Treasures 2, Bible Reader or Student-->
  <xsl:template match="Name | Reader | Student" mode="OtherRow">
    <xsl:param name="strClass"/>
    <td class="{$strClass}">
      <xsl:value-of select="."/>
      <xsl:if test="self::Student">
        <xsl:apply-templates select="../Assistant"/>
      </xsl:if>
    </td>
  </xsl:template>

  <!--This is used to insert the Assistant-->
  <xsl:template match="Assistant">
    <br/>
    <xsl:value-of select="."/>
  </xsl:template>

The Results

Here is an example of what you can expect to see once the changes have been made to the script:

Compact Workbook Results
(Click to enlarge)

Workbook Schedule – Compact Style with Assignments

This article is an enhancement to the post found here. You need to have Meeting Schedule Assistant version 18.0.9 or higher installed.

Compact – Click to Enlarge

What Is Different?

This version of the schedule makes use of the new Duty Assignment History feature in Meeting Schedule Assistant. The link just provided gives you detailed information about how you can use this new information in your Midweek Schedules and thus combine assignments from both editors onto a single schedule.

Including Assignments – Click to Enlarge

In-fact, for those brave enough, there is nothing stopping you from using the Custom tab in the Midweek Editor to show a dedicated assignments schedule (beyond the tabular style imposed by the Sound Rota Editor).

Understandably we can only provide you with an example of what you can display on your schedule. Everyone will have unique situations and the script may well have to be tweaked to suit your scenario.

What You Need To Know

So, Duty Assignment History is a new concept introduced in Meeting Schedule Assistant version 18.0.9. The history is built up over time when you create your Sound Rota (SRR) schedules and save them. Each time you will be shown this prompt:

Update Assignment History Prompt

If you have made all the needed changes to your schedule then click Yes to the prompt. This will update the history file. You can always open your schedule again and make further changes and update the history again as many times as needed.

Note: You might try to open your existing SRR documents (created with version 18.0.8 or earlier) and save them to get your history up to date but this might not produce the desired results. This is because the older SRR documents are lacking some information for us to correctly manage the duty history. You are welcome to try and use this approach but you may well have to edit your history file and make some adjustments to get it correct. It is suggested that you simply re-create any existing SRR file again and save it to get your history up to date.

How Does Duty Assignment History Help Me?

This is a good question! It helps you in three specific ways:

1. Automatic Assigning

Auto Assign Settings – Click to Enlarge

On the Auto Assign Settings window there is an option Select starting names. When this option is on the program will show you a popup window to select starting names during the automatic assigning process:

Select Starting names – Click to Enlarge

This is where the Duty Assignment History is useful! Single click on the drop list for any assignment and you will see a list of history on the right. Use this information to help you decide who you want to select as a starting name from the drop list.

Thus, you should be able to avoid assigning brothers back to back with the end of the last schedule which is always appreciated.

2. Single Column

The Single Column feature is a powerful alternative that can be used instead of, or in conjuction with automatic assigning. The help topic provides full details.

Single Column – Click to Enlarge

As you can see, the Duty Assignment History is now listed here too, on a column by column basis. The list includes the most recent date that each name was used (if at all). Just click on a name to select it as the starting name.

3. Including Assignment Information on Midweek Schedules

It is beyond the scope of this blog post to describe how to include the Duty Assignment History. The link already provided (also included in the Help System with the program) provides all the information you need to understand how the history data file works.

However, we decided to extend the Compact Schedule script that was initially released back in November 2017. This edition includes the following assignments at the bottom of the schedule:

  • Sound
  • Platform
  • Microphone
  • Cleaning (see note)

Note: Cleaning is a custom assignment and as a result the Index used might be different in your configuration. The dedicated help topic provides more information about this.

The samples provided here assume that you are using the default schedule template. I think this most likely applies to most users. It is also provided in two versions (in both English and Hungarian):

  • Midweek
  • Weekly

Choose the schedule that matches the report mode you are using in the program.

English Version

Workbook Compact With Assignments English
Size: 13kb
Version: 5
Published: 16/01/2018

Hungarian Version

Workbook Compact With Assignments Hungarian
Size: 13kb
Version: 5
Published: 16/01/2018

Personal Copies Scripts

In version 18.1.5 we introduced the Personal Copies feature. The Compact style has now been upgraded so that it can be used.

Workbook Compact With Assignments English
Size: 14KB
Version: Personal Copies - 1.0
Published: 03/04/2018
Workbook Compact With Assignments Hungarian
Size: 14KB
Version: Personal Copies - 1.0
Published: 03/04/2018

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