Advertisement
TheocraticSoftware

Workbook-S-140-PublicTalk-WatchtowerStudy-CustomDate.xsl

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