TheocraticSoftware

Workbook-S-140-Weekend Meeting Only-StartTime.xsl

Dec 19th, 2016
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 24.89 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" xmlns="http://www.w3.org/1999/xhtml">
  3.   <xsl:output method="html" indent="yes" version="4.01"
  4.    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
  5.    doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>
  6.   <xsl:template match="/">
  7.     <html xmlns="http://www.w3.org/1999/xhtml">
  8.       <xsl:attribute name="lang">
  9.         <xsl:value-of select="//Settings//LanguageCode"/>
  10.       </xsl:attribute>
  11.       <xsl:attribute name="dir">
  12.         <xsl:value-of select="//Settings/Direction"/>
  13.       </xsl:attribute>
  14.       <head>
  15.         <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
  16.         <link rel="stylesheet" type="text/css" href="Workbook-S-140-PublicTalk-WatchtowerStudy-ServiceTalk.css"/>
  17.         <title>
  18.           <xsl:value-of select="//Labels/Congregation"/>&#160;<xsl:value-of select="//Labels/PTS_WeekendMeetingReportTitle" />
  19.         </title>
  20.       </head>
  21.       <body>
  22.         <div class="containerPage">
  23.           <xsl:for-each select="MeetingWorkBook/Meeting">
  24.             <div class="containerMeeting">
  25.               <xsl:if test="@PageBreak=1">
  26.                 <br style="page-break-before: always;"/>
  27.               </xsl:if>
  28.               <xsl:if test="@PageBreak=1 or position()=1">
  29.                 <xsl:call-template name="HEADING"/>
  30.               </xsl:if>
  31.               <xsl:if test="@BookmarkId">
  32.                 <a>
  33.                   <xsl:attribute name="name">
  34.                     <xsl:value-of select="concat('week', @BookmarkId)"/>
  35.                   </xsl:attribute>
  36.                   <![CDATA[ ]]>
  37.                 </a>
  38.               </xsl:if>
  39.               <xsl:call-template name="WEEK"/>
  40.  
  41.               <!--<xsl:apply-templates select="TFGW"/>
  42.              <xsl:apply-templates select="AYFM"/>
  43.              <xsl:apply-templates select="LAC"/>-->
  44.               <xsl:apply-templates select="PUBLICTALK"/>
  45.             </div>
  46.           </xsl:for-each>
  47.         </div>
  48.       </body>
  49.     </html>
  50.   </xsl:template>
  51.  
  52.   <xsl:template name="WEEK">
  53.     <table class="tableDATE" cellspacing="0" cellpadding="0">
  54.       <xsl:call-template name="SetColumnWidths"/>
  55.       <xsl:if test="@SpecialEvent=1">
  56.         <tr>
  57.           <td class="cellBibleReading" colspan="4">
  58.             <xsl:value-of select="Date"/>
  59.             <!--&#160;|&#160;<xsl:value-of select="WeeklyBibleReading"/>-->
  60.           </td>
  61.         </tr>
  62.         <xsl:apply-templates select="SpecialEvent"/>
  63.       </xsl:if>
  64.       <xsl:if test="@SpecialEvent=0">
  65.         <tr>
  66.           <td class="cellBibleReading" colspan="4">
  67.             <!--<div class="floatRight">
  68.              <xsl:value-of select="//Labels/Chairman"/>
  69.              <xsl:if test="@NumberClasses = 2">
  70.                <br/>
  71.                <xsl:value-of select="//Labels/AuxCounsellor"/>
  72.              </xsl:if>
  73.              <xsl:if test="@NumberClasses = 3">
  74.                <br/>
  75.                <xsl:value-of select="//Labels/AuxCounsellor1"/>
  76.                <br/>
  77.                <xsl:value-of select="//Labels/AuxCounsellor2"/>
  78.              </xsl:if>
  79.            </div>-->
  80.             <!--<xsl:value-of select="Date"/>-->
  81.             <xsl:apply-templates select="PUBLICTALK/MeetingDate" mode="Custom"/>
  82.             <!--&#160;|&#160;<xsl:value-of select="WeeklyBibleReading"/>-->
  83.           </td>
  84.           <!--<td class="cellName">
  85.            <xsl:choose>
  86.              <xsl:when test="Chairman/@Duplicate=1">
  87.                <span class="textDuplicate">
  88.                  <xsl:value-of select="Chairman"/>&#160;
  89.                </span>
  90.              </xsl:when>
  91.              <xsl:otherwise>
  92.                <xsl:value-of select="Chairman"/>&#160;
  93.              </xsl:otherwise>
  94.            </xsl:choose>
  95.            <xsl:if test="@NumberClasses &gt;= 2">
  96.              <br/>
  97.              <xsl:choose>
  98.                <xsl:when test="AuxCounsellor1/@Duplicate=1">
  99.                  <span class="textDuplicate">
  100.                    <xsl:value-of select="AuxCounsellor1"/>&#160;
  101.                  </span>
  102.                </xsl:when>
  103.                <xsl:otherwise>
  104.                  <xsl:value-of select="AuxCounsellor1"/>&#160;
  105.                </xsl:otherwise>
  106.              </xsl:choose>
  107.            </xsl:if>
  108.            <xsl:if test="@NumberClasses = 3">
  109.              <br/>
  110.              <xsl:choose>
  111.                <xsl:when test="AuxCounsellor2/@Duplicate=1">
  112.                  <span class="textDuplicate">
  113.                    <xsl:value-of select="AuxCounsellor2"/>&#160;
  114.                  </span>
  115.                </xsl:when>
  116.                <xsl:otherwise>
  117.                  <xsl:value-of select="AuxCounsellor2"/>&#160;
  118.                </xsl:otherwise>
  119.              </xsl:choose>
  120.            </xsl:if>
  121.          </td>-->
  122.         </tr>
  123.         <xsl:apply-templates select="Note"/>
  124.         <!--<tr>
  125.          <td colspan="4">&#160;</td>
  126.        </tr>
  127.        <tr>
  128.          <xsl:apply-templates select="SongOpen" />
  129.          <xsl:apply-templates select="PrayerOpen" />
  130.        </tr>
  131.        <xsl:apply-templates select="OpeningComments" />-->
  132.       </xsl:if>
  133.     </table>
  134.   </xsl:template>
  135.  
  136.   <xsl:template match="MeetingDate" mode="Custom">
  137.     <xsl:value-of select="@DayFull"/>
  138.     <xsl:text>,&#160;</xsl:text>
  139.     <xsl:value-of select="@Day"/>
  140.     <xsl:text>&#160;</xsl:text>
  141.     <xsl:value-of select="@MonthFull"/>
  142.   </xsl:template>
  143.  
  144.   <!--Displays the notes (if any)-->
  145.   <xsl:template match="Note">
  146.     <xsl:if test="normalize-space(.) != ''">
  147.       <tr>
  148.         <td class="cellNotes" colspan="4">
  149.           <xsl:value-of select="//Labels/Note"/>:&#160;<xsl:value-of select="."/>
  150.         </td>
  151.       </tr>
  152.     </xsl:if>
  153.   </xsl:template>
  154.  
  155.   <xsl:template match="SpecialEvent">
  156.     <tr>
  157.       <td class="textSpecialEvent" colspan="4">
  158.         <xsl:value-of select="Event"/> [<xsl:value-of select="Date"/>]
  159.       </td>
  160.     </tr>
  161.     <xsl:if test="normalize-space(Location) != ''">
  162.       <tr>
  163.         <td class="textSpecialEventLocation" colspan="4">
  164.           <xsl:value-of select="Location"/>
  165.         </td>
  166.       </tr>
  167.     </xsl:if>
  168.   </xsl:template>
  169.  
  170.   <!--Displays heading with a nice double underline-->
  171.   <xsl:template name="HEADING">
  172.     <div class="borderHEADINGOuter">
  173.       <div class="borderHEADINGInner">
  174.         <table class="tableHEADING">
  175.           <tr>
  176.             <td class="textCongregation">
  177.               <xsl:value-of select="//Labels/Congregation"/>
  178.             </td>
  179.             <td class="textTitle">
  180.               <xsl:value-of select="//Labels/PTS_WeekendMeetingReportTitle"/>
  181.             </td>
  182.           </tr>
  183.         </table>
  184.       </div>
  185.     </div>
  186.   </xsl:template>
  187.  
  188.   <!--Display the end time (using 24 hour format)-->
  189.   <xsl:template match="Time" mode="End">
  190.     <td class="cellTime">
  191.       <xsl:value-of select="@EndTime24"/>
  192.     </td>
  193.   </xsl:template>
  194.  
  195.   <!--Display the start time (using 24 hour format)-->
  196.   <xsl:template match="Time" mode="Start">
  197.     <td class="cellTime">
  198.       <xsl:value-of select="@StartTime24"/>
  199.     </td>
  200.   </xsl:template>
  201.  
  202.   <!--Displays the duration of the item in minutes-->
  203.   <xsl:template match="Time" mode="Duration">
  204.     <span class="textDuration">
  205.       (<xsl:value-of select="."/>)
  206.     </span>
  207.   </xsl:template>
  208.  
  209.   <!--Display the name of the brother assigned-->
  210.   <xsl:template match="Name | PrayerOpen | PrayerEnd">
  211.     <td class="cellName">
  212.       <xsl:choose>
  213.         <xsl:when test="@Duplicate=1">
  214.           <span class="textDuplicate">
  215.             <xsl:value-of select="."/>
  216.           </span>
  217.         </xsl:when>
  218.         <xsl:otherwise>
  219.           <xsl:value-of select="."/>
  220.         </xsl:otherwise>
  221.       </xsl:choose>
  222.     </td>
  223.   </xsl:template>
  224.  
  225.   <!--Displays the theme for the assignment-->
  226.   <xsl:template match="Theme">
  227.     <span class="textTheme">
  228.       <xsl:value-of select="." disable-output-escaping="yes"/>
  229.     </span>
  230.   </xsl:template>
  231.  
  232.   <!--Displays the chairman label-->
  233.   <xsl:template name="Chairman">
  234.     <td class="cellName">
  235.       <!--Trims the " :" from the end of the chairman label-->
  236.       <xsl:value-of select="normalize-space(translate(//Labels/Chairman,':',''))"/>
  237.     </td>
  238.   </xsl:template>
  239.  
  240.   <xsl:template match="Method">
  241.     <span class="textMethod">
  242.       <xsl:value-of select="." disable-output-escaping="yes"/>
  243.     </span>
  244.   </xsl:template>
  245.  
  246.   <!--Treasures From God's Word-->
  247.   <xsl:template match="TFGW">
  248.     <table class="tableTFGW" cellspacing="0" cellpadding="0">
  249.       <xsl:call-template name="SetColumnWidths"/>
  250.  
  251.       <xsl:call-template name="SectionHeading">
  252.         <xsl:with-param name="strSection">TFGW</xsl:with-param>
  253.         <xsl:with-param name="iSpanColumns">3</xsl:with-param>
  254.       </xsl:call-template>
  255.  
  256.       <xsl:apply-templates select="TFGWItem">
  257.         <xsl:with-param name="iSpanCols">
  258.           <xsl:value-of select="@NumberClasses"/>
  259.         </xsl:with-param>
  260.       </xsl:apply-templates>
  261.       <xsl:apply-templates select="BibleReadingItem"/>
  262.     </table>
  263.   </xsl:template>
  264.  
  265.   <!--Bible talk and Digging for Spiritual Gems-->
  266.   <xsl:template match="TFGWItem">
  267.     <xsl:param name="iSpanCols"/>
  268.     <tr>
  269.       <xsl:apply-templates select="Time" mode="Start"/>
  270.       <td colspan="{$iSpanCols+1}">
  271.         <span class="bulletTFGW">&#8226;</span>
  272.         <xsl:apply-templates select="Theme"/>
  273.         <xsl:apply-templates select="Time" mode="Duration"/>
  274.         <xsl:apply-templates select="Method"/>
  275.       </td>
  276.       <xsl:apply-templates select="Name"/>
  277.     </tr>
  278.   </xsl:template>
  279.  
  280.   <!--Displays all of the bible reading students for each class-->
  281.   <xsl:template match="BibleReadingItem">
  282.     <tr>
  283.       <xsl:apply-templates select="Time" mode="Start"/>
  284.       <td class="cellTheme">
  285.         <span class="bulletTFGW">&#8226;</span>
  286.         <span class="textTheme">
  287.           <xsl:value-of select="Type"/>
  288.         </span>
  289.         <xsl:apply-templates select="Time" mode="Duration"/>
  290.         <xsl:apply-templates select="Material"/>
  291.       </td>
  292.       <td class="cellPosition">
  293.         <xsl:value-of select="//Labels/Student"/>
  294.       </td>
  295.       <xsl:for-each select="Readers/Reader">
  296.         <td class="cellName">
  297.           <xsl:choose>
  298.             <xsl:when test="@Duplicate=1">
  299.               <span class="textDuplicate">
  300.                 <xsl:value-of select="."/>
  301.               </span>
  302.             </xsl:when>
  303.             <xsl:otherwise>
  304.               <xsl:value-of select="."/>
  305.             </xsl:otherwise>
  306.           </xsl:choose>
  307.         </td>
  308.       </xsl:for-each>
  309.     </tr>
  310.   </xsl:template>
  311.  
  312.   <!--Apply Yourself To The Field Ministry-->
  313.   <xsl:template match="AYFM">
  314.     <table class="tableAYFM" cellspacing="0" cellpadding="0">
  315.       <xsl:call-template name="SetColumnWidths"/>
  316.  
  317.       <xsl:call-template name="SectionHeading">
  318.         <xsl:with-param name="strSection">AYFM</xsl:with-param>
  319.         <xsl:with-param name="iSpanColumns">3</xsl:with-param>
  320.       </xsl:call-template>
  321.  
  322.       <xsl:apply-templates select="Presentations" />
  323.       <xsl:apply-templates select="StudentItem"/>
  324.     </table>
  325.   </xsl:template>
  326.  
  327.   <!--Displays all the information for a student item.
  328.  This includes all the students from each class.-->
  329.   <xsl:template match="StudentItem">
  330.     <tr>
  331.       <xsl:apply-templates select="Time" mode="Start"/>
  332.       <td class="cellTheme">
  333.         <span class="bulletAYFM">&#8226;</span>
  334.         <span class="textTheme">
  335.           <xsl:value-of select="Type"/>
  336.         </span>
  337.         <xsl:apply-templates select="Time" mode="Duration"/>
  338.         <xsl:apply-templates select="Material"/>
  339.       </td>
  340.       <td class="cellPosition">
  341.         <xsl:value-of select="//Labels/Student"/>
  342.         <xsl:if test="@IsTalk=0">
  343.           <br/>
  344.           <xsl:value-of select="//Labels/Assistant"/>
  345.         </xsl:if>
  346.       </td>
  347.       <xsl:apply-templates select="Students"/>
  348.     </tr>
  349.   </xsl:template>
  350.  
  351.   <xsl:template match="Material | SourceMaterial">
  352.     <span class="textMaterial">
  353.       <xsl:value-of select="." disable-output-escaping="yes"/>
  354.     </span>
  355.   </xsl:template>
  356.  
  357.   <!--Displays the student and assistant for the current student item-->
  358.   <xsl:template match="Students">
  359.     <td class="cellName">
  360.       <xsl:choose>
  361.         <xsl:when test="Student/@Duplicate=1">
  362.           <span class="textDuplicate">
  363.             <xsl:value-of select="Student"/>
  364.           </span>
  365.         </xsl:when>
  366.         <xsl:otherwise>
  367.           <xsl:value-of select="Student"/>
  368.         </xsl:otherwise>
  369.       </xsl:choose>
  370.       <xsl:if test="../@IsTalk=0">
  371.         <br/>
  372.         <xsl:choose>
  373.           <xsl:when test="Assistant/@Duplicate=1">
  374.             <span class="textDuplicate">
  375.               <xsl:value-of select="Assistant"/>
  376.             </span>
  377.           </xsl:when>
  378.           <xsl:otherwise>
  379.             <xsl:value-of select="Assistant"/>
  380.           </xsl:otherwise>
  381.         </xsl:choose>
  382.       </xsl:if>
  383.     </td>
  384.   </xsl:template>
  385.  
  386.   <!--First week of month item-->
  387.   <xsl:template match="Presentations">
  388.     <tr>
  389.       <xsl:apply-templates select="Time" mode="Start"/>
  390.       <td colspan="2">
  391.         <span class="bulletAYFM">&#8226;</span>
  392.         <xsl:apply-templates select="Theme"/>
  393.         <xsl:apply-templates select="Time" mode="Duration"/>
  394.         <xsl:apply-templates select="Method"/>
  395.       </td>
  396.       <xsl:apply-templates select="Name"/>
  397.     </tr>
  398.   </xsl:template>
  399.  
  400.   <!--Define the column widths for the schedule-->
  401.   <xsl:template name="SetColumnWidths">
  402.     <!--The widths in the column classes will add up to 100%-->
  403.     <xsl:choose>
  404.       <xsl:when test="not(@NumberClasses) or @NumberClasses=1 or self::Meeting">
  405.         <colgroup>
  406.           <col class="columnTime"/>
  407.           <col class="columnTheme1ClassB"/>
  408.           <col class="columnPosition"/>
  409.           <col class="columnName"/>
  410.         </colgroup>
  411.       </xsl:when>
  412.       <xsl:when test="@NumberClasses=2">
  413.         <colgroup>
  414.           <col class="columnTime"/>
  415.           <col class="columnTheme2ClassB"/>
  416.           <col class="columnPosition"/>
  417.           <col class="columnName"/>
  418.           <col class="columnName"/>
  419.         </colgroup>
  420.       </xsl:when>
  421.       <xsl:when test="@NumberClasses=3">
  422.         <colgroup>
  423.           <col class="columnTime"/>
  424.           <col class="columnTheme3ClassB"/>
  425.           <col class="columnPosition"/>
  426.           <col class="columnName"/>
  427.           <col class="columnName"/>
  428.           <col class="columnName"/>
  429.         </colgroup>
  430.       </xsl:when>
  431.     </xsl:choose>
  432.   </xsl:template>
  433.  
  434.   <!--Living As Christians-->
  435.   <xsl:template match="LAC">
  436.     <table class="tableLAC" cellspacing="0" cellpadding="0">
  437.       <xsl:call-template name="SetColumnWidths"/>
  438.  
  439.       <xsl:call-template name="SectionHeading">
  440.         <xsl:with-param name="strSection">LAC</xsl:with-param>
  441.         <xsl:with-param name="iSpanColumns">4</xsl:with-param>
  442.       </xsl:call-template>
  443.  
  444.       <tr>
  445.         <xsl:apply-templates select="SongMiddle" />
  446.       </tr>
  447.       <xsl:apply-templates select="LACItem" />
  448.  
  449.       <xsl:choose>
  450.         <xsl:when test="@CircuitVisit=0">
  451.           <xsl:apply-templates select="CongregationBibleStudy" />
  452.           <xsl:apply-templates select="ClosingComments"/>
  453.         </xsl:when>
  454.         <xsl:otherwise>
  455.           <xsl:apply-templates select="ClosingComments"/>
  456.           <xsl:apply-templates select="CircuitVisit/LACItem"/>
  457.         </xsl:otherwise>
  458.       </xsl:choose>
  459.  
  460.       <tr>
  461.         <xsl:apply-templates select="SongEnd"/>
  462.         <xsl:apply-templates select="PrayerEnd" />
  463.       </tr>
  464.     </table>
  465.   </xsl:template>
  466.  
  467.   <xsl:template name="SectionHeading">
  468.     <xsl:param name="strSection"/>
  469.     <xsl:param name="iSpanColumns"/>
  470.     <tr>
  471.       <td class="cell{$strSection}" colspan="{$iSpanColumns}">
  472.         <div class="text{$strSection}">
  473.           <xsl:value-of select="//Labels/*[name() = $strSection]"/>
  474.         </div>
  475.       </td>
  476.       <xsl:if test="@NumberClasses = 3">
  477.         <td class="cellClass">
  478.           <xsl:value-of select="//Labels/AuxClass1"/>
  479.         </td>
  480.         <td class="cellClass">
  481.           <xsl:value-of select="//Labels/AuxClass2"/>
  482.         </td>
  483.       </xsl:if>
  484.       <xsl:if test="@NumberClasses = 2">
  485.         <td class="cellClass">
  486.           <xsl:value-of select="//Labels/AuxClass"/>
  487.         </td>
  488.       </xsl:if>
  489.       <xsl:if test="@NumberClasses &gt;= 1">
  490.         <td class="cellClass">
  491.           <xsl:value-of select ="//Labels/MainHall"/>
  492.         </td>
  493.       </xsl:if>
  494.     </tr>
  495.   </xsl:template>
  496.  
  497.   <xsl:template match="LACItem">
  498.     <tr>
  499.       <xsl:apply-templates select="Time" mode="Start"/>
  500.       <td class="cellTheme" colspan="2">
  501.         <span class="bulletLAC">&#8226;</span>
  502.         <xsl:apply-templates select="Theme"/>
  503.         <xsl:apply-templates select="Time" mode="Duration"/>
  504.         <xsl:apply-templates select="Method"/>
  505.       </td>
  506.       <xsl:apply-templates select="Name"/>
  507.     </tr>
  508.   </xsl:template>
  509.  
  510.   <!--Displays the congregation bible study information-->
  511.   <xsl:template match="CongregationBibleStudy">
  512.     <tr>
  513.       <xsl:apply-templates select="Time" mode="Start"/>
  514.       <td class="cellTheme">
  515.         <span class="bulletLAC">&#8226;</span>
  516.         <span class="textTheme">
  517.           <xsl:value-of select="//Labels/CBS"/>
  518.         </span>
  519.         <xsl:apply-templates select="Time" mode="Duration"/>
  520.         <xsl:apply-templates select="SourceMaterial" />
  521.       </td>
  522.       <td class="cellPosition">
  523.         <xsl:value-of select="//Labels/Conductor"/>
  524.         <br/>
  525.         <xsl:value-of select="//Labels/Reader"/>
  526.       </td>
  527.       <td class="cellName">
  528.         <xsl:choose>
  529.           <xsl:when test="Conductor/@Duplicate=1">
  530.             <span class="textDuplicate">
  531.               <xsl:value-of select="Conductor"/>
  532.             </span>
  533.           </xsl:when>
  534.           <xsl:otherwise>
  535.             <xsl:value-of select="Conductor"/>
  536.           </xsl:otherwise>
  537.         </xsl:choose>
  538.         <br/>
  539.         <xsl:choose>
  540.           <xsl:when test="Reader/@Duplicate=1">
  541.             <span class="textDuplicate">
  542.               <xsl:value-of select="Reader"/>
  543.             </span>
  544.           </xsl:when>
  545.           <xsl:otherwise>
  546.             <xsl:value-of select="Reader"/>
  547.           </xsl:otherwise>
  548.         </xsl:choose>
  549.       </td>
  550.     </tr>
  551.   </xsl:template>
  552.  
  553.   <!--Displays the song information-->
  554.   <xsl:template match="SongOpen | SongMiddle | SongEnd">
  555.     <td class="cellTime">
  556.       <xsl:value-of select="@EndTime24"/>
  557.     </td>
  558.     <td class="cellTheme">
  559.       <xsl:if test="self::SongMiddle">
  560.         <xsl:attribute name="colspan">3</xsl:attribute>
  561.         <xsl:attribute name="class"></xsl:attribute>
  562.       </xsl:if>
  563.       <span>
  564.         <xsl:attribute name="class">
  565.           <xsl:choose>
  566.             <xsl:when test="self::SongOpen">bulletTFGW</xsl:when>
  567.             <xsl:otherwise>bulletLAC</xsl:otherwise>
  568.           </xsl:choose>
  569.         </xsl:attribute>
  570.         <xsl:text>&#8226;</xsl:text>
  571.       </span>
  572.       <span class="textSongLabel">
  573.         <xsl:value-of select="//Labels/Song"/>
  574.       </span>
  575.       <span class="textSongNumber">
  576.         <xsl:value-of select="."/>
  577.       </span>
  578.       <span class="textSongTitle">
  579.         <xsl:value-of select="@Title"/>
  580.       </span>
  581.     </td>
  582.     <xsl:if test="self::SongOpen or self::SongEnd">
  583.       <td class="cellPosition">
  584.         <xsl:value-of select="//Labels/Prayer"/>
  585.       </td>
  586.     </xsl:if>
  587.   </xsl:template>
  588.  
  589.   <!--Displays the comments-->
  590.   <xsl:template name="Comments">
  591.     <xsl:param name="bulletClass" />
  592.     <tr>
  593.       <xsl:apply-templates select="Time" mode="Start"/>
  594.       <td class="cellTheme" colspan="2">
  595.         <span class="{ $bulletClass }">&#8226;</span>
  596.         <xsl:apply-templates select="Theme"/>
  597.         <xsl:apply-templates select="Time" mode="Duration"/>
  598.       </td>
  599.       <xsl:call-template name="Chairman"/>
  600.     </tr>
  601.   </xsl:template>
  602.  
  603.   <xsl:template match="OpeningComments">
  604.     <xsl:call-template name="Comments">
  605.       <xsl:with-param name="bulletClass">bulletTFGW</xsl:with-param>
  606.     </xsl:call-template>
  607.   </xsl:template>
  608.  
  609.   <xsl:template match="ClosingComments">
  610.     <xsl:call-template name="Comments">
  611.       <xsl:with-param name="bulletClass">bulletLAC</xsl:with-param>
  612.     </xsl:call-template>
  613.   </xsl:template>
  614.  
  615.   <xsl:template match="PUBLICTALK">
  616.     <table class="tableWeekend">
  617.       <colgroup>
  618.         <col class ="columnTime"/>
  619.         <col class ="columnPublicTalk"/>
  620.         <col class ="columnName"/>
  621.       </colgroup>
  622.       <tr>
  623.         <td class ="cellWEEKEND" colspan="2">
  624.           <div class="textWEEKEND" style="float:left">
  625.             <xsl:value-of select="//Labels/PTS_Talk"/>
  626.           </div>
  627.           <div class="floatRight">
  628.             <xsl:value-of select="//Labels/PTS_Chairman"/>:
  629.           </div>
  630.         </td>
  631.         <td class="cellName">
  632.           <xsl:value-of select="Assignments/Chairman"/>
  633.         </td>
  634.       </tr>
  635.       <xsl:apply-templates select="HomeTalk"/>
  636.       <xsl:apply-templates select="AwayTalk"/>
  637.       <xsl:apply-templates select="Assignments"/>
  638.     </table>
  639.   </xsl:template>
  640.  
  641.   <!--Displays the home talk speaker details-->
  642.   <xsl:template match="HomeTalk">
  643.     <tr>
  644.       <xsl:apply-templates select="Time" mode="Start"/>
  645.       <td class="cellWEEKENDText">
  646.         <div class="floatRight">
  647.           <xsl:value-of select="//Labels/PTS_Congregation"/>:
  648.         </div>
  649.         <span class="textPTSLabel">
  650.           <xsl:value-of select="//Labels/PTS_Speaker"/>:
  651.         </span>
  652.         &#160;<span class="textPTSValue">
  653.           <xsl:value-of select="Speaker"/>
  654.         </span>
  655.       </td>
  656.       <td class="cellName">
  657.         <xsl:value-of select="Congregation"/>
  658.       </td>
  659.     </tr>
  660.     <tr>
  661.       <td class="cellWEEKENDText" colspan="3">
  662.         <span class="textPTSLabel">
  663.           <xsl:value-of select="//Labels/PTS_Theme"/>:
  664.         </span>
  665.         &#160;<span class="textPTSValue">
  666.           <xsl:value-of select="Theme"/>
  667.         </span>
  668.       </td>
  669.     </tr>
  670.   </xsl:template>
  671.  
  672.   <xsl:template match="AwayTalk">
  673.     <tr>
  674.       <td class="cellWEEKENDText" colspan="3">
  675.         <span class="textPTSLabel">
  676.           <xsl:choose>
  677.             <!--We only support 2 away speakers. We could just use one label-->
  678.             <xsl:when test="position()=1">
  679.               <xsl:value-of select="//Labels/PTS_AwaySpeaker1"/>:
  680.             </xsl:when>
  681.             <xsl:otherwise>
  682.               <xsl:value-of select="//Labels/PTS_AwaySpeaker2"/>:
  683.             </xsl:otherwise>
  684.           </xsl:choose>
  685.         </span>
  686.         &#160;<span class="textPTSValue">
  687.           <xsl:value-of select="Speaker"/>&#160;(<xsl:value-of select="Congregation"/>)
  688.         </span>
  689.       </td>
  690.     </tr>
  691.   </xsl:template>
  692.  
  693.   <!--Displays the Watchtower study, conductor and reader-->
  694.   <xsl:template match="Assignments">
  695.     <tr>
  696.       <td style="padding-left: 1mm;" colspan="3">
  697.         <div class="WTHeading">
  698.           <xsl:value-of select="//Labels/PTS_WTStudy"/>
  699.         </div>
  700.       </td>
  701.     </tr>
  702.     <tr>
  703.       <xsl:apply-templates select="WatchtowerStudy/Time" mode="Start"/>
  704.       <td class="cellWEEKENDText">
  705.         <span class="textPTSValue">
  706.           <div class="floatRight">
  707.             <xsl:value-of select="//Labels/PTS_WTConductor"/>:
  708.           </div>
  709.           <xsl:value-of select="WatchtowerStudy/Theme"/>
  710.         </span>
  711.       </td>
  712.       <td class="cellName">
  713.         <xsl:value-of select="Conductor"/>
  714.       </td>
  715.     </tr>
  716.     <xsl:choose>
  717.       <!--This is not a circuit visit so show the reader-->
  718.       <xsl:when test="../preceding-sibling::*[1]/@CircuitVisit=0">
  719.         <tr>
  720.           <td class="cellWEEKENDText" colspan="2">
  721.             <div class="floatRight">
  722.               <xsl:value-of select="//Labels/PTS_WTReader"/>:
  723.             </div>
  724.           </td>
  725.           <td class="cellName">
  726.             <xsl:value-of select="Reader"/>
  727.           </td>
  728.         </tr>
  729.       </xsl:when>
  730.       <!--This is a circuit visit so show the final service talk-->
  731.       <xsl:otherwise>
  732.         <tr>
  733.           <td style="padding-left: 1mm;" colspan="3">
  734.             <div class="ServiceTalkHeading">
  735.               <xsl:value-of select="//Labels/PTS_ServiceTalk"/>
  736.             </div>
  737.           </td>
  738.         </tr>
  739.         <tr>
  740.           <xsl:apply-templates select="ServiceTalk/Time" mode="Start"/>
  741.           <td class="cellWEEKENDText">
  742.             <span class="textPTSLabel">
  743.               <xsl:value-of select="//Labels/PTS_Theme"/>:
  744.             </span>
  745.             &#160;<span class="textPTSValue">
  746.               <xsl:value-of select="ServiceTalk/Theme"/>
  747.             </span>
  748.           </td>
  749.           <td class="cellName">
  750.             <xsl:value-of select="../preceding-sibling::*[1]/CircuitVisit/LACItem/Name"/>
  751.           </td>
  752.         </tr>
  753.       </xsl:otherwise>
  754.     </xsl:choose>
  755.   </xsl:template>
  756. </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment