Advertisement
TheocraticSoftware

Workbook-S-140-StartTime-ShowNotAssigned.xsl

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