Advertisement
TheocraticSoftware

Worksheet-Next Students-PageNo.XSL

Aug 22nd, 2017
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 36.47 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.   <!--Display the study number, description and page number.-->
  304.   <xsl:template match="@StudyPoint">
  305.     <xsl:choose>
  306.       <xsl:when test="current()!=''">
  307.         <xsl:variable name="StudyPageNumbers" select="document('StudyPointPageNumbers.xml')"/>
  308.         <xsl:text> (Page: </xsl:text>
  309.         <xsl:value-of select="$StudyPageNumbers/Lessons/Study[@Number=current()]/@Page"/>
  310.         <xsl:text>)</xsl:text>
  311.       </xsl:when>
  312.       <xsl:otherwise>
  313.         <xsl:text>No study point.</xsl:text>
  314.       </xsl:otherwise>
  315.     </xsl:choose>
  316.   </xsl:template>
  317.  
  318.   <!--Apply Yourself To The Field Ministry-->
  319.   <xsl:template name = "Display_AYTFM" >
  320.     <xsl:param name = "Class" />
  321.     <div class="containerAYFM">
  322.       <table cellpadding="2" cellspacing="0"  class="tableOuter">
  323.         <tr>
  324.           <td class="textAYFM" colspan="4">
  325.             <xsl:value-of select="//Labels/ApplyYourselfToTheFieldMinistry"/>
  326.           </td>
  327.         </tr>
  328.  
  329.         <xsl:choose>
  330.           <!--Presentations-->
  331.           <xsl:when test="FirstWeekOfMonth=1">
  332.             <tr>
  333.               <td class="borderDotTimeDuration">
  334.                 [<xsl:value-of select="Presentations/Time/@EndTime24"/>]
  335.               </td>
  336.               <td class="borderDotTime">
  337.                 <xsl:value-of select="Presentations/Time"/>
  338.               </td>
  339.               <td class="borderDotTheme">
  340.                 <xsl:value-of select="Presentations/Theme" disable-output-escaping="yes"/>
  341.                 <br />
  342.                 <span class="textMethod">
  343.                   [<xsl:value-of select="Presentations/Method" disable-output-escaping="yes"/>]
  344.                 </span>
  345.               </td>
  346.               <td class="borderDotName">
  347.                 <xsl:value-of select="Presentations/Name"/>&#160;
  348.               </td>
  349.             </tr>
  350.           </xsl:when>
  351.           <!--Student talks-->
  352.           <xsl:otherwise>
  353.             <tr>
  354.               <td class="borderDotTimeDuration">
  355.                 [<xsl:value-of select="StudentTalk1Time/@EndTime24"/>]
  356.               </td>
  357.               <td class="borderDotTime">
  358.                 <xsl:value-of select="StudentTalk1Time"/>
  359.               </td>
  360.               <td class="borderDotTheme">
  361.                 <xsl:value-of select="StudentSourceMaterial/StudentTalk1Type"/><br />
  362.                 [<xsl:value-of select="StudentSourceMaterial/StudentTalk1Material" disable-output-escaping="yes"/>]<br />
  363.                 <xsl:value-of select="//Labels/CounselPoint"/>&#160;
  364.                 <xsl:choose>
  365.                   <xsl:when test="$Class='M'">
  366.                     <xsl:value-of select="StudentTalk1M/@StudyPoint"/>&#160;
  367.                     <xsl:value-of select="StudentTalk1M/@StudyPointDescription"/>
  368.                     <xsl:apply-templates select="StudentTalk1M/@StudyPoint"/>
  369.                   </xsl:when>
  370.                   <xsl:when test="$Class='1'">
  371.                     <xsl:value-of select="StudentTalk11/@StudyPoint"/>&#160;
  372.                     <xsl:value-of select="StudentTalk11/@StudyPointDescription"/>
  373.                     <xsl:apply-templates select="StudentTalk11/@StudyPoint"/>
  374.                   </xsl:when>
  375.                   <xsl:when test="$Class='2'">
  376.                     <xsl:value-of select="StudentTalk12/@StudyPoint"/>&#160;
  377.                     <xsl:value-of select="StudentTalk12/@StudyPointDescription"/>
  378.                     <xsl:apply-templates select="StudentTalk12/@StudyPoint"/>
  379.                   </xsl:when>
  380.                 </xsl:choose>
  381.                 <br />
  382.               </td>
  383.               <td class="borderDotName">
  384.                 <xsl:choose>
  385.                   <xsl:when test="$Class='M'">
  386.                     <xsl:value-of select="StudentTalk1M"/>&#160;
  387.                   </xsl:when>
  388.                   <xsl:when test="$Class='1'">
  389.                     <xsl:value-of select="StudentTalk11"/>&#160;
  390.                   </xsl:when>
  391.                   <xsl:when test="$Class='2'">
  392.                     <xsl:value-of select="StudentTalk12"/>&#160;
  393.                   </xsl:when>
  394.                 </xsl:choose>
  395.                 <br />
  396.                 <br />
  397.                 <xsl:choose>
  398.                   <xsl:when test="$Class='M'">
  399.                     <xsl:value-of select="StudentTalk1MA"/>&#160;
  400.                   </xsl:when>
  401.                   <xsl:when test="$Class='1'">
  402.                     <xsl:value-of select="StudentTalk11A"/>&#160;
  403.                   </xsl:when>
  404.                   <xsl:when test="$Class='2'">
  405.                     <xsl:value-of select="StudentTalk12A"/>&#160;
  406.                   </xsl:when>
  407.                 </xsl:choose>
  408.               </td>
  409.             </tr>
  410.             <tr>
  411.               <td class="cellComments" colspan="4">
  412.                 <br />
  413.                 <br />
  414.                 <br />
  415.                 Next counsel point:
  416.               </td>
  417.             </tr>
  418.             <tr>
  419.               <td class="borderDotTimeDuration">
  420.                 [<xsl:value-of select="StudentTalk2Time/@EndTime24"/>]
  421.               </td>
  422.               <td class="borderDotTime">
  423.                 <xsl:value-of select="StudentTalk2Time"/>
  424.               </td>
  425.               <td class="borderDotTheme">
  426.                 <xsl:value-of select="StudentSourceMaterial/StudentTalk2Type"/><br />
  427.                 [<xsl:value-of select="StudentSourceMaterial/StudentTalk2Material" disable-output-escaping="yes"/>]<br />
  428.                 <xsl:value-of select="//Labels/CounselPoint"/>&#160;
  429.                 <xsl:choose>
  430.                   <xsl:when test="$Class='M'">
  431.                     <xsl:value-of select="StudentTalk2M/@StudyPoint"/>&#160;
  432.                     <xsl:value-of select="StudentTalk2M/@StudyPointDescription"/>
  433.                     <xsl:apply-templates select="StudentTalk2M/@StudyPoint"/>
  434.                   </xsl:when>
  435.                   <xsl:when test="$Class='1'">
  436.                     <xsl:value-of select="StudentTalk21/@StudyPoint"/>&#160;
  437.                     <xsl:value-of select="StudentTalk21/@StudyPointDescription"/>
  438.                     <xsl:apply-templates select="StudentTalk21/@StudyPoint"/>
  439.                   </xsl:when>
  440.                   <xsl:when test="$Class='2'">
  441.                     <xsl:value-of select="StudentTalk22/@StudyPoint"/>&#160;
  442.                     <xsl:value-of select="StudentTalk22/@StudyPointDescription"/>
  443.                     <xsl:apply-templates select="StudentTalk22/@StudyPoint"/>
  444.                   </xsl:when>
  445.                 </xsl:choose>
  446.                 <br />
  447.               </td>
  448.               <td class="borderDotName">
  449.                 <xsl:choose>
  450.                   <xsl:when test="$Class='M'">
  451.                     <xsl:value-of select="StudentTalk2M"/>&#160;
  452.                   </xsl:when>
  453.                   <xsl:when test="$Class='1'">
  454.                     <xsl:value-of select="StudentTalk21"/>&#160;
  455.                   </xsl:when>
  456.                   <xsl:when test="$Class='2'">
  457.                     <xsl:value-of select="StudentTalk22"/>&#160;
  458.                   </xsl:when>
  459.                 </xsl:choose>
  460.                 <br />
  461.                 <br />
  462.                 <xsl:choose>
  463.                   <xsl:when test="$Class='M'">
  464.                     <xsl:value-of select="StudentTalk2MA"/>&#160;
  465.                   </xsl:when>
  466.                   <xsl:when test="$Class='1'">
  467.                     <xsl:value-of select="StudentTalk21A"/>&#160;
  468.                   </xsl:when>
  469.                   <xsl:when test="$Class='2'">
  470.                     <xsl:value-of select="StudentTalk22A"/>&#160;
  471.                   </xsl:when>
  472.                 </xsl:choose>
  473.               </td>
  474.             </tr>
  475.             <tr>
  476.               <td class="cellComments" colspan="4">
  477.                 <br />
  478.                 <br />
  479.                 <br />
  480.                 Next counsel point:
  481.               </td>
  482.             </tr>
  483.             <tr>
  484.               <td class="borderDotTimeDuration">
  485.                 [<xsl:value-of select="StudentTalk3Time/@EndTime24"/>]
  486.               </td>
  487.               <td class="borderDotTime">
  488.                 <xsl:value-of select="StudentTalk3Time"/>
  489.               </td>
  490.               <td class="borderDotTheme">
  491.                 <xsl:value-of select="StudentSourceMaterial/StudentTalk3Type"/><br />
  492.                 [<xsl:value-of select="StudentSourceMaterial/StudentTalk3Material" disable-output-escaping="yes"/>]<br />
  493.                 <xsl:value-of select="//Labels/CounselPoint"/>&#160;
  494.                 <xsl:choose>
  495.                   <xsl:when test="$Class='M'">
  496.                     <xsl:value-of select="StudentTalk3M/@StudyPoint"/>&#160;
  497.                     <xsl:value-of select="StudentTalk3M/@StudyPointDescription"/>
  498.                     <xsl:apply-templates select="StudentTalk3M/@StudyPoint"/>
  499.                   </xsl:when>
  500.                   <xsl:when test="$Class='1'">
  501.                     <xsl:value-of select="StudentTalk31/@StudyPoint"/>&#160;
  502.                     <xsl:value-of select="StudentTalk31/@StudyPointDescription"/>
  503.                     <xsl:apply-templates select="StudentTalk31/@StudyPoint"/>
  504.                   </xsl:when>
  505.                   <xsl:when test="$Class='2'">
  506.                     <xsl:value-of select="StudentTalk32/@StudyPoint"/>&#160;
  507.                     <xsl:value-of select="StudentTalk32/@StudyPointDescription"/>
  508.                     <xsl:apply-templates select="StudentTalk32/@StudyPoint"/>
  509.                   </xsl:when>
  510.                 </xsl:choose>
  511.                 <br />
  512.               </td>
  513.               <td class="borderDotName">
  514.                 <xsl:choose>
  515.                   <xsl:when test="$Class='M'">
  516.                     <xsl:value-of select="StudentTalk3M"/>&#160;
  517.                   </xsl:when>
  518.                   <xsl:when test="$Class='1'">
  519.                     <xsl:value-of select="StudentTalk31"/>&#160;
  520.                   </xsl:when>
  521.                   <xsl:when test="$Class='2'">
  522.                     <xsl:value-of select="StudentTalk32"/>&#160;
  523.                   </xsl:when>
  524.                 </xsl:choose>
  525.                 <xsl:if test="StudentSourceMaterial/StudentTalk3Type/@IsTalk=0">
  526.                   <br />
  527.                   <br />
  528.                   <xsl:choose>
  529.                     <xsl:when test="$Class='M'">
  530.                       <xsl:value-of select="StudentTalk3MA"/>&#160;
  531.                     </xsl:when>
  532.                     <xsl:when test="$Class='1'">
  533.                       <xsl:value-of select="StudentTalk31A"/>&#160;
  534.                     </xsl:when>
  535.                     <xsl:when test="$Class='2'">
  536.                       <xsl:value-of select="StudentTalk32A"/>&#160;
  537.                     </xsl:when>
  538.                   </xsl:choose>
  539.                 </xsl:if>              
  540.               </td>
  541.             </tr>
  542.             <tr>
  543.               <td class="cellComments" colspan="4">
  544.                 <br />
  545.                 <br />
  546.                 <br />
  547.                 Next counsel point:
  548.               </td>
  549.             </tr>
  550.  
  551.           </xsl:otherwise>
  552.         </xsl:choose>
  553.       </table>
  554.     </div>
  555.   </xsl:template>
  556.  
  557.   <!--Living as Christians-->
  558.   <xsl:template name = "Display_LAC" >
  559.     <div class="containerLAC">
  560.       <table cellpadding="2" cellspacing="0"  class="tableOuter">
  561.         <tr>
  562.           <td class="textLAC" colspan="4">
  563.             <xsl:value-of select="//Labels/LivingAsChristians"/>
  564.           </td>
  565.         </tr>
  566.         <tr>
  567.           <td class="borderDotTimeDuration">
  568.             [<xsl:value-of select="SongMiddle/@EndTime24"/>]
  569.           </td>
  570.           <td class="borderDotTime">
  571.             <xsl:value-of select="//Labels/SongDuration"/>
  572.           </td>
  573.           <td class="borderDotTheme" colspan="2">
  574.             <xsl:value-of select="//Labels/Song"/>&#160;
  575.             <xsl:value-of select="SongMiddle"/>&#160;
  576.             <span class="textSongTitle">
  577.               <xsl:value-of select="SongMiddle/@Title"/>
  578.             </span>
  579.           </td>
  580.         </tr>
  581.         <tr>
  582.           <td class="borderDotTimeDuration">
  583.             [<xsl:value-of select="LivingAsChristians/Item1/Time/@EndTime24"/>]
  584.           </td>
  585.           <td class="borderDotTime">
  586.             <xsl:value-of select="LivingAsChristians/Item1/Time"/>
  587.           </td>
  588.           <td class="borderDotTheme">
  589.             <xsl:value-of select="LivingAsChristians/Item1/Theme" disable-output-escaping="yes"/>&#160;
  590.             <span class="textMethod">
  591.               [<xsl:value-of select="LivingAsChristians/Item1/Method" disable-output-escaping="yes"/>]
  592.             </span>
  593.             <xsl:call-template name="Display_DemoInfo">
  594.               <xsl:with-param name="Item" select="LivingAsChristians/Item1"/>
  595.             </xsl:call-template>
  596.           </td>
  597.           <td class="borderDotName">
  598.             <xsl:value-of select="LivingAsChristians/Item1/Name"/>&#160;
  599.           </td>
  600.         </tr>
  601.         <xsl:if test="LivingAsChristians/@ItemCount=2">
  602.           <tr>
  603.             <td class="borderDotTimeDuration">
  604.               [<xsl:value-of select="LivingAsChristians/Item2/Time/@EndTime24"/>]
  605.             </td>
  606.             <td class="borderDotTime">
  607.               <xsl:value-of select="LivingAsChristians/Item2/Time"/>
  608.             </td>
  609.             <td class="borderDotTheme">
  610.               <xsl:value-of select="LivingAsChristians/Item2/Theme" disable-output-escaping="yes"/>&#160;
  611.               <span class="textMethod">
  612.                 [<xsl:value-of select="LivingAsChristians/Item2/Method" disable-output-escaping="yes"/>]
  613.               </span>
  614.               <xsl:call-template name="Display_DemoInfo">
  615.                 <xsl:with-param name="Item" select="LivingAsChristians/Item2"/>
  616.               </xsl:call-template>
  617.             </td>
  618.             <td class="borderDotName">
  619.               <xsl:value-of select="LivingAsChristians/Item2/Name"/>&#160;
  620.             </td>
  621.           </tr>
  622.         </xsl:if>
  623.         <xsl:choose>
  624.           <!--We include the congregation bible study information and the review-->
  625.           <xsl:when test="CircuitVisit=0">
  626.             <tr>
  627.               <td class="borderDotTimeDuration">
  628.                 [<xsl:value-of select="LivingAsChristians/CongregationBibleStudy/Time/@EndTime24"/>]
  629.               </td>
  630.               <td class="borderDotTime">
  631.                 <xsl:value-of select="LivingAsChristians/CongregationBibleStudy/Time"/>
  632.               </td>
  633.               <td class="borderDotTheme">
  634.                 <xsl:value-of select="//Labels/CongregationBibleStudy"/>&#160;
  635.                 <span class="textCongregationBibleStudyMaterial">
  636.                   [<xsl:value-of select="LivingAsChristians/CongregationBibleStudy/SourceMaterial" disable-output-escaping="yes"/>]
  637.                 </span><br />
  638.                 <span class="floatTextRight">
  639.                   <xsl:value-of select="//Labels/CBSReader"/>&#58;
  640.                 </span>
  641.               </td>
  642.               <td class="borderDotName">
  643.                 <xsl:value-of select="LivingAsChristians/CongregationBibleStudy/Conductor"/>&#160;
  644.                 <br />
  645.                 <xsl:value-of select="LivingAsChristians/CongregationBibleStudy/Reader"/>
  646.               </td>
  647.             </tr>
  648.             <tr>
  649.               <td class="borderDotTimeDuration">
  650.                 [<xsl:value-of select="ClosingComments/Time/@EndTime24"/>]
  651.               </td>
  652.               <td class="borderDotTime">
  653.                 <xsl:value-of select="ClosingComments/Time"/>
  654.               </td>
  655.               <td class="borderDotTheme" colspan="2">
  656.                 <xsl:value-of select="ClosingComments/Theme"/>
  657.               </td>
  658.             </tr>
  659.             <tr>
  660.               <td class="cellComments" colspan="4">
  661.                 <xsl:variable name="AssignHistory" select="document('AssignHistory.xml')"/>
  662.                 <xsl:variable name="week" select="Date/@NextWeek"/>
  663.                 <xsl:variable name="NextReviewQuestion" select="$AssignHistory/AssignmentHistory/*[name()=$week]/ReviewQuestion"/>
  664.                 <xsl:if test="normalize-space($NextReviewQuestion) != ''">
  665.                   <span class="textReviewQuestionLabel">
  666.                     <xsl:value-of select="//Labels/NextReviewQuestion"/>&#160;
  667.                   </span>
  668.                   <span class="textReviewQuestion">
  669.                     <xsl:value-of select="$NextReviewQuestion"/>
  670.                   </span>
  671.                   <br />
  672.                 </xsl:if>
  673.                 <br />
  674.                 <br />
  675.                 <br />
  676.                 <span style="font-size: 8pt;">
  677.                   <xsl:apply-templates select="$AssignHistory/AssignmentHistory/*[name()=$week]/StudentItems">
  678.                     <xsl:with-param name="MainHall" select="//Labels/MainHall"/>
  679.                     <xsl:with-param name="AuxClass1" select="//Labels/AuxClass1"/>
  680.                     <xsl:with-param name="AuxClass2" select="//Labels/AuxClass2"/>
  681.                   </xsl:apply-templates>
  682.                 </span>
  683.               </td>
  684.             </tr>
  685.           </xsl:when>
  686.           <!--We include the review and the circuit overseer talk-->
  687.           <xsl:otherwise>
  688.             <tr>
  689.               <td class="borderDotTimeDuration">
  690.                 [<xsl:value-of select="ClosingComments/Time/@EndTime24"/>]
  691.               </td>
  692.               <td class="borderDotTime">
  693.                 <xsl:value-of select="ClosingComments/Time"/>
  694.               </td>
  695.               <td class="borderDotTheme" colspan="2">
  696.                 <xsl:value-of select="ClosingComments/Theme"/>
  697.               </td>
  698.             </tr>
  699.             <tr>
  700.               <td class="cellComments" colspan="4">
  701.                 <xsl:variable name="AssignHistory" select="document('AssignHistory.xml')"/>
  702.                 <xsl:variable name="week" select="Date/@NextWeek"/>
  703.                 <xsl:variable name="NextReviewQuestion" select="$AssignHistory/AssignmentHistory/*[name()=$week]/ReviewQuestion"/>
  704.                 <xsl:if test="normalize-space($NextReviewQuestion) != ''">
  705.                   <span class="textReviewQuestionLabel">
  706.                     <xsl:value-of select="//Labels/NextReviewQuestion"/>&#160;
  707.                   </span>
  708.                   <span class="textReviewQuestion">
  709.                     <xsl:value-of select="$NextReviewQuestion"/>
  710.                   </span>
  711.                   <br />
  712.                 </xsl:if>
  713.                 <br />
  714.                 <br />
  715.                 <br />
  716.                 <span style="font-size: 8pt;">
  717.                   <xsl:apply-templates select="$AssignHistory/AssignmentHistory/*[name()=$week]/StudentItems">
  718.                     <xsl:with-param name="MainHall" select="//Labels/MainHall"/>
  719.                     <xsl:with-param name="AuxClass1" select="//Labels/AuxClass1"/>
  720.                     <xsl:with-param name="AuxClass2" select="//Labels/AuxClass2"/>
  721.                   </xsl:apply-templates>
  722.                 </span>
  723.               </td>
  724.             </tr>
  725.             <tr>
  726.               <td class="borderDotTimeDuration">
  727.                 [<xsl:value-of select="LivingAsChristians/ItemCircuitOverseer/Time/@EndTime24"/>]
  728.               </td>
  729.               <td class="borderDotTime">
  730.                 <xsl:value-of select="LivingAsChristians/ItemCircuitOverseer/Time"/>
  731.               </td>
  732.               <td class="borderDotTheme">
  733.                 <xsl:value-of select="LivingAsChristians/ItemCircuitOverseer/Theme" disable-output-escaping="yes"/>&#160;
  734.                 <span class="textMethod">
  735.                   [<xsl:value-of select="LivingAsChristians/ItemCircuitOverseer/Method" disable-output-escaping="yes"/>]
  736.                 </span>
  737.               </td>
  738.               <td class="borderDotName">
  739.                 <xsl:value-of select="LivingAsChristians/ItemCircuitOverseer/Name"/>&#160;
  740.               </td>
  741.             </tr>
  742.           </xsl:otherwise>
  743.         </xsl:choose>
  744.         <tr>
  745.           <td class="borderDotTimeDuration">
  746.             [<xsl:value-of select="SongEnd/@EndTime24"/>]
  747.           </td>
  748.           <td class="borderDotTime">
  749.             <xsl:value-of select="//Labels/SongDuration"/>
  750.           </td>
  751.           <td class="borderDotTheme">
  752.             <span class="floatTextLeft">
  753.               <xsl:value-of select="//Labels/Song"/>&#160;
  754.               <xsl:value-of select="SongEnd"/>&#160;
  755.               <span class="textSongTitle">
  756.                 <xsl:value-of select="SongEnd/@Title"/>
  757.               </span>
  758.             </span>
  759.             <span class="floatTextRight">
  760.               <xsl:value-of select="//Labels/Prayer"/>
  761.             </span>
  762.           </td>
  763.           <td class="borderDotName">
  764.             <xsl:value-of select="Prayer2"/>&#160;
  765.           </td>
  766.         </tr>
  767.       </table>
  768.     </div>
  769.   </xsl:template>
  770.  
  771.   <xsl:template match="StudentItems">
  772.     <xsl:param name="MainHall"/>
  773.     <xsl:param name="AuxClass1"/>
  774.     <xsl:param name="AuxClass2"/>
  775.     <table cellpadding="2">
  776.       <thead>
  777.         <tr>
  778.           <th/>
  779.           <xsl:for-each select="Item[contains('|1|8|15|', concat('|', position(), '|'))]">
  780.             <th>
  781.               <xsl:choose>
  782.                 <xsl:when test="position() = 1"><u><xsl:value-of select="$MainHall"/></u></xsl:when>
  783.                 <xsl:when test="position() = 2"><u><xsl:value-of select="$AuxClass1"/></u></xsl:when>
  784.                 <xsl:when test="position() = 3"><u><xsl:value-of select="$AuxClass2"/></u></xsl:when>
  785.               </xsl:choose>
  786.             </th>
  787.           </xsl:for-each>
  788.         </tr>
  789.       </thead>
  790.       <tbody>
  791.         <tr>
  792.           <th>
  793.             <xsl:value-of select="Item[1]/Description"/>
  794.           </th>
  795.           <xsl:for-each select="Item[contains('|1|8|15|', concat('|', position(), '|'))]">
  796.             <td>
  797.               <xsl:value-of select="Name"/>
  798.             </td>
  799.           </xsl:for-each>
  800.         </tr>
  801.         <tr>
  802.           <th>
  803.             <xsl:value-of select="Item[2]/Description"/>
  804.           </th>
  805.           <xsl:for-each select="Item[contains('|2|9|16|', concat('|', position(), '|'))]">
  806.             <td>
  807.               <xsl:value-of select="Name"/>
  808.               &#160;/&#160;
  809.               <xsl:value-of select="following-sibling::Item[1]/Name"/>
  810.             </td>
  811.           </xsl:for-each>
  812.         </tr>
  813.         <tr>
  814.           <th>
  815.             <xsl:value-of select="Item[4]/Description"/>
  816.           </th>
  817.           <xsl:for-each select="Item[contains('|4|11|18|', concat('|', position(), '|'))]">
  818.             <td>
  819.               <xsl:value-of select="Name"/>
  820.               &#160;/&#160;
  821.               <xsl:value-of select="following-sibling::Item[1]/Name"/>
  822.             </td>
  823.           </xsl:for-each>
  824.         </tr>
  825.         <tr>
  826.           <th>
  827.             <xsl:value-of select="Item[6]/Description"/>
  828.           </th>
  829.           <xsl:for-each select="Item[contains('|6|13|20|', concat('|', position(), '|'))]">
  830.             <td>
  831.               <xsl:value-of select="Name"/>
  832.               &#160;/&#160;
  833.               <xsl:value-of select="following-sibling::Item[1]/Name"/>
  834.             </td>
  835.           </xsl:for-each>
  836.         </tr>
  837.       </tbody>
  838.     </table>
  839.   </xsl:template>
  840.  
  841.   <xsl:template name="Display_DemoInfo">
  842.     <xsl:param name="Item" />
  843.  
  844.     <xsl:if test="$Item/DemoInfo/@ItemCount &gt;= 1">
  845.  
  846.       <xsl:for-each select="$Item/DemoInfo/Demo">
  847.         <xsl:choose>
  848.           <xsl:when test="@InsertNewLine=1">
  849.             <span class="textDemoNewlinePrefix">
  850.               <br />
  851.             </span>
  852.             <span class="textDemoBracket">[</span>
  853.             <span class="textDemoDescription">
  854.               <xsl:value-of select="@Type"/>:&#160;
  855.             </span>
  856.           </xsl:when>
  857.           <xsl:otherwise>
  858.             <span class="textDemoComma">,&#160;</span>
  859.           </xsl:otherwise>
  860.         </xsl:choose>
  861.  
  862.         <xsl:if test="normalize-space(Prefix) != ''">
  863.           <span class="textDemoPrefix">
  864.             <xsl:value-of select="Prefix"/>&#160;
  865.           </span>
  866.         </xsl:if>
  867.  
  868.         <xsl:if test ="@ParticipantCount &gt;= 1">
  869.           <span class="textDemoBrother">
  870.             <xsl:value-of select="Participant1/Name"/>
  871.           </span>
  872.         </xsl:if>
  873.  
  874.         <xsl:if test ="@ParticipantCount &gt;= 2">
  875.           <xsl:choose>
  876.             <xsl:when test="Participant2/Task = Participant1/Task">&#160;/&#160;</xsl:when>
  877.             <xsl:otherwise>&#160;-&#160;</xsl:otherwise>
  878.           </xsl:choose>
  879.  
  880.           <span class="textDemoBrother">
  881.             <xsl:value-of select="Participant2/Name"/>
  882.           </span>
  883.         </xsl:if>
  884.  
  885.         <xsl:if test ="@ParticipantCount &gt;= 3">
  886.           <xsl:choose>
  887.             <xsl:when test="Participant3/Task = Participant2/Task">&#160;/&#160;</xsl:when>
  888.             <xsl:otherwise>&#160;-&#160;</xsl:otherwise>
  889.           </xsl:choose>
  890.  
  891.           <span class="textDemoBrother">
  892.             <xsl:value-of select="Participant3/Name"/>
  893.           </span>
  894.         </xsl:if>
  895.         <xsl:if test ="@ParticipantCount &gt;= 4">
  896.           <xsl:choose>
  897.             <xsl:when test="Participant4/Task = Participant3/Task">&#160;/&#160;</xsl:when>
  898.             <xsl:otherwise>&#160;-&#160;</xsl:otherwise>
  899.           </xsl:choose>
  900.  
  901.           <span class="textDemoBrother">
  902.             <xsl:value-of select="Participant4/Name"/>
  903.           </span>
  904.         </xsl:if>
  905.         <span class="textDemoBracket">]</span>
  906.       </xsl:for-each>
  907.     </xsl:if>
  908.  
  909.   </xsl:template>
  910.  
  911. </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement