Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
- <xsl:output method="html" indent="yes" version="4.01"
- doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
- doctype-public="//W3C//DTD XHTML 1.0 Transitional//EN"/>
- <xsl:template match="/">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
- <title>
- <xsl:value-of select="//Labels/ReportTitleWorksheets"/>
- </title>
- <style type="text/css">
- .textReportTitle {
- text-align: center;
- font-family: Calibri;
- font-size: 16pt;
- color: #581845;
- }
- table td {
- border: 1px gray solid ;
- }
- table tbody tr:hover td {
- color: #000;
- background: #efefef;
- }
- .tableBorders {
- border: 1px solid #808080;
- margin-bottom: 5mm;
- }
- .textItem {
- font-family: Calibri;
- font-size: 12pt;
- }
- .textItemWithPadding {
- font-family: Calibri;
- font-size: 12pt;
- padding-left: 3mm;
- }
- .textTime {
- text-align: center;
- font-family: Calibri;
- font-size: 12pt;
- }
- .textMargin {
- padding-left: 10mm;
- }
- .textTFGW {
- background-color: #606a70;
- font-family: calibri;
- color: #FFFFFF;
- }
- .textAYFM {
- background-color: #c18626;
- font-family: calibri;
- color: #FFFFFF;
- }
- .textLAC {
- background-color: #961526;
- font-family: calibri;
- color: #FFFFFF;
- }
- .textCBS {
- font-family: Calibri;
- font-size: 12pt;
- }
- .tableStudents {
- border-collapse: collapse;
- font-size: 10pt;
- }
- .tableStudents td {
- border-style: none;
- }
- </style>
- </head>
- <body>
- <xsl:for-each select="MeetingWorkBook/Meeting">
- <!--We only add the page breaks when we are in "Print Preview" mode-->
- <xsl:if test="InsertPageBreak=1">
- <!--This seems to be the only way to insert a page break-->
- <br style="page-break-before: always;"/>
- </xsl:if>
- <!--The report title (chairman name and date)-->
- <p class="textReportTitle">
- <strong>
- Oguamtrani Krataasin (<xsl:value-of select="Chairman"/>) <xsl:value-of select="Date"/>
- </strong>
- </p>
- <!--Opening song and prayer-->
- <table cellpadding="1" cellspacing="0" class="tableBorders" style="width: 100%">
- <colgroup>
- <col width="65%" />
- <col width="25%" />
- <col width="10%" />
- </colgroup>
- <tr>
- <xsl:apply-templates select="SongOpen"/>
- <xsl:apply-templates select="Prayer1"/>
- <td class="textTime">Wie</td>
- </tr>
- </table>
- <!--Opening comments-->
- <xsl:apply-templates select="OpeningComments"/>
- <!--Main meeting sections-->
- <xsl:call-template name="TFGW"/>
- <xsl:call-template name="AYFM"/>
- <xsl:call-template name="LAC"/>
- <!--Circuit Visit Item or Closing song?-->
- <xsl:choose>
- <xsl:when test="CircuitVisit=1">
- <table cellpadding="1" cellspacing="0" class="tableBorders" style="width: 100%">
- <colgroup>
- <col width="65%" />
- <col width="25%" />
- <col width="10%" />
- </colgroup>
- <tr>
- <td class="textItem">
- <xsl:text>Ɔmansin Sohwɛfoɔ Som Kasa</xsl:text>
- </td>
- <td class="textItem">
- <xsl:value-of select="//Labels/Prayer"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="Prayer2"/>
- </td>
- <td class="textTime">
- <xsl:value-of select="SongEnd/@EndTime12"/>
- </td>
- </tr>
- <tr>
- <td colspan="3">
- <xsl:value-of select="LivingAsChristians/ItemCircuitOverseer/Theme"/>
- </td>
- </tr>
- </table>
- </xsl:when>
- <xsl:otherwise>
- <table cellpadding="1" cellspacing="0" class="tableBorders" style="width: 100%">
- <colgroup>
- <col width="65%" />
- <col width="25%" />
- <col width="10%" />
- </colgroup>
- <tr>
- <xsl:apply-templates select="SongEnd"/>
- <xsl:apply-templates select="Prayer2"/>
- <td class="textTime">
- <xsl:value-of select="SongEnd/@EndTime12"/>
- </td>
- </tr>
- </table>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </body>
- </html>
- </xsl:template>
- <!--Treasures From God's Word-->
- <xsl:template name="TFGW">
- <table cellpadding="1" cellspacing="0" class="tableBorders" style="width: 100%">
- <colgroup>
- <col width="65%" />
- <col width="25%" />
- <col width="10%" />
- </colgroup>
- <tr>
- <td class="textTFGW" colspan="3">
- <xsl:value-of select="//Labels/TreasuresFromGodsWord"/>
- </td>
- </tr>
- <xsl:apply-templates select="Treasures1"/>
- <xsl:apply-templates select="Treasures2"/>
- <xsl:apply-templates select="BibleReadingM"/>
- </table>
- </xsl:template>
- <!--Apply Yourself To The Field Ministry-->
- <xsl:template name="AYFM">
- <table cellpadding="1" cellspacing="0" class="tableBorders" style="width: 100%">
- <xsl:choose>
- <xsl:when test="FirstWeekOfMonth=1">
- <colgroup>
- <col width="65%" />
- <col width="25%" />
- <col width="10%" />
- </colgroup>
- <tr>
- <td class="textAYFM" colspan="3">
- <xsl:value-of select="//Labels/ApplyYourselfToTheFieldMinistry"/>
- </td>
- </tr>
- <xsl:apply-templates select="Presentations" />
- </xsl:when>
- <xsl:otherwise>
- <colgroup>
- <col width="20%" />
- <col width="45%" />
- <col width="25%" />
- <col width="10%" />
- </colgroup>
- <tr>
- <td class="textAYFM" colspan="4">
- <xsl:value-of select="//Labels/ApplyYourselfToTheFieldMinistry"/>
- </td>
- </tr>
- <tr>
- <td class="textItem">Afà</td>
- <td class="textItem">Asuafoɔ</td>
- <td class="textItem">Kwan a wɔfa so Yɛ</td>
- <td class="textTime">
-  
- </td>
- </tr>
- <xsl:apply-templates select="StudentTalk1M"/>
- <xsl:apply-templates select="StudentTalk2M"/>
- <xsl:apply-templates select="StudentTalk3M"/>
- </xsl:otherwise>
- </xsl:choose>
- </table>
- </xsl:template>
- <!--Living As Christians-->
- <xsl:template name="LAC">
- <table cellpadding="1" cellspacing="0" class="tableBorders" style="width: 100%">
- <colgroup>
- <col width="90%" />
- <col width="10%" />
- </colgroup>
- <tr>
- <td class="textLAC" colspan="2">
- <xsl:value-of select="//Labels/LivingAsChristians"/>
- </td>
- </tr>
- <xsl:apply-templates select="SongMiddle"/>
- </table>
- <table cellpadding="1" cellspacing="0" class="tableBorders" style="width: 100%">
- <colgroup>
- <col width="65%" />
- <col width="25%" />
- <col width="10%" />
- </colgroup>
- <xsl:apply-templates select="LivingAsChristians/Item1"/>
- <xsl:apply-templates select="LivingAsChristians/Item2"/>
- <xsl:choose>
- <xsl:when test="CircuitVisit=1">
- <xsl:apply-templates select="ClosingComments"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="LivingAsChristians/CongregationBibleStudy"/>
- <xsl:apply-templates select="ClosingComments"/>
- </xsl:otherwise>
- </xsl:choose>
- </table>
- </xsl:template>
- <!--Congregation Bible Study-->
- <xsl:template match="CongregationBibleStudy">
- <tr>
- <td class="textItemWithPadding">
- <xsl:value-of select="//Labels/CongregationBibleStudy"/>
- <xsl:text>: </xsl:text>
- <xsl:value-of select="SourceMaterial"/>
- </td>
- <td class="textCBS" valign="top">
- <xsl:value-of select="Conductor"/>
- <xsl:text>/</xsl:text>
- <xsl:value-of select="Reader"/>
- <xsl:text> (</xsl:text>
- <xsl:value-of select="//Labels/CBSReader"/>
- <xsl:text>)</xsl:text>
- </td>
- <td class="textTime">
- <xsl:value-of select="Time/@EndTime12"/>
- </td>
- </tr>
- </xsl:template>
- <!--First student - Main Hall-->
- <xsl:template match="StudentTalk1M">
- <tr>
- <td class="textItem">
- <xsl:value-of select="../StudentSourceMaterial/StudentTalk1Type"/>
- </td>
- <td class="textItem">
- <xsl:value-of select="."/>
- <xsl:text> (</xsl:text>
- <xsl:value-of select="@StudyPoint"/>
- <xsl:text>)</xsl:text>
- <xsl:text>/</xsl:text>
- <xsl:value-of select="../StudentTalk1MA"/>
- </td>
- <td class="textItem">
-  
- </td>
- <td class="textTime">
- <xsl:value-of select="../StudentTalk1Time/@EndTime12"/>
- </td>
- </tr>
- </xsl:template>
- <!--Second student - Main Hall-->
- <xsl:template match="StudentTalk2M">
- <tr>
- <td class="textItem">
- <xsl:value-of select="../StudentSourceMaterial/StudentTalk2Type"/>
- </td>
- <td class="textItem">
- <xsl:value-of select="."/>
- <xsl:text> (</xsl:text>
- <xsl:value-of select="@StudyPoint"/>
- <xsl:text>)</xsl:text>
- <xsl:text>/</xsl:text>
- <xsl:value-of select="../StudentTalk2MA"/>
- </td>
- <td class="textItem">
-  
- </td>
- <td class="textTime">
- <xsl:value-of select="../StudentTalk2Time/@EndTime12"/>
- </td>
- </tr>
- </xsl:template>
- <!--Third student - Main Hall-->
- <xsl:template match="StudentTalk3M">
- <tr>
- <td class="textItem">
- <xsl:value-of select="../StudentSourceMaterial/StudentTalk3Type"/>
- </td>
- <td class="textItem">
- <xsl:value-of select="."/>
- <xsl:text> (</xsl:text>
- <xsl:value-of select="@StudyPoint"/>
- <xsl:text>)</xsl:text>
- <!--Do we include assistant?-->
- <xsl:if test="../StudentSourceMaterial/StudentTalk3Type/@IsTalk=0">
- <xsl:text>/</xsl:text>
- <xsl:value-of select="../StudentTalk3MA"/>
- </xsl:if>
- </td>
- <td class="textItem">
-  
- </td>
- <td class="textTime">
- <xsl:value-of select="../StudentTalk3Time/@EndTime12"/>
- </td>
- </tr>
- </xsl:template>
- <xsl:template match="Item1|Item2|ItemCircuitOverseer|Presentations|Treasures1|Treasures2">
- <tr>
- <td class="textItemWithPadding">
- <xsl:value-of select="Theme" disable-output-escaping="yes"/>
- </td>
- <td class="textItem">
- <xsl:value-of select="Name"/>
- </td>
- <td class="textTime">
- <xsl:value-of select="Time/@EndTime12"/>
- </td>
- </tr>
- </xsl:template>
- <!--Bible Reading - Main Hall-->
- <xsl:template match="BibleReadingM">
- <tr>
- <td class="textItemWithPadding">
- <xsl:value-of select="//Labels/BibleReading"/>
- <xsl:text>: </xsl:text>
- <xsl:value-of select="../StudentSourceMaterial/BibleReadingMaterial"/>
- </td>
- <td class="textItem">
- <xsl:value-of select="."/>
- <xsl:text> (# </xsl:text>
- <xsl:value-of select="@StudyPoint"/>
- <xsl:text>)</xsl:text>
- </td>
- <td class="textTime">
- <xsl:value-of select="../BibleReadingTime/@EndTime12"/>
- </td>
- </tr>
- </xsl:template>
- <xsl:template match="OpeningComments">
- <table cellpadding="1" cellspacing="0" class="tableBorders" style="width: 100%">
- <colgroup>
- <col width="90%" />
- <col width="10%" />
- </colgroup>
- <tr>
- <td class="textItem">
- <xsl:value-of select="../WeeklyBibleReading"/>
- <xsl:text>: </xsl:text>
- <xsl:value-of select ="Theme"/>
- <br />
- <span class="textMargin">
- (1) <xsl:value-of select="../ReviewQuestion"/>
- </span>
- <br />
- <br />
- <br />
- <br />
- </td>
- <td class="textTime">
- <xsl:value-of select="Time/@EndTime12"/>
- </td>
- </tr>
- </table>
- </xsl:template>
- <xsl:template match="ClosingComments">
- <xsl:variable name="AssignHistory" select="document('AssignHistory.xml')"/>
- <xsl:variable name="week" select="../Date/@NextWeek"/>
- <table cellpadding="1" cellspacing="0" class="tableBorders" style="width: 100%">
- <colgroup>
- <col width="90%" />
- <col width="10%" />
- </colgroup>
- <tr>
- <!--Concluding comments-->
- <td class="textItem">
- <xsl:text>Ntimu ne Nea Yebesua Nnawɔtwe a Edi Hɔ</xsl:text>
- <br />
- <span class="textMargin">
- <xsl:text>(1) </xsl:text>
- <xsl:variable name="NextReviewQuestion" select="$AssignHistory/AssignmentHistory/*[name()=$week]/ReviewQuestion"/>
- <xsl:if test="normalize-space($NextReviewQuestion) != ''">
- <xsl:value-of select="$NextReviewQuestion"/>
- </xsl:if>
- </span>
- <br />
- <br />
- </td>
- <td class="textTime" rowspan="3">
- <xsl:value-of select="Time/@EndTime12"/>
- </td>
- </tr>
- <!--Next weeks students-->
- <tr>
- <td class="textItem">
- <xsl:text>Nnawɔtwe a Ɛdi hɔ:</xsl:text>
- <br />
- <table cellpadding="1" class="tableStudents" width="100%">
- <colgroup>
- <col width="20%" />
- <col width="80%" />
- </colgroup>
- <tr>
- <td> </td>
- <td>
- <xsl:value-of select="//Labels/MainHall"/>
- </td>
- </tr>
- <xsl:apply-templates select="$AssignHistory/AssignmentHistory/*[name()=$week]/StudentItems">
- <xsl:with-param name="MainHall" select="//Labels/MainHall"/>
- </xsl:apply-templates>
- </table>
- </td>
- </tr>
- <!--Announcements/Letters-->
- <tr>
- <td class="textItem">
- <xsl:text>Nkaebɔ/Betel Krataa</xsl:text>
- <br />
- <br />
- <br />
- <br />
- </td>
- </tr>
- </table>
- </xsl:template>
- <!--Student items - we are only catering for the Main Hall-->
- <xsl:template match="StudentItems">
- <xsl:param name="MainHall"/>
- <xsl:for-each select="Item[contains('|1|2|4|6|', concat('|', position(), '|'))]">
- <tr>
- <td>
- <xsl:value-of select="Description"/>
- </td>
- <td>
- <xsl:value-of select="Name"/>
- <!--Do we need to include an assistant?-->
- <xsl:if test="position() >= 1">
- <xsl:if test="normalize-space(following-sibling::*[1]/Name) != ''">
- <xsl:text>/</xsl:text>
- <xsl:value-of select="following-sibling::*[1]/Name"/>
- </xsl:if>
- </xsl:if>
- </td>
- </tr>
- </xsl:for-each>
- </xsl:template>
- <!--Open / Close song-->
- <xsl:template match="SongOpen|SongEnd">
- <td class="textItemWithPadding">
- <xsl:value-of select="//Labels/Song"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="."/>
- <xsl:text> - </xsl:text>
- <xsl:value-of select="@Title"/>
- <xsl:variable name="ScripturesForSongs" select="document('ScripturesForSongs.xml')"/>
- <xsl:variable name="SongNumber" select="."/>
-  
- <xsl:value-of select="$ScripturesForSongs/ScripturesForSongs/Song[@Number=$SongNumber]"/>
- </td>
- </xsl:template>
- <!--Middle song-->
- <xsl:template match="SongMiddle">
- <tr>
- <td class="textItemWithPadding">
- <xsl:value-of select="//Labels/Song"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="."/>
- <xsl:text> - </xsl:text>
- <xsl:value-of select="@Title"/>
- <xsl:variable name="ScripturesForSongs" select="document('ScripturesForSongs.xml')"/>
- <xsl:variable name="SongNumber" select="."/>
-  
- <xsl:value-of select="$ScripturesForSongs/ScripturesForSongs/Song[@Number=$SongNumber]"/>
- </td>
- <td class="textTime">
- <xsl:value-of select="@EndTime12"/>
- </td>
- </tr>
- </xsl:template>
- <!--Open / Close Prayer-->
- <xsl:template match="Prayer1|Prayer2">
- <td class="textItem">
- <xsl:value-of select="//Labels/Prayer"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="."/>
- </td>
- </xsl:template>
- </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement