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">
- <xsl:attribute name="lang">
- <xsl:value-of select="//Settings//LanguageCode"/>
- </xsl:attribute>
- <xsl:attribute name="dir">
- <xsl:value-of select="//Settings/Direction"/>
- </xsl:attribute>
- <head>
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
- <title>Programma Adunanze</title>
- <style type="text/css">
- .Page {
- background: #666;
- font-family: Calibri;
- font-size: 12pt;
- width: 100%;
- margin-left: 0mm;
- margin-right: 0mm;
- }
- .containerPage {
- background: #fff;
- margin-left:25mm;
- margin-right:25mm;
- }
- .containerMeetingOdd {
- margin-bottom: 6mm;
- }
- .containerMeetingEven {
- padding-top:10mm;
- border-top: 1px #000 dashed;
- }
- .HeadingPage {
- width: 100%;
- color: #fff;
- background-color: #0070C0;
- text-transform: uppercase;
- text-align: center;
- margin-bottom: 2mm;
- font-size: 16pt;
- font-weight: 700;
- }
- .HeadingDate {
- width: 100%;
- color: #fff;
- background-color: #366092;
- text-transform: uppercase;
- text-align: center;
- margin-bottom: 2mm;
- font-weight: 700;
- font-size: 12pt;
- }
- .HeadingMidweekMeeting {
- width: 100%;
- color: #fff;
- background-color: #44546A;
- text-transform: uppercase;
- text-align: center;
- margin-bottom: 2mm;
- font-weight: 700;
- }
- .HeadingTFGW {
- width: 100%;
- color: #fff;
- background-color: #606a70;
- text-transform: uppercase;
- text-align: center;
- margin-bottom: 2mm;
- font-weight: 700;
- }
- .HeadingAYFM {
- width: 100%;
- color: #fff;
- background-color: #c18626;
- text-transform: uppercase;
- text-align: center;
- margin-bottom: 2mm;
- font-weight: 700;
- }
- .HeadingLAC {
- width: 100%;
- color: #fff;
- background-color: #961526;
- text-transform: uppercase;
- text-align: center;
- margin-bottom: 2mm;
- font-weight: 700;
- }
- .HeadingWEEKEND {
- width: 100%;
- color: #fff;
- background-color: #44546A;
- text-transform: uppercase;
- text-align: center;
- margin-top: 2mm;
- margin-bottom: 2mm;
- font-weight: 700;
- }
- .HeadingPUBLICTALK {
- width: 100%;
- color: #fff;
- background-color: #A9D08E;
- text-transform: uppercase;
- text-align: center;
- margin-bottom: 2mm;
- font-weight: 700;
- }
- .HeadingWATCHTOWER {
- width: 100%;
- color: #fff;
- background-color: #8EA9DB;
- text-transform: uppercase;
- text-align: center;
- margin-bottom: 2mm;
- font-weight: 700;
- }
- .HeadingSERVICETALK {
- width: 100%;
- color: #fff;
- background-color: #8EA9DB;
- text-transform: uppercase;
- text-align: center;
- margin-bottom: 2mm;
- font-weight: 700;
- }
- .Items {
- width: 100%;
- margin-bottom: 2mm;
- border-collapse: collapse;
- }
- .Items tbody tr:hover td {
- color: #000;
- background: #efefef;
- }
- .ItemTheme {
- }
- .ItemName {
- text-align: right;
- }
- .ItemNotes{
- font-size: 10pt;
- text-align: center;
- }
- .textDuplicate {
- background: #ff0000;
- }
- @media print {
- .Page {
- background: #fff;
- }
- .containerPage {
- margin-left:0mm;
- margin-right:0mm;
- }
- }
- </style>
- </head>
- <body class="Page">
- <div class="containerPage">
- <xsl:for-each select="MeetingWorkBook/Meeting">
- <xsl:if test="@PageBreak=1">
- <br style="page-break-before: always;"/>
- </xsl:if>
- <xsl:if test="@PageBreak=1 or position()=1">
- <xsl:apply-templates select="MeetingDate"/>
- </xsl:if>
- <div class="containerMeetingOdd">
- <xsl:if test="(position() mod 2) != 1">
- <xsl:attribute name="class">containerMeetingEven</xsl:attribute>
- </xsl:if>
- <xsl:call-template name="MEETING"/>
- <xsl:apply-templates select="TFGW"/>
- <xsl:apply-templates select="AYFM"/>
- <xsl:apply-templates select="LAC"/>
- <xsl:apply-templates select="PUBLICTALK"/>
- </div>
- </xsl:for-each>
- </div>
- </body>
- </html>
- </xsl:template>
- <!--Assignment Theme-->
- <xsl:template match="Theme">
- <td class="ItemTheme">
- <xsl:value-of select="." disable-output-escaping="yes"/>
- </td>
- </xsl:template>
- <!--Assignment Name-->
- <xsl:template match="Chairman|Conductor|Name|PrayerOpen|PrayerEnd|Reader|Speaker">
- <td class="ItemName">
- <xsl:choose>
- <xsl:when test="@Duplicate=1">
- <span class="textDuplicate">
- <xsl:value-of select="."/>
- </span>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="."/>
- </xsl:otherwise>
- </xsl:choose>
- </td>
- </xsl:template>
- <xsl:template match="MeetingDate">
- <div class="HeadingPage">
- <xsl:text>Adunanze </xsl:text>
- <xsl:value-of select="@MonthFull"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="@Year"/>
- </div>
- </xsl:template>
- <xsl:template name="MEETING">
- <div class="HeadingDate">
- <xsl:value-of select="Date" />
- <xsl:text> | </xsl:text>
- <xsl:value-of select="WeeklyBibleReading"/>
- </div>
- <!--TODO: We do not have a label for this-->
- <div class="HeadingMidweekMeeting">Adunanza Infrasettimanale</div>
- <table class="Items">
- <xsl:apply-templates select="Note"/>
- <tr>
- <!--TODO: We do not have a label for this-->
- <td class="ItemTheme">Presidente Vita e Ministero</td>
- <xsl:apply-templates select="Chairman"/>
- </tr>
- <tr>
- <td class="ItemTheme">
- <xsl:value-of select="//Labels/Song"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="SongOpen"/>
- <!--TODO: We not have labels for these-->
- <xsl:text> e preghiera</xsl:text>
- </td>
- <xsl:apply-templates select="PrayerOpen"/>
- </tr>
- </table>
- </xsl:template>
- <!--Treasures From God's Word-->
- <xsl:template match="TFGW">
- <div class="HeadingTFGW">
- <xsl:value-of select="//Labels/TFGW"/>
- </div>
- <table class="Items">
- <xsl:apply-templates select="TFGWItem" />
- <xsl:apply-templates select="BibleReadingItem"/>
- </table>
- </xsl:template>
- <!--Item-->
- <xsl:template match="LACItem|Presentations|TFGWItem">
- <tr>
- <xsl:apply-templates select="Theme"/>
- <xsl:apply-templates select="Name" />
- </tr>
- <xsl:if test="name()='Presentations'">
- <tr>
- <td> </td>
- <td> </td>
- </tr>
- <tr>
- <td> </td>
- <td> </td>
- </tr>
- </xsl:if>
- </xsl:template>
- <xsl:template match="BibleReadingItem">
- <tr>
- <td class="ItemTheme">
- <xsl:text>Lettura biblica: </xsl:text>
- <xsl:value-of select="Material"/>
- </td>
- <td class="ItemName">
- <xsl:value-of select="Readers[1]/Reader"/>
- </td>
- </tr>
- </xsl:template>
- <!--Apply Yourself To The Field Ministry-->
- <xsl:template match="AYFM">
- <div class="HeadingAYFM">
- <xsl:value-of select="//Labels/AYFM"/>
- </div>
- <table class="Items">
- <xsl:apply-templates select="Presentations" />
- <xsl:apply-templates select="StudentItem"/>
- </table>
- </xsl:template>
- <xsl:template match="StudentItem">
- <tr>
- <td class="ItemTheme">
- <xsl:value-of select="Type"/>
- <!--TODO: What about the theme if it is a talk?-->
- </td>
- <td class="ItemName">
- <!--We want position 1-->
- <xsl:value-of select="Students[1]/Student"/>
- <xsl:if test="@IsTalk=0">
- <xsl:text> / </xsl:text>
- <xsl:value-of select="Students[1]/Assistant"/>
- </xsl:if>
- </td>
- </tr>
- </xsl:template>
- <xsl:template match="LAC">
- <div class="HeadingLAC">
- <xsl:value-of select="//Labels/LAC"/>
- </div>
- <table class="Items">
- <tr>
- <td class="ItemTheme" colspan="2">
- <xsl:value-of select="//Labels/Song"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="SongMiddle"/>
- </td>
- </tr>
- <xsl:apply-templates select="LACItem"/>
- <xsl:choose>
- <xsl:when test="@CircuitVisit=0">
- <xsl:apply-templates select="CongregationBibleStudy"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="CircuitVisit/LACItem"/>
- </xsl:otherwise>
- </xsl:choose>
- <tr>
- <td class="ItemTheme">
- <xsl:value-of select="//Labels/Song"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="SongEnd"/>
- <!--We do not have labels for these-->
- <xsl:text> e preghiera</xsl:text>
- </td>
- <xsl:apply-templates select="PrayerEnd"/>
- </tr>
- </table>
- </xsl:template>
- <xsl:template match="CongregationBibleStudy">
- <tr>
- <td class="ItemTheme">
- <xsl:value-of select="//Labels/CBS"/>
- </td>
- <xsl:apply-templates select="Conductor"/>
- </tr>
- <tr>
- <xsl:call-template name="ReaderLabel"/>
- <xsl:apply-templates select="Reader"/>
- </tr>
- </xsl:template>
- <xsl:template name="ReaderLabel">
- <td class="ItemTheme">
- <!--Trims the " :" from the end of the reader label-->
- <xsl:value-of select="normalize-space(translate(//Labels/Reader,':',''))"/>
- </td>
- </xsl:template>
- <xsl:template match="PUBLICTALK">
- <div class="Gap"></div>
- <div class="HeadingWEEKEND">
- <xsl:value-of select="//Labels/PTS_WeekendMeeting"/>
- </div>
- <table class="Items">
- <tr>
- <!--Do not have a label for this-->
- <td class="ItemTheme">Presidente Adunanza del fine settimana</td>
- <xsl:apply-templates select="Assignments/Chairman"/>
- </tr>
- </table>
- <div class="HeadingPUBLICTALK">
- <xsl:value-of select="//Labels/PTS_Talk"/>
- </div>
- <table class="Items">
- <tr>
- <xsl:apply-templates select="HomeTalk/Theme"/>
- <xsl:apply-templates select="HomeTalk/Speaker"/>
- <!--We do not display the congregation name ?-->
- </tr>
- </table>
- <div class="HeadingWATCHTOWER">
- <xsl:value-of select="//Labels/PTS_WTStudy"/>
- </div>
- <table class="Items">
- <tr>
- <xsl:apply-templates select="Assignments/WatchtowerStudy/Theme"/>
- <xsl:apply-templates select="Assignments/Conductor"/>
- </tr>
- <!--This is not a circuit visit so show the reader-->
- <xsl:if test="preceding-sibling::*[1]/@CircuitVisit=0">
- <tr>
- <xsl:call-template name="ReaderLabel"/>
- <xsl:apply-templates select="Assignments/Reader"/>
- </tr>
- </xsl:if>
- </table>
- <!--This is circuit visit - show final service talk-->
- <xsl:if test="preceding-sibling::*[1]/@CircuitVisit=1">
- <div class="HeadingSERVICETALK">
- <xsl:value-of select="//Labels/PTS_ServiceTalk"/>
- </div>
- <table class="Items">
- <tr>
- <xsl:apply-templates select="Assignments/ServiceTalk/Theme"/>
- <xsl:apply-templates select="preceding-sibling::*[1]/CircuitVisit/LACItem/Name"/>
- </tr>
- </table>
- </xsl:if>
- </xsl:template>
- <!--Displays the notes (if any)-->
- <xsl:template match="Note">
- <xsl:if test="normalize-space(.) != ''">
- <tr>
- <td class="ItemNotes" colspan="2">
- <xsl:value-of select="//Labels/Note"/>: <xsl:value-of select="."/>
- </td>
- </tr>
- </xsl:if>
- </xsl:template>
- <!--<xsl:template match="SpecialEvent">
- <tr>
- <td class="textSpecialEvent" colspan="4">
- <xsl:value-of select="Event"/> [<xsl:value-of select="Date"/>]
- </td>
- </tr>
- <xsl:if test="normalize-space(Location) != ''">
- <tr>
- <td class="textSpecialEventLocation" colspan="4">
- <xsl:value-of select="Location"/>
- </td>
- </tr>
- </xsl:if>
- </xsl:template>-->
- </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment