Advertisement
TheocraticSoftware

Worksheet-Next Students-PageNo2.xsl

Aug 23rd, 2017
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 36.67 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3.  
  4.   <xsl:output method="html" indent="yes" version="4.01"
  5.    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
  6.    doctype-public="//W3C//DTD XHTML 1.0 Transitional//EN"/>
  7.   <xsl:template match="/">
  8.     <html xmlns="http://www.w3.org/1999/xhtml">
  9.       <head>
  10.         <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
  11.         <link rel="stylesheet" type="text/css" href="Worksheet.css"/>
  12.         <title>
  13.           <xsl:value-of select="//Labels/ReportTitleWorksheets"/>
  14.         </title>
  15.       </head>
  16.       <body>
  17.  
  18.         <xsl:for-each select="MeetingWorkBook/Meeting">
  19.  
  20.           <!--We only add the page breaks when we are in "Print Preview" mode-->
  21.           <xsl:if test="InsertPageBreak=1">
  22.             <!--This seems to be the only way to insert a page break-->
  23.             <br style="page-break-before: always;"/>
  24.           </xsl:if>
  25.  
  26.           <!--This the the date, opening song, chairman and prayer-->
  27.           <xsl:call-template name="Display_DateInfo">
  28.             <xsl:with-param name = "Class">M</xsl:with-param>
  29.           </xsl:call-template>
  30.  
  31.           <!--Treasures from God's Word-->
  32.           <xsl:call-template name="Display_TFGW">
  33.             <xsl:with-param name = "Class">M</xsl:with-param>
  34.           </xsl:call-template>
  35.  
  36.           <!--Apply Yourself To The Field Ministry-->
  37.           <xsl:call-template name="Display_AYTFM">
  38.             <xsl:with-param name = "Class">M</xsl:with-param>
  39.           </xsl:call-template>
  40.  
  41.           <!--Living As Christians-->
  42.           <xsl:call-template name="Display_LAC" />
  43.  
  44.           <!--Auxiliary counsellor worksheets-->
  45.           <!--The number of classes is set to 1 when it is the first week of the month-->
  46.           <!--Class 1-->
  47.           <xsl:if test="NumberClasses&gt;=2">
  48.             <br style="page-break-before: always;"/>
  49.  
  50.             <!--This the the date, opening song, chairman and prayer-->
  51.             <xsl:call-template name="Display_DateInfo">
  52.               <xsl:with-param name = "Class">1</xsl:with-param>
  53.             </xsl:call-template>
  54.  
  55.             <!--Treasures from God's Word-->
  56.             <xsl:call-template name="Display_TFGW">
  57.               <xsl:with-param name = "Class">1</xsl:with-param>
  58.             </xsl:call-template>
  59.  
  60.             <!--Apply Yourself To The Field Ministry-->
  61.             <xsl:call-template name="Display_AYTFM">
  62.               <xsl:with-param name = "Class">1</xsl:with-param>
  63.             </xsl:call-template>
  64.           </xsl:if>
  65.  
  66.           <!--Class 2-->
  67.           <xsl:if test="NumberClasses=3">
  68.             <br style="page-break-before: always;"/>
  69.  
  70.             <!--This the the date, opening song, chairman and prayer-->
  71.             <xsl:call-template name="Display_DateInfo">
  72.               <xsl:with-param name = "Class">2</xsl:with-param>
  73.             </xsl:call-template>
  74.  
  75.             <!--Treasures from God's Word-->
  76.             <xsl:call-template name="Display_TFGW">
  77.               <xsl:with-param name = "Class">2</xsl:with-param>
  78.             </xsl:call-template>
  79.  
  80.             <!--Apply Yourself To The Field Ministry-->
  81.             <xsl:call-template name="Display_AYTFM">
  82.               <xsl:with-param name = "Class">2</xsl:with-param>
  83.             </xsl:call-template>
  84.           </xsl:if>
  85.  
  86.         </xsl:for-each>
  87.       </body>
  88.     </html>
  89.   </xsl:template>
  90.  
  91.   <!--This the the date, opening song, chairman and prayer-->
  92.   <xsl:template name = "Display_DateInfo" >
  93.     <xsl:param name = "Class" />
  94.     <div class="containerDate">
  95.       <table cellpadding="2" cellspacing="0" class="tableOuter">
  96.         <tr class="cellDate">
  97.           <td class="textDate">
  98.             <strong>
  99.               <xsl:value-of select="Date"/><br/>
  100.               <xsl:value-of select="WeeklyBibleReading"/>
  101.             </strong>
  102.           </td>
  103.           <td class="textChairmanTitle">
  104.             <strong>
  105.               <xsl:choose>
  106.                 <xsl:when test="$Class='M'">
  107.                   <xsl:value-of select="//Labels/ReportTitleChairman"/>
  108.                 </xsl:when>
  109.                 <xsl:otherwise>
  110.                   <xsl:value-of select="//Labels/ReportTitleAuxCounsellor"/>
  111.                 </xsl:otherwise>
  112.               </xsl:choose>
  113.             </strong>
  114.           </td>
  115.           <td class="textChairman">
  116.             <strong>
  117.               <xsl:choose>
  118.                 <xsl:when test="$Class='M'">
  119.                   <xsl:value-of select="Chairman"/>&#160;
  120.                 </xsl:when>
  121.                 <xsl:when test="$Class='1'">
  122.                   <xsl:value-of select="//Labels/AuxClass1"/>
  123.                 </xsl:when>
  124.                 <xsl:otherwise>
  125.                   <xsl:value-of select="//Labels/AuxClass2"/>
  126.                 </xsl:otherwise>
  127.               </xsl:choose>
  128.             </strong>
  129.           </td>
  130.         </tr>
  131.       </table>
  132.  
  133.       <xsl:if test="$Class='M'">
  134.         <div class="gap"></div>
  135.  
  136.         <table cellpadding="2" cellspacing="0" class="tableOuter">
  137.           <tr>
  138.             <td class="borderDotTimeDuration" style="border-top-style:solid">
  139.               [<xsl:value-of select="SongOpen/@EndTime24"/>]
  140.             </td>
  141.             <td class="borderDotTime" style="border-top-style:solid">
  142.               <xsl:value-of select="//Labels/SongDuration"/>
  143.             </td>
  144.             <td class="borderDotTheme" style="border-top-style:solid">
  145.               <span class="floatTextLeft">
  146.                 <xsl:value-of select="//Labels/Song"/>&#160;
  147.                 <xsl:value-of select="SongOpen"/>&#160;
  148.                 <span class="textSongTitle">
  149.                   <xsl:value-of select="SongOpen/@Title"/>
  150.                 </span>
  151.               </span>
  152.               <span class="floatTextRight">
  153.                 <xsl:value-of select="//Labels/Prayer"/>
  154.               </span>
  155.             </td>
  156.             <td class="borderDotName" style="border-top-style:solid">
  157.               <xsl:value-of select="Prayer1"/>&#160;
  158.             </td>
  159.           </tr>
  160.           <tr>
  161.             <td class="borderDotTimeDuration">
  162.               [<xsl:value-of select="OpeningComments/Time/@EndTime24"/>]
  163.             </td>
  164.             <td class="borderDotTime">
  165.               <xsl:value-of select="OpeningComments/Time"/>
  166.             </td>
  167.             <td class="borderDotTheme" colspan="2">
  168.               <xsl:value-of select="OpeningComments/Theme"/>
  169.             </td>
  170.           </tr>
  171.           <tr>
  172.             <td class="cellComments" colspan="4">
  173.               <xsl:if test="normalize-space(ReviewQuestion) != ''">
  174.                 <span class="textReviewQuestionLabel">
  175.                   <xsl:value-of select="//Labels/ReviewQuestion"/>&#160;
  176.                 </span>
  177.                 <span class="textReviewQuestion">
  178.                   <xsl:value-of select="ReviewQuestion"/>
  179.                 </span>
  180.                 <br />
  181.               </xsl:if>
  182.               <br />
  183.               <br />
  184.             </td>
  185.           </tr>
  186.         </table>
  187.  
  188.       </xsl:if>
  189.  
  190.     </div>
  191.   </xsl:template>
  192.  
  193.   <!--Treasures from God's Word-->
  194.   <xsl:template name = "Display_TFGW" >
  195.     <xsl:param name = "Class" />
  196.     <div class="containerTFGW">
  197.       <table cellpadding="2" cellspacing="0"  class="tableOuter">
  198.         <tr>
  199.           <td class="textTFGW" colspan="4">
  200.             <xsl:value-of select="//Labels/TreasuresFromGodsWord"/>
  201.           </td>
  202.         </tr>
  203.  
  204.         <xsl:if test="$Class='M'">
  205.           <!--Bible discussion-->
  206.           <tr>
  207.             <td class="borderDotTimeDuration">
  208.               [<xsl:value-of select="Treasures1/Time/@EndTime24"/>]
  209.             </td>
  210.             <td class="borderDotTime">
  211.               <xsl:value-of select="Treasures1/Time"/>
  212.             </td>
  213.             <td class="borderDotTheme">
  214.               <xsl:value-of select="Treasures1/Theme" disable-output-escaping="yes"/>&#160;
  215.               <span class="textMethod">
  216.                 [<xsl:value-of select="Treasures1/Method" disable-output-escaping="yes"/>]
  217.               </span>
  218.             </td>
  219.             <td class="borderDotName">
  220.               <xsl:value-of select="Treasures1/Name"/>&#160;
  221.             </td>
  222.           </tr>
  223.  
  224.           <!--Digging for spiritual gems-->
  225.           <tr>
  226.             <td class="borderDotTimeDuration">
  227.               [<xsl:value-of select="Treasures2/Time/@EndTime24"/>]
  228.             </td>
  229.             <td class="borderDotTime">
  230.               <xsl:value-of select="Treasures2/Time"/>
  231.             </td>
  232.             <td class="borderDotTheme">
  233.               <xsl:value-of select="Treasures2/Theme" disable-output-escaping="yes"/>&#160;
  234.               <span class="textMethod">
  235.                 [<xsl:value-of select="Treasures2/Method" disable-output-escaping="yes"/>]
  236.               </span>
  237.             </td>
  238.             <td class="borderDotName" valign="top">
  239.               <xsl:value-of select="Treasures2/Name"/>&#160;
  240.             </td>
  241.           </tr>
  242.         </xsl:if>
  243.  
  244.         <!--Bible reading-->
  245.         <tr>
  246.           <td class="borderDotTimeDuration">
  247.             [<xsl:value-of select="BibleReadingTime/@EndTime24"/>]
  248.           </td>
  249.           <td class="borderDotTime">
  250.             <xsl:value-of select="BibleReadingTime"/>
  251.           </td>
  252.           <td class="borderDotTheme">
  253.             <xsl:value-of select="//Labels/BibleReading"/>&#160;
  254.             <span class="textMaterial">
  255.               [<xsl:value-of select="StudentSourceMaterial/BibleReadingMaterial"/>]
  256.             </span><br />
  257.             <xsl:value-of select="//Labels/CounselPoint"/>&#160;
  258.             <xsl:choose>
  259.               <xsl:when test="$Class='M'">
  260.                 <xsl:value-of select="BibleReadingM/@StudyPoint"/>&#160;
  261.                 <xsl:value-of select="BibleReadingM/@StudyPointDescription"/>
  262.                 <xsl:apply-templates select="BibleReadingM/@StudyPoint"/>
  263.               </xsl:when>
  264.               <xsl:when test="$Class='1'">
  265.                 <xsl:value-of select="BibleReading1/@StudyPoint"/>&#160;
  266.                 <xsl:value-of select="BibleReading1/@StudyPointDescription"/>
  267.                 <xsl:apply-templates select="BibleReading1/@StudyPoint"/>
  268.               </xsl:when>
  269.               <xsl:when test="$Class='2'">
  270.                 <xsl:value-of select="BibleReading2/@StudyPoint"/>&#160;
  271.                 <xsl:value-of select="BibleReading2/@StudyPointDescription"/>
  272.                 <xsl:apply-templates select="BibleReading2/@StudyPoint"/>
  273.               </xsl:when>
  274.             </xsl:choose>
  275.             <br />
  276.           </td>
  277.           <td class="borderDotName" valign="top">
  278.             <xsl:choose>
  279.               <xsl:when test="$Class='M'">
  280.                 <xsl:value-of select="BibleReadingM"/>&#160;
  281.               </xsl:when>
  282.               <xsl:when test="$Class='1'">
  283.                 <xsl:value-of select="BibleReading1"/>&#160;
  284.               </xsl:when>
  285.               <xsl:when test="$Class='2'">
  286.                 <xsl:value-of select="BibleReading2"/>&#160;
  287.               </xsl:when>
  288.             </xsl:choose>
  289.           </td>
  290.         </tr>
  291.         <tr>
  292.           <td class="cellComments" colspan="4">
  293.             <br />
  294.             <br />
  295.             <br />
  296.             Next counsel point:
  297.           </td>
  298.         </tr>
  299.       </table>
  300.     </div>
  301.   </xsl:template>
  302.  
  303.   <!--The key to cross reference the study number with the page in the book-->
  304.   <xsl:key name="studies" match="Study" use="@Number" />
  305.  
  306.   <!--Display the study number, description and page number.-->
  307.   <xsl:template match="@StudyPoint">
  308.     <xsl:choose>
  309.       <xsl:when test="current()!=''">
  310.         <xsl:text> (Page: </xsl:text>
  311.         <xsl:variable name="num" select="." />
  312.         <!-- change context to use a key -->
  313.         <xsl:for-each select="document('StudyPointPageNumbers.xml')">
  314.           <xsl:value-of select="key('studies', $num)/@Page"/>
  315.         </xsl:for-each>
  316.         <xsl:text>)</xsl:text>
  317.       </xsl:when>
  318.       <xsl:otherwise>
  319.         <xsl:text>No study point.</xsl:text>
  320.       </xsl:otherwise>
  321.     </xsl:choose>
  322.   </xsl:template>
  323.  
  324.   <!--Apply Yourself To The Field Ministry-->
  325.   <xsl:template name = "Display_AYTFM" >
  326.     <xsl:param name = "Class" />
  327.     <div class="containerAYFM">
  328.       <table cellpadding="2" cellspacing="0"  class="tableOuter">
  329.         <tr>
  330.           <td class="textAYFM" colspan="4">
  331.             <xsl:value-of select="//Labels/ApplyYourselfToTheFieldMinistry"/>
  332.           </td>
  333.         </tr>
  334.  
  335.         <xsl:choose>
  336.           <!--Presentations-->
  337.           <xsl:when test="FirstWeekOfMonth=1">
  338.             <tr>
  339.               <td class="borderDotTimeDuration">
  340.                 [<xsl:value-of select="Presentations/Time/@EndTime24"/>]
  341.               </td>
  342.               <td class="borderDotTime">
  343.                 <xsl:value-of select="Presentations/Time"/>
  344.               </td>
  345.               <td class="borderDotTheme">
  346.                 <xsl:value-of select="Presentations/Theme" disable-output-escaping="yes"/>
  347.                 <br />
  348.                 <span class="textMethod">
  349.                   [<xsl:value-of select="Presentations/Method" disable-output-escaping="yes"/>]
  350.                 </span>
  351.               </td>
  352.               <td class="borderDotName">
  353.                 <xsl:value-of select="Presentations/Name"/>&#160;
  354.               </td>
  355.             </tr>
  356.           </xsl:when>
  357.           <!--Student talks-->
  358.           <xsl:otherwise>
  359.             <tr>
  360.               <td class="borderDotTimeDuration">
  361.                 [<xsl:value-of select="StudentTalk1Time/@EndTime24"/>]
  362.               </td>
  363.               <td class="borderDotTime">
  364.                 <xsl:value-of select="StudentTalk1Time"/>
  365.               </td>
  366.               <td class="borderDotTheme">
  367.                 <xsl:value-of select="StudentSourceMaterial/StudentTalk1Type"/><br />
  368.                 [<xsl:value-of select="StudentSourceMaterial/StudentTalk1Material" disable-output-escaping="yes"/>]<br />
  369.                 <xsl:value-of select="//Labels/CounselPoint"/>&#160;
  370.                 <xsl:choose>
  371.                   <xsl:when test="$Class='M'">
  372.                     <xsl:value-of select="StudentTalk1M/@StudyPoint"/>&#160;
  373.                     <xsl:value-of select="StudentTalk1M/@StudyPointDescription"/>
  374.                     <xsl:apply-templates select="StudentTalk1M/@StudyPoint"/>
  375.                   </xsl:when>
  376.                   <xsl:when test="$Class='1'">
  377.                     <xsl:value-of select="StudentTalk11/@StudyPoint"/>&#160;
  378.                     <xsl:value-of select="StudentTalk11/@StudyPointDescription"/>
  379.                     <xsl:apply-templates select="StudentTalk11/@StudyPoint"/>
  380.                   </xsl:when>
  381.                   <xsl:when test="$Class='2'">
  382.                     <xsl:value-of select="StudentTalk12/@StudyPoint"/>&#160;
  383.                     <xsl:value-of select="StudentTalk12/@StudyPointDescription"/>
  384.                     <xsl:apply-templates select="StudentTalk12/@StudyPoint"/>
  385.                   </xsl:when>
  386.                 </xsl:choose>
  387.                 <br />
  388.               </td>
  389.               <td class="borderDotName">
  390.                 <xsl:choose>
  391.                   <xsl:when test="$Class='M'">
  392.                     <xsl:value-of select="StudentTalk1M"/>&#160;
  393.                   </xsl:when>
  394.                   <xsl:when test="$Class='1'">
  395.                     <xsl:value-of select="StudentTalk11"/>&#160;
  396.                   </xsl:when>
  397.                   <xsl:when test="$Class='2'">
  398.                     <xsl:value-of select="StudentTalk12"/>&#160;
  399.                   </xsl:when>
  400.                 </xsl:choose>
  401.                 <br />
  402.                 <br />
  403.                 <xsl:choose>
  404.                   <xsl:when test="$Class='M'">
  405.                     <xsl:value-of select="StudentTalk1MA"/>&#160;
  406.                   </xsl:when>
  407.                   <xsl:when test="$Class='1'">
  408.                     <xsl:value-of select="StudentTalk11A"/>&#160;
  409.                   </xsl:when>
  410.                   <xsl:when test="$Class='2'">
  411.                     <xsl:value-of select="StudentTalk12A"/>&#160;
  412.                   </xsl:when>
  413.                 </xsl:choose>
  414.               </td>
  415.             </tr>
  416.             <tr>
  417.               <td class="cellComments" colspan="4">
  418.                 <br />
  419.                 <br />
  420.                 <br />
  421.                 Next counsel point:
  422.               </td>
  423.             </tr>
  424.             <tr>
  425.               <td class="borderDotTimeDuration">
  426.                 [<xsl:value-of select="StudentTalk2Time/@EndTime24"/>]
  427.               </td>
  428.               <td class="borderDotTime">
  429.                 <xsl:value-of select="StudentTalk2Time"/>
  430.               </td>
  431.               <td class="borderDotTheme">
  432.                 <xsl:value-of select="StudentSourceMaterial/StudentTalk2Type"/><br />
  433.                 [<xsl:value-of select="StudentSourceMaterial/StudentTalk2Material" disable-output-escaping="yes"/>]<br />
  434.                 <xsl:value-of select="//Labels/CounselPoint"/>&#160;
  435.                 <xsl:choose>
  436.                   <xsl:when test="$Class='M'">
  437.                     <xsl:value-of select="StudentTalk2M/@StudyPoint"/>&#160;
  438.                     <xsl:value-of select="StudentTalk2M/@StudyPointDescription"/>
  439.                     <xsl:apply-templates select="StudentTalk2M/@StudyPoint"/>
  440.                   </xsl:when>
  441.                   <xsl:when test="$Class='1'">
  442.                     <xsl:value-of select="StudentTalk21/@StudyPoint"/>&#160;
  443.                     <xsl:value-of select="StudentTalk21/@StudyPointDescription"/>
  444.                     <xsl:apply-templates select="StudentTalk21/@StudyPoint"/>
  445.                   </xsl:when>
  446.                   <xsl:when test="$Class='2'">
  447.                     <xsl:value-of select="StudentTalk22/@StudyPoint"/>&#160;
  448.                     <xsl:value-of select="StudentTalk22/@StudyPointDescription"/>
  449.                     <xsl:apply-templates select="StudentTalk22/@StudyPoint"/>
  450.                   </xsl:when>
  451.                 </xsl:choose>
  452.                 <br />
  453.               </td>
  454.               <td class="borderDotName">
  455.                 <xsl:choose>
  456.                   <xsl:when test="$Class='M'">
  457.                     <xsl:value-of select="StudentTalk2M"/>&#160;
  458.                   </xsl:when>
  459.                   <xsl:when test="$Class='1'">
  460.                     <xsl:value-of select="StudentTalk21"/>&#160;
  461.                   </xsl:when>
  462.                   <xsl:when test="$Class='2'">
  463.                     <xsl:value-of select="StudentTalk22"/>&#160;
  464.                   </xsl:when>
  465.                 </xsl:choose>
  466.                 <br />
  467.                 <br />
  468.                 <xsl:choose>
  469.                   <xsl:when test="$Class='M'">
  470.                     <xsl:value-of select="StudentTalk2MA"/>&#160;
  471.                   </xsl:when>
  472.                   <xsl:when test="$Class='1'">
  473.                     <xsl:value-of select="StudentTalk21A"/>&#160;
  474.                   </xsl:when>
  475.                   <xsl:when test="$Class='2'">
  476.                     <xsl:value-of select="StudentTalk22A"/>&#160;
  477.                   </xsl:when>
  478.                 </xsl:choose>
  479.               </td>
  480.             </tr>
  481.             <tr>
  482.               <td class="cellComments" colspan="4">
  483.                 <br />
  484.                 <br />
  485.                 <br />
  486.                 Next counsel point:
  487.               </td>
  488.             </tr>
  489.             <tr>
  490.               <td class="borderDotTimeDuration">
  491.                 [<xsl:value-of select="StudentTalk3Time/@EndTime24"/>]
  492.               </td>
  493.               <td class="borderDotTime">
  494.                 <xsl:value-of select="StudentTalk3Time"/>
  495.               </td>
  496.               <td class="borderDotTheme">
  497.                 <xsl:value-of select="StudentSourceMaterial/StudentTalk3Type"/><br />
  498.                 [<xsl:value-of select="StudentSourceMaterial/StudentTalk3Material" disable-output-escaping="yes"/>]<br />
  499.                 <xsl:value-of select="//Labels/CounselPoint"/>&#160;
  500.                 <xsl:choose>
  501.                   <xsl:when test="$Class='M'">
  502.                     <xsl:value-of select="StudentTalk3M/@StudyPoint"/>&#160;
  503.                     <xsl:value-of select="StudentTalk3M/@StudyPointDescription"/>
  504.                     <xsl:apply-templates select="StudentTalk3M/@StudyPoint"/>
  505.                   </xsl:when>
  506.                   <xsl:when test="$Class='1'">
  507.                     <xsl:value-of select="StudentTalk31/@StudyPoint"/>&#160;
  508.                     <xsl:value-of select="StudentTalk31/@StudyPointDescription"/>
  509.                     <xsl:apply-templates select="StudentTalk31/@StudyPoint"/>
  510.                   </xsl:when>
  511.                   <xsl:when test="$Class='2'">
  512.                     <xsl:value-of select="StudentTalk32/@StudyPoint"/>&#160;
  513.                     <xsl:value-of select="StudentTalk32/@StudyPointDescription"/>
  514.                     <xsl:apply-templates select="StudentTalk32/@StudyPoint"/>
  515.                   </xsl:when>
  516.                 </xsl:choose>
  517.                 <br />
  518.               </td>
  519.               <td class="borderDotName">
  520.                 <xsl:choose>
  521.                   <xsl:when test="$Class='M'">
  522.                     <xsl:value-of select="StudentTalk3M"/>&#160;
  523.                   </xsl:when>
  524.                   <xsl:when test="$Class='1'">
  525.                     <xsl:value-of select="StudentTalk31"/>&#160;
  526.                   </xsl:when>
  527.                   <xsl:when test="$Class='2'">
  528.                     <xsl:value-of select="StudentTalk32"/>&#160;
  529.                   </xsl:when>
  530.                 </xsl:choose>
  531.                 <xsl:if test="StudentSourceMaterial/StudentTalk3Type/@IsTalk=0">
  532.                   <br />
  533.                   <br />
  534.                   <xsl:choose>
  535.                     <xsl:when test="$Class='M'">
  536.                       <xsl:value-of select="StudentTalk3MA"/>&#160;
  537.                     </xsl:when>
  538.                     <xsl:when test="$Class='1'">
  539.                       <xsl:value-of select="StudentTalk31A"/>&#160;
  540.                     </xsl:when>
  541.                     <xsl:when test="$Class='2'">
  542.                       <xsl:value-of select="StudentTalk32A"/>&#160;
  543.                     </xsl:when>
  544.                   </xsl:choose>
  545.                 </xsl:if>              
  546.               </td>
  547.             </tr>
  548.             <tr>
  549.               <td class="cellComments" colspan="4">
  550.                 <br />
  551.                 <br />
  552.                 <br />
  553.                 Next counsel point:
  554.               </td>
  555.             </tr>
  556.  
  557.           </xsl:otherwise>
  558.         </xsl:choose>
  559.       </table>
  560.     </div>
  561.   </xsl:template>
  562.  
  563.   <!--Living as Christians-->
  564.   <xsl:template name = "Display_LAC" >
  565.     <div class="containerLAC">
  566.       <table cellpadding="2" cellspacing="0"  class="tableOuter">
  567.         <tr>
  568.           <td class="textLAC" colspan="4">
  569.             <xsl:value-of select="//Labels/LivingAsChristians"/>
  570.           </td>
  571.         </tr>
  572.         <tr>
  573.           <td class="borderDotTimeDuration">
  574.             [<xsl:value-of select="SongMiddle/@EndTime24"/>]
  575.           </td>
  576.           <td class="borderDotTime">
  577.             <xsl:value-of select="//Labels/SongDuration"/>
  578.           </td>
  579.           <td class="borderDotTheme" colspan="2">
  580.             <xsl:value-of select="//Labels/Song"/>&#160;
  581.             <xsl:value-of select="SongMiddle"/>&#160;
  582.             <span class="textSongTitle">
  583.               <xsl:value-of select="SongMiddle/@Title"/>
  584.             </span>
  585.           </td>
  586.         </tr>
  587.         <tr>
  588.           <td class="borderDotTimeDuration">
  589.             [<xsl:value-of select="LivingAsChristians/Item1/Time/@EndTime24"/>]
  590.           </td>
  591.           <td class="borderDotTime">
  592.             <xsl:value-of select="LivingAsChristians/Item1/Time"/>
  593.           </td>
  594.           <td class="borderDotTheme">
  595.             <xsl:value-of select="LivingAsChristians/Item1/Theme" disable-output-escaping="yes"/>&#160;
  596.             <span class="textMethod">
  597.               [<xsl:value-of select="LivingAsChristians/Item1/Method" disable-output-escaping="yes"/>]
  598.             </span>
  599.             <xsl:call-template name="Display_DemoInfo">
  600.               <xsl:with-param name="Item" select="LivingAsChristians/Item1"/>
  601.             </xsl:call-template>
  602.           </td>
  603.           <td class="borderDotName">
  604.             <xsl:value-of select="LivingAsChristians/Item1/Name"/>&#160;
  605.           </td>
  606.         </tr>
  607.         <xsl:if test="LivingAsChristians/@ItemCount=2">
  608.           <tr>
  609.             <td class="borderDotTimeDuration">
  610.               [<xsl:value-of select="LivingAsChristians/Item2/Time/@EndTime24"/>]
  611.             </td>
  612.             <td class="borderDotTime">
  613.               <xsl:value-of select="LivingAsChristians/Item2/Time"/>
  614.             </td>
  615.             <td class="borderDotTheme">
  616.               <xsl:value-of select="LivingAsChristians/Item2/Theme" disable-output-escaping="yes"/>&#160;
  617.               <span class="textMethod">
  618.                 [<xsl:value-of select="LivingAsChristians/Item2/Method" disable-output-escaping="yes"/>]
  619.               </span>
  620.               <xsl:call-template name="Display_DemoInfo">
  621.                 <xsl:with-param name="Item" select="LivingAsChristians/Item2"/>
  622.               </xsl:call-template>
  623.             </td>
  624.             <td class="borderDotName">
  625.               <xsl:value-of select="LivingAsChristians/Item2/Name"/>&#160;
  626.             </td>
  627.           </tr>
  628.         </xsl:if>
  629.         <xsl:choose>
  630.           <!--We include the congregation bible study information and the review-->
  631.           <xsl:when test="CircuitVisit=0">
  632.             <tr>
  633.               <td class="borderDotTimeDuration">
  634.                 [<xsl:value-of select="LivingAsChristians/CongregationBibleStudy/Time/@EndTime24"/>]
  635.               </td>
  636.               <td class="borderDotTime">
  637.                 <xsl:value-of select="LivingAsChristians/CongregationBibleStudy/Time"/>
  638.               </td>
  639.               <td class="borderDotTheme">
  640.                 <xsl:value-of select="//Labels/CongregationBibleStudy"/>&#160;
  641.                 <span class="textCongregationBibleStudyMaterial">
  642.                   [<xsl:value-of select="LivingAsChristians/CongregationBibleStudy/SourceMaterial" disable-output-escaping="yes"/>]
  643.                 </span><br />
  644.                 <span class="floatTextRight">
  645.                   <xsl:value-of select="//Labels/CBSReader"/>&#58;
  646.                 </span>
  647.               </td>
  648.               <td class="borderDotName">
  649.                 <xsl:value-of select="LivingAsChristians/CongregationBibleStudy/Conductor"/>&#160;
  650.                 <br />
  651.                 <xsl:value-of select="LivingAsChristians/CongregationBibleStudy/Reader"/>
  652.               </td>
  653.             </tr>
  654.             <tr>
  655.               <td class="borderDotTimeDuration">
  656.                 [<xsl:value-of select="ClosingComments/Time/@EndTime24"/>]
  657.               </td>
  658.               <td class="borderDotTime">
  659.                 <xsl:value-of select="ClosingComments/Time"/>
  660.               </td>
  661.               <td class="borderDotTheme" colspan="2">
  662.                 <xsl:value-of select="ClosingComments/Theme"/>
  663.               </td>
  664.             </tr>
  665.             <tr>
  666.               <td class="cellComments" colspan="4">
  667.                 <xsl:variable name="AssignHistory" select="document('AssignHistory.xml')"/>
  668.                 <xsl:variable name="week" select="Date/@NextWeek"/>
  669.                 <xsl:variable name="NextReviewQuestion" select="$AssignHistory/AssignmentHistory/*[name()=$week]/ReviewQuestion"/>
  670.                 <xsl:if test="normalize-space($NextReviewQuestion) != ''">
  671.                   <span class="textReviewQuestionLabel">
  672.                     <xsl:value-of select="//Labels/NextReviewQuestion"/>&#160;
  673.                   </span>
  674.                   <span class="textReviewQuestion">
  675.                     <xsl:value-of select="$NextReviewQuestion"/>
  676.                   </span>
  677.                   <br />
  678.                 </xsl:if>
  679.                 <br />
  680.                 <br />
  681.                 <br />
  682.                 <span style="font-size: 8pt;">
  683.                   <xsl:apply-templates select="$AssignHistory/AssignmentHistory/*[name()=$week]/StudentItems">
  684.                     <xsl:with-param name="MainHall" select="//Labels/MainHall"/>
  685.                     <xsl:with-param name="AuxClass1" select="//Labels/AuxClass1"/>
  686.                     <xsl:with-param name="AuxClass2" select="//Labels/AuxClass2"/>
  687.                   </xsl:apply-templates>
  688.                 </span>
  689.               </td>
  690.             </tr>
  691.           </xsl:when>
  692.           <!--We include the review and the circuit overseer talk-->
  693.           <xsl:otherwise>
  694.             <tr>
  695.               <td class="borderDotTimeDuration">
  696.                 [<xsl:value-of select="ClosingComments/Time/@EndTime24"/>]
  697.               </td>
  698.               <td class="borderDotTime">
  699.                 <xsl:value-of select="ClosingComments/Time"/>
  700.               </td>
  701.               <td class="borderDotTheme" colspan="2">
  702.                 <xsl:value-of select="ClosingComments/Theme"/>
  703.               </td>
  704.             </tr>
  705.             <tr>
  706.               <td class="cellComments" colspan="4">
  707.                 <xsl:variable name="AssignHistory" select="document('AssignHistory.xml')"/>
  708.                 <xsl:variable name="week" select="Date/@NextWeek"/>
  709.                 <xsl:variable name="NextReviewQuestion" select="$AssignHistory/AssignmentHistory/*[name()=$week]/ReviewQuestion"/>
  710.                 <xsl:if test="normalize-space($NextReviewQuestion) != ''">
  711.                   <span class="textReviewQuestionLabel">
  712.                     <xsl:value-of select="//Labels/NextReviewQuestion"/>&#160;
  713.                   </span>
  714.                   <span class="textReviewQuestion">
  715.                     <xsl:value-of select="$NextReviewQuestion"/>
  716.                   </span>
  717.                   <br />
  718.                 </xsl:if>
  719.                 <br />
  720.                 <br />
  721.                 <br />
  722.                 <span style="font-size: 8pt;">
  723.                   <xsl:apply-templates select="$AssignHistory/AssignmentHistory/*[name()=$week]/StudentItems">
  724.                     <xsl:with-param name="MainHall" select="//Labels/MainHall"/>
  725.                     <xsl:with-param name="AuxClass1" select="//Labels/AuxClass1"/>
  726.                     <xsl:with-param name="AuxClass2" select="//Labels/AuxClass2"/>
  727.                   </xsl:apply-templates>
  728.                 </span>
  729.               </td>
  730.             </tr>
  731.             <tr>
  732.               <td class="borderDotTimeDuration">
  733.                 [<xsl:value-of select="LivingAsChristians/ItemCircuitOverseer/Time/@EndTime24"/>]
  734.               </td>
  735.               <td class="borderDotTime">
  736.                 <xsl:value-of select="LivingAsChristians/ItemCircuitOverseer/Time"/>
  737.               </td>
  738.               <td class="borderDotTheme">
  739.                 <xsl:value-of select="LivingAsChristians/ItemCircuitOverseer/Theme" disable-output-escaping="yes"/>&#160;
  740.                 <span class="textMethod">
  741.                   [<xsl:value-of select="LivingAsChristians/ItemCircuitOverseer/Method" disable-output-escaping="yes"/>]
  742.                 </span>
  743.               </td>
  744.               <td class="borderDotName">
  745.                 <xsl:value-of select="LivingAsChristians/ItemCircuitOverseer/Name"/>&#160;
  746.               </td>
  747.             </tr>
  748.           </xsl:otherwise>
  749.         </xsl:choose>
  750.         <tr>
  751.           <td class="borderDotTimeDuration">
  752.             [<xsl:value-of select="SongEnd/@EndTime24"/>]
  753.           </td>
  754.           <td class="borderDotTime">
  755.             <xsl:value-of select="//Labels/SongDuration"/>
  756.           </td>
  757.           <td class="borderDotTheme">
  758.             <span class="floatTextLeft">
  759.               <xsl:value-of select="//Labels/Song"/>&#160;
  760.               <xsl:value-of select="SongEnd"/>&#160;
  761.               <span class="textSongTitle">
  762.                 <xsl:value-of select="SongEnd/@Title"/>
  763.               </span>
  764.             </span>
  765.             <span class="floatTextRight">
  766.               <xsl:value-of select="//Labels/Prayer"/>
  767.             </span>
  768.           </td>
  769.           <td class="borderDotName">
  770.             <xsl:value-of select="Prayer2"/>&#160;
  771.           </td>
  772.         </tr>
  773.       </table>
  774.     </div>
  775.   </xsl:template>
  776.  
  777.   <xsl:template match="StudentItems">
  778.     <xsl:param name="MainHall"/>
  779.     <xsl:param name="AuxClass1"/>
  780.     <xsl:param name="AuxClass2"/>
  781.     <table cellpadding="2">
  782.       <thead>
  783.         <tr>
  784.           <th/>
  785.           <xsl:for-each select="Item[contains('|1|8|15|', concat('|', position(), '|'))]">
  786.             <th>
  787.               <xsl:choose>
  788.                 <xsl:when test="position() = 1"><u><xsl:value-of select="$MainHall"/></u></xsl:when>
  789.                 <xsl:when test="position() = 2"><u><xsl:value-of select="$AuxClass1"/></u></xsl:when>
  790.                 <xsl:when test="position() = 3"><u><xsl:value-of select="$AuxClass2"/></u></xsl:when>
  791.               </xsl:choose>
  792.             </th>
  793.           </xsl:for-each>
  794.         </tr>
  795.       </thead>
  796.       <tbody>
  797.         <tr>
  798.           <th>
  799.             <xsl:value-of select="Item[1]/Description"/>
  800.           </th>
  801.           <xsl:for-each select="Item[contains('|1|8|15|', concat('|', position(), '|'))]">
  802.             <td>
  803.               <xsl:value-of select="Name"/>
  804.             </td>
  805.           </xsl:for-each>
  806.         </tr>
  807.         <tr>
  808.           <th>
  809.             <xsl:value-of select="Item[2]/Description"/>
  810.           </th>
  811.           <xsl:for-each select="Item[contains('|2|9|16|', concat('|', position(), '|'))]">
  812.             <td>
  813.               <xsl:value-of select="Name"/>
  814.               &#160;/&#160;
  815.               <xsl:value-of select="following-sibling::Item[1]/Name"/>
  816.             </td>
  817.           </xsl:for-each>
  818.         </tr>
  819.         <tr>
  820.           <th>
  821.             <xsl:value-of select="Item[4]/Description"/>
  822.           </th>
  823.           <xsl:for-each select="Item[contains('|4|11|18|', concat('|', position(), '|'))]">
  824.             <td>
  825.               <xsl:value-of select="Name"/>
  826.               &#160;/&#160;
  827.               <xsl:value-of select="following-sibling::Item[1]/Name"/>
  828.             </td>
  829.           </xsl:for-each>
  830.         </tr>
  831.         <tr>
  832.           <th>
  833.             <xsl:value-of select="Item[6]/Description"/>
  834.           </th>
  835.           <xsl:for-each select="Item[contains('|6|13|20|', concat('|', position(), '|'))]">
  836.             <td>
  837.               <xsl:value-of select="Name"/>
  838.               &#160;/&#160;
  839.               <xsl:value-of select="following-sibling::Item[1]/Name"/>
  840.             </td>
  841.           </xsl:for-each>
  842.         </tr>
  843.       </tbody>
  844.     </table>
  845.   </xsl:template>
  846.  
  847.   <xsl:template name="Display_DemoInfo">
  848.     <xsl:param name="Item" />
  849.  
  850.     <xsl:if test="$Item/DemoInfo/@ItemCount &gt;= 1">
  851.  
  852.       <xsl:for-each select="$Item/DemoInfo/Demo">
  853.         <xsl:choose>
  854.           <xsl:when test="@InsertNewLine=1">
  855.             <span class="textDemoNewlinePrefix">
  856.               <br />
  857.             </span>
  858.             <span class="textDemoBracket">[</span>
  859.             <span class="textDemoDescription">
  860.               <xsl:value-of select="@Type"/>:&#160;
  861.             </span>
  862.           </xsl:when>
  863.           <xsl:otherwise>
  864.             <span class="textDemoComma">,&#160;</span>
  865.           </xsl:otherwise>
  866.         </xsl:choose>
  867.  
  868.         <xsl:if test="normalize-space(Prefix) != ''">
  869.           <span class="textDemoPrefix">
  870.             <xsl:value-of select="Prefix"/>&#160;
  871.           </span>
  872.         </xsl:if>
  873.  
  874.         <xsl:if test ="@ParticipantCount &gt;= 1">
  875.           <span class="textDemoBrother">
  876.             <xsl:value-of select="Participant1/Name"/>
  877.           </span>
  878.         </xsl:if>
  879.  
  880.         <xsl:if test ="@ParticipantCount &gt;= 2">
  881.           <xsl:choose>
  882.             <xsl:when test="Participant2/Task = Participant1/Task">&#160;/&#160;</xsl:when>
  883.             <xsl:otherwise>&#160;-&#160;</xsl:otherwise>
  884.           </xsl:choose>
  885.  
  886.           <span class="textDemoBrother">
  887.             <xsl:value-of select="Participant2/Name"/>
  888.           </span>
  889.         </xsl:if>
  890.  
  891.         <xsl:if test ="@ParticipantCount &gt;= 3">
  892.           <xsl:choose>
  893.             <xsl:when test="Participant3/Task = Participant2/Task">&#160;/&#160;</xsl:when>
  894.             <xsl:otherwise>&#160;-&#160;</xsl:otherwise>
  895.           </xsl:choose>
  896.  
  897.           <span class="textDemoBrother">
  898.             <xsl:value-of select="Participant3/Name"/>
  899.           </span>
  900.         </xsl:if>
  901.         <xsl:if test ="@ParticipantCount &gt;= 4">
  902.           <xsl:choose>
  903.             <xsl:when test="Participant4/Task = Participant3/Task">&#160;/&#160;</xsl:when>
  904.             <xsl:otherwise>&#160;-&#160;</xsl:otherwise>
  905.           </xsl:choose>
  906.  
  907.           <span class="textDemoBrother">
  908.             <xsl:value-of select="Participant4/Name"/>
  909.           </span>
  910.         </xsl:if>
  911.         <span class="textDemoBracket">]</span>
  912.       </xsl:for-each>
  913.     </xsl:if>
  914.  
  915.   </xsl:template>
  916.  
  917. </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement