1368

ID1368
Data2013-11-15
Symbol2013/11/15/1368
InstytucjaUrząd Marszałkowski Województwa Świętokrzyskiego w Kielcach
NazwaWniosek o utworzenie nowego parku krajobrazowego.
Czy Aktualny1

Ustawy (1)

  • URI://Dziennik_Ustaw/2011/206/1216/27/2
  • Par. 27 ust. 2 rozporządzenia Prezesa Rady Ministrów z dnia 14 września 2011r. w sprawie sporządzania pism w postaci dokumentów elektronicznych, doręczania dokumentów elektronicznych oraz udostępniania formularzy, wzorów i kopii dokumentów elektronic...

    Pliki

    Styl

    <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wnio="http://crd.gov.pl/wzor/2013/11/15/1368/" xmlns:adr="http://crd.gov.pl/xml/schematy/adres/2009/11/09/" xmlns:inst="http://crd.gov.pl/xml/schematy/instytucja/2009/11/16/" xmlns:meta="http://crd.gov.pl/xml/schematy/meta/2009/11/16/" xmlns:oso="http://crd.gov.pl/xml/schematy/osoba/2009/11/16/" xmlns:str="http://crd.gov.pl/xml/schematy/struktura/2009/11/16/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" version="1.1">
    	<xsl:output method="html" version="4.01" encoding="utf-8" indent="yes"/>
    	<xsl:template match="/wnio:Dokument">
    		<html>
    			<head>
    			
    				<title>
    					<xsl:value-of select="str:DaneDokumentu/str:Naglowek/str:NazwaDokumentu"/>
    				</title>
    				
    				<style type="text/css">
    @media screen {
    	body, table {
    		font-size: 12px;
    	}
    	.NazwaDokumentu { 
    		font-size: 14px;
    	}
    }
    @media print {
    	body, table {
    		font-size: 10px;
    	}
    	.NazwaDokumentu {
    		font-size: 12px;
    	}
    }
    @media screen,print {
    	body {
    		font-family: Verdana, Arial, sans-serif;
    		background-color: #FFFFFF;
    		margin: 5px; 
    		padding: 0px;
    		border: none;
    	}
    	
    	.DokumentObszar {
    		border: solid 1px #000000;
    		margin-bottom: 15px;
    	}
    	.DokumentTutul {
    		color: #ffffff;
    		font-weight: bold;
    		background-color: #000000;
    		padding: 7px;
    	}
    	.DokumentWartosc {
    		padding: 7px;
    	}
    	
    	p {
    		margin: 5px 0px 10px 0px;
    	}
    	
    	ul {
    		margin-top: 6px;
    	}
    	
    	.NadawcyObszar,
    	.TworcyObszar,
    	.AdresaciObszar,
    	.TrescObszar,
    	.ZalacznikiObszar {
    		margin-bottom: 20px;
    	}
    	.NadawcyTytul1,
    	.TworcyTytul1, 
    	.AdresaciTytul1,
    	.TrescTytul1,
    	.ZalacznikiTytul1,
    	.UwagiTytul1 {
    		text-align: left;
    		color: #000000;
    		padding: 10px 7px;
    	}
    	.NadawcyTytul2,
    	.TworcyTytul2,
    	.AdresaciTytul2,
    	.TrescTytul2,
    	.ZalacznikiTytul2 {
    		text-align: left;
    		color: #000000;
    		padding: 7px;
    		border-bottom: solid 1px #cccccc;
    	}
    	
    	.NadawcyObszar {
    		border: solid 1px #375300;
    	}
    	.NadawcyTytul1 {
    		background-color: #dbe6c5;
    		border-bottom: solid 1px #375300;
    	}
    	.NadawcyTytul2 {
    		background-color: #f2f5eb;
    	}
    	
    	.TworcyObszar {
    		border: solid 1px #430062;
    	}
    	.TworcyTytul1 {
    		background-color: #decae7;
    		border-bottom: solid 1px #430062;
    	}
    	.TworcyTytul2 {
    		background-color: #f0e9f4;
    	}
    	
    	.AdresaciObszar {
    		border: solid 1px #003366;
    	}
    	.AdresaciTytul1 {
    		background-color: #c8d8e7;
    		border-bottom: solid 1px #003366;
    	}
    	.AdresaciTytul2 {
    		background-color: #e9eef4;
    	}
    	
    	.TrescObszar {
    		border: solid 1px #7d0000;
    	}
    	.TrescTytul1 {
    		background-color: #e9cece;
    		border-bottom: solid 1px #7d0000;
    	}
    	.TrescTytul2 {
    		background-color: #ffffff;
    	}
    	
    	.ZalacznikiObszar {
    		border: none;
    	}
    	.ZalacznikiTytul1 {
    		border: solid 1px #665200;
    		background-color: #e9e1cf;
    	}
    	.ZalacznikiTytul2 {
    		background-color: #ffffff;
    	}
    	
    	.UwagiObszar {
    		border: solid 1px #686868;
    	}
    	.UwagiTytul1 {
    		background-color: #eaeaea;
    		border-bottom: solid 1px #686868;
    	}
    	.UwagiTytul2 {
    		background-color: #ffffff;
    	}
    	
    	.ZalacznikiTabela1 {
    		margin-bottom: 10pt;
    		border-collapse: collapse;
    		empty-cells: show;
    		border: 1px solid #665200;
    		border-top: none;
    	}
    	.ZalacznikiTabela1 th {
    		margin: auto;
    		text-align: center;
    		vertical-align: top;
    		background-color: #e9e1cf;
    		border: solid 1px #665200;
    		border-top: none;
    	}
    	.ZalacznikiTabela1 td {
    		vertical-align: top;
    		border: solid 1px #665200;
    	}
    	
    	
    	.Kategoria1 {
    		display: block;
    		padding: 7px;
    		border: none;
    		border-bottom: solid 1px #cccccc;
    	}
    	.Kategoria1Nazwa,
    	.Kategoria1Nazwa2 {
    		float: left;
    		color: #4a4a4a;
    		line-height: 150%;
    	}
    	.Kategoria1Nazwa {
    		width: 180px;
    	}
    	.Kategoria1Nazwa2 {
    		width: 300px;
    	}
    	
    	.Kategoria1Tresc,
    	.Kategoria1Tresc2 {
    		padding-left: 0px;
    		line-height: 150%;
    	}
    	.Kategoria1Tresc {
    		margin-left: 200px;
    	}
    	.Kategoria1Tresc2 {
    		margin-left: 320px;
    	}
    	
    	.KategoriaTytulNazwa {
    		float: left;
    		width: 200px;
    		color: #000000;
    		font-weight: bold;
    		line-height: 150%;
    	}
    	.KategoriaTytulTresc {
    		height: 16px;
    		margin-left: 200px;
    		line-height: 150%;
    	}
    	
    	.KategoriaWyczysc {
    		font-size: 1px;
    		clear: both;
    	}
    	
    	.WierszPodkreslony {
    		padding: 7px;
    		border-bottom: solid 1px #cccccc;
    	}
    	.WierszTytul1 {
    		padding: 7px;
    		background-color: #e3e3e3
    	}
    	
    	.Grupa1 { 
    		display: inline-block;
    		margin-right: 40px;
    		color: #000000;
    	}
    	.Grupa1Nazwa {
    		color: #666666;
    	}
    	
    	.Blad {
    		color: #ff0000;
    		font-weight: bold;
    		padding: 5px;
    	}
    	
    	.Wazne {
    		color: #ff0000;
    		font-weight: bold;
    	}
    	
    	.TrescPodpowiedz1 {
    		font-size: 95%;
    		line-height: 130%;
    		color: #525252;
    		margin-top: 6px;
    	}
    
    	
    	.Tabela1 {
    		margin-top: 3pt;
    		margin-bottom: 10pt;
    		border-collapse: collapse;
    		empty-cells: show;
    		border: 1px solid #868686;
    	}
    	.Tabela1 th {
    		margin: auto;
    		text-align: center;
    		vertical-align: top;
    		background-color: #dcdcdc;
    		border: solid 1px #868686;
    	}
    	.Tabela1 td {
    		vertical-align: top;
    		border: solid 1px #868686;
    	}
    	.Tabela1 td.srodek {
    		text-align: center;
    	}
    	
    	.Margines20 { margin-left: 20px; }
    	.Margines40 { margin-left: 40px; }
    	.Margines60 { margin-left: 60px; }
    	.Margines80 { margin-left: 80px; }
    	.Margines100 { margin-left: 100px; }
    	
    	.odstep1 {
    		height: 30px;
    	}
    	
    }
    				</style>
    			</head>
    			<body>
    				<div class="Dokument">
    				
    					<div class="DokumentObszar">
    						<xsl:call-template name="NazwaDokumentuTmpl"/>
    					</div>
    					<div class="NadawcyObszar">
    						<xsl:call-template name="NadawcyTmpl"/>
    					</div>
    					<div class="TworcyObszar">
    						<xsl:call-template name="TworcyTmpl"/>
    					</div>
    					<div class="AdresaciObszar">
    						<xsl:call-template name="AdresaciTmpl"/>
    					</div>
    					<div class="TrescObszar">
    						<xsl:call-template name="TrescTmpl"/>
    					</div>
    					<xsl:call-template name="ZalacznikiTmpl"/>
    					<xsl:call-template name="UwagiTmpl">
    						<xsl:with-param name="PokazUwagi" select="1"/>
    					</xsl:call-template>
    					
    				</div>
    				<div class="odstep1"/>
    			</body>
    		</html>
    	</xsl:template>
    	
    	<xsl:template name="TrescTmpl">
    		<xsl:param name="TrescSciezka" select="wnio:TrescDokumentu/wnio:TrescWniosku"/>
    		<xsl:param name="AdresGrupy" select="$TrescSciezka/wnio:AdresGrupy"/>
    
    		<div class="TrescTytul1"><strong><xsl:text>Treść dokumentu</xsl:text></strong></div>
    		
    		<div class="Kategoria1">
    			<div class="Kategoria1Nazwa2"><xsl:text>Nazwa parku:</xsl:text></div>
    			<div class="Kategoria1Tresc2">
    				<xsl:choose>
    					<xsl:when test="$TrescSciezka/wnio:NazwaParku != ''">
    						<xsl:call-template name="nl2br">
    							<xsl:with-param name="string" select="$TrescSciezka/wnio:NazwaParku"/>
    						</xsl:call-template>
    					</xsl:when>
    					<xsl:otherwise>
    						<span class="Blad"><xsl:text>Nie podano nazwy parku!</xsl:text></span>
    					</xsl:otherwise>
    				</xsl:choose>
    			</div>
    			<div class="KategoriaWyczysc"/>
    		</div>
    		
    		<div class="Kategoria1">
    			<div class="Kategoria1Nazwa2"><xsl:text>Powierzchnia [ha]:</xsl:text></div>
    			<div class="Kategoria1Tresc2">
    				<xsl:choose>
    					<xsl:when test="$TrescSciezka/wnio:Powierzchnia != ''">
    						<xsl:call-template name="nl2br">
    							<xsl:with-param name="string" select="$TrescSciezka/wnio:Powierzchnia"/>
    						</xsl:call-template>
    					</xsl:when>
    					<xsl:otherwise>
    						<span class="Blad"><xsl:text>Nie podano powierzchni parku!</xsl:text></span>
    					</xsl:otherwise>
    				</xsl:choose>
    			</div>
    			<div class="KategoriaWyczysc"/>
    		</div>
    		
    		<div class="Kategoria1">
    			<div class="Kategoria1Nazwa2"><xsl:text>Powierzchnia otuliny [ha]:</xsl:text></div>
    			<div class="Kategoria1Tresc2">
    				<xsl:choose>
    					<xsl:when test="$TrescSciezka/wnio:PowierzchniaOtuliny != ''">
    						<xsl:call-template name="nl2br">
    							<xsl:with-param name="string" select="$TrescSciezka/wnio:PowierzchniaOtuliny"/>
    						</xsl:call-template>
    					</xsl:when>
    					<xsl:otherwise>
    						<span class="Blad"><xsl:text>Nie podano powierzchni otuliny!</xsl:text></span>
    					</xsl:otherwise>
    				</xsl:choose>
    			</div>
    			<div class="KategoriaWyczysc"/>
    		</div>
    		
    		<div class="Kategoria1">
    			<div class="Kategoria1Nazwa2"><xsl:text>Wykaz gmin, na terenie których park będzie zlokalizowany:</xsl:text></div>
    			<div class="Kategoria1Tresc2">
    				<xsl:choose>
    					<xsl:when test="$TrescSciezka/wnio:WykazGmin != ''">
    						<xsl:call-template name="nl2br">
    							<xsl:with-param name="string" select="$TrescSciezka/wnio:WykazGmin"/>
    						</xsl:call-template>
    					</xsl:when>
    					<xsl:otherwise>
    						<span class="Blad"><xsl:text>Nie podano wykazu gmin, na terenie których park będzie zlokalizowany!</xsl:text></span>
    					</xsl:otherwise>
    				</xsl:choose>
    			</div>
    			<div class="KategoriaWyczysc"/>
    		</div>
    		
    		<div class="WierszTytul1"><xsl:text>Szczególne cele ochrony parku:</xsl:text></div>
    		
    		<div class="Kategoria1">
    			<div class="Kategoria1Nazwa2"><xsl:text>Cele ogólne, wyznaczające główne kierunki ochrony parku:</xsl:text></div>
    			<div class="Kategoria1Tresc2">
    				<xsl:choose>
    					<xsl:when test="$TrescSciezka/wnio:SzczegolneCeleOchronyParku/wnio:CeleOgolne != ''">
    						<xsl:call-template name="nl2br">
    							<xsl:with-param name="string" select="$TrescSciezka/wnio:SzczegolneCeleOchronyParku/wnio:CeleOgolne"/>
    						</xsl:call-template>
    					</xsl:when>
    					<xsl:otherwise>
    						<span class="Blad"><xsl:text>Nie podano celów ogólnych ochrony parku!</xsl:text></span>
    					</xsl:otherwise>
    				</xsl:choose>
    			</div>
    			<div class="KategoriaWyczysc"/>
    		</div>
    		
    		<div class="Kategoria1">
    			<div class="Kategoria1Nazwa2"><xsl:text>Cele ochrony wartości przyrodniczych:</xsl:text></div>
    			<div class="Kategoria1Tresc2">
    				<xsl:choose>
    					<xsl:when test="$TrescSciezka/wnio:SzczegolneCeleOchronyParku/wnio:CeleOchrony != ''">
    						<xsl:call-template name="nl2br">
    							<xsl:with-param name="string" select="$TrescSciezka/wnio:SzczegolneCeleOchronyParku/wnio:CeleOchrony"/>
    						</xsl:call-template>
    					</xsl:when>
    					<xsl:otherwise>
    						<xsl:text> - </xsl:text>
    					</xsl:otherwise>
    				</xsl:choose>
    			</div>
    			<div class="KategoriaWyczysc"/>
    		</div>
    		
    		<div class="Kategoria1">
    			<div class="Kategoria1Nazwa2"><xsl:text>Cele ochrony wartości historycznych i kulturowych:</xsl:text></div>
    			<div class="Kategoria1Tresc2">
    				<xsl:choose>
    					<xsl:when test="$TrescSciezka/wnio:SzczegolneCeleOchronyParku/wnio:CeleOchronyHistorycz != ''">
    						<xsl:call-template name="nl2br">
    							<xsl:with-param name="string" select="$TrescSciezka/wnio:SzczegolneCeleOchronyParku/wnio:CeleOchronyHistorycz"/>
    						</xsl:call-template>
    					</xsl:when>
    					<xsl:otherwise>
    						<xsl:text> - </xsl:text>
    					</xsl:otherwise>
    				</xsl:choose>
    			</div>
    			<div class="KategoriaWyczysc"/>
    		</div>
    		
    		<div class="Kategoria1">
    			<div class="Kategoria1Nazwa2"><xsl:text>Cele ochrony walorów krajobrazowych:</xsl:text></div>
    			<div class="Kategoria1Tresc2">
    				<xsl:choose>
    					<xsl:when test="$TrescSciezka/wnio:SzczegolneCeleOchronyParku/wnio:CeleOchronyKrajobrazow != ''">
    						<xsl:call-template name="nl2br">
    							<xsl:with-param name="string" select="$TrescSciezka/wnio:SzczegolneCeleOchronyParku/wnio:CeleOchronyKrajobrazow"/>
    						</xsl:call-template>
    					</xsl:when>
    					<xsl:otherwise>
    						<xsl:text> - </xsl:text>
    					</xsl:otherwise>
    				</xsl:choose>
    			</div>
    			<div class="KategoriaWyczysc"/>
    		</div>
    		
    		<div class="Kategoria1">
    			<div class="Kategoria1Nazwa2"><xsl:text>Inne cele:</xsl:text></div>
    			<div class="Kategoria1Tresc2">
    				<xsl:choose>
    					<xsl:when test="$TrescSciezka/wnio:SzczegolneCeleOchronyParku/wnio:InneCele != ''">
    						<xsl:call-template name="nl2br">
    							<xsl:with-param name="string" select="$TrescSciezka/wnio:SzczegolneCeleOchronyParku/wnio:InneCele"/>
    						</xsl:call-template>
    					</xsl:when>
    					<xsl:otherwise>
    						<xsl:text> - </xsl:text>
    					</xsl:otherwise>
    				</xsl:choose>
    			</div>
    			<div class="KategoriaWyczysc"/>
    		</div>
    		
    		<div class="WierszTytul1"><xsl:text>Zakazy mające obowiązywać w parku:</xsl:text></div>
    		
    		<div class="Kategoria1">
    			<div class="Kategoria1Nazwa2"><xsl:text>Zakazy wynikające z potrzeb jego ochrony, wybrane spośród katalogu zakazów znajdującego sie w art. 17 ust. 1 ustawy z dnia 16 kwietnia 2004r. o ochronie przyrody (Dz. U. z 2009r. Nr 151, poz. 1220, z późn. zm.):</xsl:text></div>
    			<div class="Kategoria1Tresc2">
    				<xsl:choose>
    					<xsl:when test="$TrescSciezka/wnio:Zakazy/wnio:Zakazy != ''">
    						<xsl:call-template name="nl2br">
    							<xsl:with-param name="string" select="$TrescSciezka/wnio:Zakazy/wnio:Zakazy"/>
    						</xsl:call-template>
    					</xsl:when>
    					<xsl:otherwise>
    						<span class="Blad"><xsl:text>Nie podano zakazów wynikających z potrzeb ochrony parku!</xsl:text></span>
    					</xsl:otherwise>
    				</xsl:choose>
    			</div>
    			<div class="KategoriaWyczysc"/>
    		</div>
    		
    		<div class="Kategoria1">
    			<div class="Kategoria1Nazwa2"><xsl:text>Ewentualne wyłączenia terytorialne z obowiązywania zakazów:</xsl:text></div>
    			<div class="Kategoria1Tresc2">
    				<xsl:choose>
    					<xsl:when test="$TrescSciezka/wnio:Zakazy/wnio:WylaczeniaTerytorialne != ''">
    						<xsl:call-template name="nl2br">
    							<xsl:with-param name="string" select="$TrescSciezka/wnio:Zakazy/wnio:WylaczeniaTerytorialne"/>
    						</xsl:call-template>
    					</xsl:when>
    					<xsl:otherwise>
    						<xsl:text> - </xsl:text>
    					</xsl:otherwise>
    				</xsl:choose>
    			</div>
    			<div class="KategoriaWyczysc"/>
    		</div>
    		
    
    	</xsl:template>
    	
    
    
    	<xsl:template name="UwagiTmpl">
    		<xsl:param name="PokazUwagi"/>
    		
    		<xsl:if test="$PokazUwagi = 1">
    			<div class="UwagiObszar">
    				<div class="UwagiTytul1">
    					<strong><xsl:text>UWAGI</xsl:text></strong>
    				</div>
    				
    				<div class="Kategoria1">
    					<strong><xsl:text>Do wniosku należy załączyć:</xsl:text></strong><br/>
    					<ul>
    						<li><xsl:text>Mapka graficzna granicy parku i/lub otuliny parku - opis przebiegu granicy.</xsl:text></li>
    						<li><xsl:text>Załączniki dokumentujące walory przyrodnicze, historyczne, kulturowe oraz walory krajobrazowe.</xsl:text></li>
    					</ul>
    				</div>
    				
    			</div>
    		</xsl:if>
    	</xsl:template>
    	
    	<xsl:template name="NazwaDokumentuTmpl">
    		<xsl:param name="TrescSciezka" select="wnio:TrescDokumentu"/>
    		
    		<div class="DokumentTutul">
    			<xsl:value-of select="str:DaneDokumentu/str:Naglowek/str:NazwaDokumentu"/>
    		</div>
    		<div class="DokumentWartosc">
    			<span class="Grupa1">
    				<span class="Grupa1Nazwa"><xsl:text>Miejscowość: </xsl:text></span>
    				<xsl:value-of select="$TrescSciezka/wnio:Miejscowosc"/>
    			</span>
    			<span class="Grupa1">
    				<span class="Grupa1Nazwa"><xsl:text>Data: </xsl:text></span>
    				<xsl:call-template name="PelnaDataTmpl">
    					<xsl:with-param name="PelnaDataSciezka" select="$TrescSciezka/wnio:Dnia"/>
    				</xsl:call-template>
    			</span>
    		</div>
    	</xsl:template>
    	
    	
    	<xsl:template name="AdresaciTmpl">
    		<xsl:param name="AdresaciSciezka" select="str:DaneDokumentu/str:Adresaci"/>
    		<xsl:param name="AdresaciTyp" select="$AdresaciSciezka/meta:Podmiot/@typPodmiotu"/>
    		<xsl:param name="AdresaciIlosc" select="count($AdresaciSciezka/meta:Podmiot[normalize-space()])"/>
    		<xsl:param name="AdresaciWartosc" select="$AdresaciSciezka/meta:Podmiot/descendant::*/text()"/>
    		
    		<div class="Sekcja">
    
    			<div class="AdresaciTytul1">
    				<strong><xsl:text>Adresaci dokumentu</xsl:text></strong>
    				<xsl:text> (ilość: </xsl:text><xsl:value-of select="$AdresaciIlosc"/><xsl:text>)</xsl:text>
    			</div>
    			
    			<div class="SekcjaTresc">
    				<xsl:choose>
    					<xsl:when test="$AdresaciSciezka and $AdresaciWartosc and $AdresaciIlosc &gt; 0">
    						<xsl:for-each select="str:DaneDokumentu/str:Adresaci/meta:Podmiot">
    							<xsl:if test="self::node()[normalize-space()]">
    								<div class="AdresaciTytul2">
    									<div class="KategoriaTytulNazwa">
    										<xsl:text>Adresat nr </xsl:text>
    										<xsl:value-of select="position()"/>
    										<xsl:text>: </xsl:text>
    									</div>
    									<div class="KategoriaTytulTresc">
    										<xsl:call-template name="AdresatNazwaTmpl">
    											<xsl:with-param name="AdresatSciezka" select="current()"/>
    											<xsl:with-param name="AdresatTyp" select="$AdresaciTyp"/>
    										</xsl:call-template>
    									</div>
    									<div class="KategoriaWyczysc"/>
    								</div>
    									
    								<div class="KategoriaTresc">
    									<xsl:call-template name="AdresatTmpl">
    										<xsl:with-param name="AdresatSciezka" select="current()"/>
    										<xsl:with-param name="AdresatTyp" select="$AdresaciTyp"/>
    									</xsl:call-template>
    								</div>
    							</xsl:if>
    						</xsl:for-each>
    					</xsl:when>
    					<xsl:otherwise>
    						<div class="Blad">
    							<xsl:text>UWAGA! Nie podano adresatów dokumentu!</xsl:text>
    						</div>
    					</xsl:otherwise>
    				</xsl:choose>
    			</div>
    			
    		</div>
    	</xsl:template>
    	
    	
    	<xsl:template name="AdresatTmpl">
    		<xsl:param name="AdresatSciezka"/>
    		<xsl:param name="AdresatTyp"/>
    		
    		<xsl:value-of select="$AdresatSciezka/./wnio:TypTworcy"/>
    		
    		<xsl:if test="$AdresatTyp = 'Osoba fizyczna'">
    			<xsl:call-template name="OsobaTmpl">
    				<xsl:with-param name="OsobaSciezka" select="$AdresatSciezka/oso:Osoba"/>
    			</xsl:call-template>
    		</xsl:if>
    		
    		<xsl:if test="$AdresatTyp = 'Instytucja' or $AdresatTyp = 'instytucja'">
    			<xsl:call-template name="InstytucjaTmpl">
    				<xsl:with-param name="InstytucjaSciezka" select="$AdresatSciezka/inst:Instytucja"/>
    			</xsl:call-template>
    		</xsl:if>
    		
    	</xsl:template>
    	
    	
    	<xsl:template name="AdresatNazwaTmpl">
    		<xsl:param name="AdresatSciezka"/>
    		<xsl:param name="AdresatTyp"/>
    		
    		<xsl:if test="$AdresatTyp = 'Osoba fizyczna'">
    			<strong>
    				<xsl:call-template name="OsobaImieNazwiskoTmpl">
    					<xsl:with-param name="OsobaSciezka" select="$AdresatSciezka/oso:Osoba"/>
    				</xsl:call-template>
    			</strong>
    			<xsl:text> (osoba fizyczna)</xsl:text>
    		</xsl:if>
    		
    		<xsl:if test="$AdresatTyp = 'Instytucja' or $AdresatTyp = 'instytucja'">
    			<strong>
    				<xsl:value-of select="$AdresatSciezka/inst:Instytucja/inst:NazwaInstytucji"/>
    			</strong>
    			<xsl:text> (instytucja)</xsl:text>
    		</xsl:if>
    		
    	</xsl:template>
    	
    	
    	<xsl:template name="OsobaTmpl">
    		<xsl:param name="OsobaSciezka"/>
    		
    		<xsl:if test="not($OsobaSciezka)">
    			<xsl:call-template name="OsobaTmpl">
    				<xsl:with-param name="OsobaSciezka" select="str:DaneDokumentu/str:Nadawcy/meta:Podmiot/oso:Osoba"/>
    			</xsl:call-template>
    		</xsl:if>
    		
    		<xsl:if test="$OsobaSciezka/self::inst:Pracownik and $OsobaSciezka/inst:Funkcja != ''">
    			<div class="Kategoria1">
    				<div class="Kategoria1Nazwa"><xsl:text>Funkcja:</xsl:text></div>
    				<div class="Kategoria1Tresc">
    					<xsl:value-of select="$OsobaSciezka/inst:Funkcja"/>
    				</div>
    				<div class="KategoriaWyczysc"/>
    			</div>
    		</xsl:if>
    		
    		<div class="Kategoria1">
    			<div class="Kategoria1Nazwa"><xsl:text>Identyfikacja:</xsl:text></div>
    			<div class="Kategoria1Tresc">
    				<xsl:call-template name="PodmiotIdentyfikatoryTmpl">
    					<xsl:with-param name="PodmiotSciezka" select="$OsobaSciezka/oso:IdOsoby"/>
    				</xsl:call-template>
    			</div>
    			<div class="KategoriaWyczysc"/>
    		</div>
    		
    		<xsl:if test="not($OsobaSciezka/self::inst:Pracownik)">
    			<div class="Kategoria1">
    				<div class="Kategoria1Nazwa"><xsl:text>Adres:</xsl:text></div>
    				<div class="Kategoria1Tresc">
    					<xsl:call-template name="PodmiotAdresTmpl">
    						<xsl:with-param name="PodmiotSciezka" select="$OsobaSciezka/adr:Adres"/>
    					</xsl:call-template>
    				</div>
    				<div class="KategoriaWyczysc"/>
    			</div>
    		</xsl:if>
    		
    		<div class="Kategoria1">
    			<div class="Kategoria1Nazwa"><xsl:text>Kontakt:</xsl:text></div>
    			<div class="Kategoria1Tresc">
    				<xsl:call-template name="PodmiotKontaktTmpl">
    					<xsl:with-param name="PodmiotSciezka" select="$OsobaSciezka/adr:Kontakt"/>
    				</xsl:call-template>
    			</div>
    			<div class="KategoriaWyczysc"/>
    		</div>
    		
    	</xsl:template>
    	
    	
    	<xsl:template name="InstytucjaTmpl">
    		<xsl:param name="InstytucjaSciezka"/>
    		
    		<xsl:if test="not($InstytucjaSciezka)">
    			<xsl:call-template name="InstytucjaTmpl">
    				<xsl:with-param name="InstytucjaSciezka" select="str:DaneDokumentu/str:Nadawcy/meta:Podmiot/inst:Instytucja"/>
    			</xsl:call-template>
    		</xsl:if>
    		
    		<xsl:if test="$InstytucjaSciezka/self::inst:Jednostka">
    			<div class="Kategoria1">
    				<div class="Kategoria1Nazwa"><xsl:text>Poziom:</xsl:text></div>
    				<div class="Kategoria1Tresc">
    					<xsl:value-of select="$InstytucjaSciezka/inst:Poziom"/>
    				</div>
    				<div class="KategoriaWyczysc"/>
    			</div>
    		</xsl:if>
    		
    		<xsl:if test="not($InstytucjaSciezka/self::inst:Jednostka)">
    			<div class="Kategoria1">
    				<div class="Kategoria1Nazwa"><xsl:text>Identyfikacja:</xsl:text></div>
    				<div class="Kategoria1Tresc">
    					<xsl:call-template name="PodmiotIdentyfikatoryTmpl">
    						<xsl:with-param name="PodmiotSciezka" select="$InstytucjaSciezka/inst:IdInstytucji"/>
    					</xsl:call-template>
    				</div>
    				<div class="KategoriaWyczysc"/>
    			</div>
    		</xsl:if>
    		
    		<div class="Kategoria1">
    			<div class="Kategoria1Nazwa"><xsl:text>Adres:</xsl:text></div>
    			<div class="Kategoria1Tresc">
    				<xsl:call-template name="PodmiotAdresTmpl">
    					<xsl:with-param name="PodmiotSciezka" select="$InstytucjaSciezka/adr:Adres"/>
    				</xsl:call-template>
    			</div>
    			<div class="KategoriaWyczysc"/>
    		</div>
    		
    		<div class="Kategoria1">
    			<div class="Kategoria1Nazwa"><xsl:text>Kontakt:</xsl:text></div>
    			<div class="Kategoria1Tresc">
    				<xsl:call-template name="PodmiotKontaktTmpl">
    					<xsl:with-param name="PodmiotSciezka" select="$InstytucjaSciezka/adr:Kontakt"/>
    				</xsl:call-template>
    			</div>
    			<div class="KategoriaWyczysc"/>
    		</div>
    		
    		<xsl:if test="$InstytucjaSciezka/inst:Jednostka">
    			<div class="Margines40">
    				<div class="Kategoria1">
    					<div class="Kategoria1Nazwa"><strong><xsl:text>Jednostka organizacyjna:</xsl:text></strong></div>
    					<div class="Kategoria1Tresc">
    						<xsl:value-of select="$InstytucjaSciezka/inst:Jednostka/inst:NazwaInstytucji"/>
    					</div>
    					<div class="KategoriaWyczysc"/>
    				</div>
    				
    				<xsl:call-template name="InstytucjaTmpl">
    					<xsl:with-param name="InstytucjaSciezka" select="$InstytucjaSciezka/inst:Jednostka"/>
    				</xsl:call-template>
    			</div>
    		</xsl:if>
    		
    		<xsl:if test="$InstytucjaSciezka/inst:Pracownik">
    			<div class="Margines40">
    				<div class="Kategoria1">
    					<div class="Kategoria1Nazwa"><strong><xsl:text>Pracownik:</xsl:text></strong></div>
    					<div class="Kategoria1Tresc">
    						<xsl:call-template name="OsobaImieNazwiskoTmpl">
    							<xsl:with-param name="OsobaSciezka" select="$InstytucjaSciezka/inst:Pracownik"/>
    						</xsl:call-template>
    					</div>
    					<div class="KategoriaWyczysc"/>
    				</div>
    				
    				<xsl:call-template name="OsobaTmpl">
    					<xsl:with-param name="OsobaSciezka" select="$InstytucjaSciezka/inst:Pracownik"/>
    				</xsl:call-template>
    			</div>
    		</xsl:if>
    		
    	</xsl:template>
    	
    	<xsl:template name="OsobaImieNazwiskoTmpl">
    		<xsl:param name="OsobaSciezka"/>
    		
    		<xsl:choose>
    			<xsl:when test="$OsobaSciezka/oso:Imie != ''">
    				<xsl:value-of select="$OsobaSciezka/oso:Imie"/>
    			</xsl:when>
    			<xsl:otherwise>
    				<span class="Blad">
    					<xsl:text>UWAGA! Nie podano imienia!</xsl:text>
    				</span>
    			</xsl:otherwise>
    		</xsl:choose>
    		
    		<xsl:if test="$OsobaSciezka/oso:ImieDrugie != ''">
    			<xsl:text> </xsl:text>
    			<xsl:value-of select="$OsobaSciezka/oso:ImieDrugie"/>
    		</xsl:if>
    		
    		<xsl:text> </xsl:text>
    		<xsl:call-template name="OsobaNazwiskoTmpl">
    			<xsl:with-param name="OsobaNazwiskoSciezka" select="$OsobaSciezka/oso:Nazwisko"/>
    		</xsl:call-template>
    	</xsl:template>
    	
    	<xsl:template name="OsobaNazwiskoTmpl">
    		<xsl:param name="OsobaNazwiskoSciezka"/>
    	
    		<xsl:choose>
    			<xsl:when test="$OsobaNazwiskoSciezka != ''">
    				<xsl:value-of select="$OsobaNazwiskoSciezka"/>
    			</xsl:when>
    			<xsl:otherwise>
    				<span class="Blad">
    					<xsl:text>UWAGA! Nie podano nazwiska!</xsl:text>
    				</span>
    			</xsl:otherwise>
    		</xsl:choose>
    	</xsl:template>
    	
    	
    	<xsl:template name="PodmiotIdentyfikatoryTmpl">
    		<xsl:param name="PodmiotSciezka"/>
    		
    		<xsl:if test="count($PodmiotSciezka/child::*) &gt; 0">
    			<xsl:for-each select="$PodmiotSciezka/child::*">
    				<xsl:choose>
    					<xsl:when test="substring-after(name(), ':') = 'InnyIdentyfikator'">
    						<xsl:if test="self::node()/child::*[position()=1] != '' and self::node()/child::*[position()=2] != ''">
    							<span class="Grupa1">
    								<span class="Grupa1Nazwa">
    									<xsl:value-of select="self::node()/child::*[position()=1]"/><xsl:text>: </xsl:text>
    								</span>
    								<xsl:value-of select="self::node()/child::*[position()=2]"/>
    							</span>
    						</xsl:if>
    					</xsl:when>
    					<xsl:otherwise>
    						<span class="Grupa1">
    							<span class="Grupa1Nazwa">
    								<xsl:value-of select="substring-after(name(), ':')"/><xsl:text>: </xsl:text>
    							</span>
    							<xsl:choose>
    								<xsl:when test="string-length(text()) &gt; 0">
    									<xsl:value-of select="text()"/>
    								</xsl:when>
    								<xsl:otherwise>
    									<xsl:text> - </xsl:text>
    								</xsl:otherwise>
    							</xsl:choose>
    						</span>
    					</xsl:otherwise>
    				</xsl:choose>
    			</xsl:for-each>
    		</xsl:if>
    	</xsl:template>
    	
    	<xsl:template name="PodmiotAdresTmpl">
    		<xsl:param name="PodmiotSciezka"/>
    		
    		<div>
    			<span class="Grupa1">
    				<xsl:choose>
    					<xsl:when test="$PodmiotSciezka/adr:Ulica != ''">
    						<xsl:value-of select="$PodmiotSciezka/adr:Ulica"/>
    					</xsl:when>
    					<xsl:otherwise>
    						<span class="Blad"><xsl:text>UWAGA! Nie podano nazwy ulicy!</xsl:text></span>
    					</xsl:otherwise>
    				</xsl:choose>
    			</span>
    			
    			<span class="Grupa1">
    				<span class="Grupa1Nazwa"><xsl:text>Budynek: </xsl:text></span>
    				<xsl:choose>
    					<xsl:when test="$PodmiotSciezka/adr:Budynek != ''">
    						<xsl:value-of select="$PodmiotSciezka/adr:Budynek"/>
    					</xsl:when>
    					<xsl:otherwise>
    						<xsl:text>-</xsl:text>
    					</xsl:otherwise>
    				</xsl:choose>
    			</span>
    			
    			<span class="Grupa1">
    				<span class="Grupa1Nazwa"><xsl:text>Lokal: </xsl:text></span>
    				<xsl:choose>
    					<xsl:when test="$PodmiotSciezka/adr:Lokal != ''">
    						<xsl:value-of select="$PodmiotSciezka/adr:Lokal"/>
    					</xsl:when>
    					<xsl:otherwise>
    						<xsl:text>-</xsl:text>
    					</xsl:otherwise>
    				</xsl:choose>
    			</span>
    		</div>
    		
    		<div>
    			<span class="Grupa1">
    				<span class="Grupa1Nazwa"><xsl:text>Kod pocztowy: </xsl:text></span>
    				<xsl:choose>
    					<xsl:when test="$PodmiotSciezka/adr:KodPocztowy != ''">
    						<xsl:value-of select="$PodmiotSciezka/adr:KodPocztowy"/>
    					</xsl:when>
    					<xsl:otherwise>
    						<xsl:text>-</xsl:text>
    					</xsl:otherwise>
    				</xsl:choose>
    			</span>
    			
    			<span class="Grupa1">
    				<span class="Grupa1Nazwa"><xsl:text>Poczta: </xsl:text></span>
    				<xsl:choose>
    					<xsl:when test="$PodmiotSciezka/adr:Poczta != ''">
    						<xsl:value-of select="$PodmiotSciezka/adr:Poczta"/>
    					</xsl:when>
    					<xsl:otherwise>
    						<xsl:text>-</xsl:text>
    					</xsl:otherwise>
    				</xsl:choose>
    			</span>
    			
    			<span class="Grupa1">
    				<span class="Grupa1Nazwa"><xsl:text>Skrytka pocztowa: </xsl:text></span>
    				<xsl:choose>
    					<xsl:when test="$PodmiotSciezka/adr:SkrytkaPocztowa != ''">
    						<xsl:value-of select="$PodmiotSciezka/adr:SkrytkaPocztowa"/>
    					</xsl:when>
    					<xsl:otherwise>
    						<xsl:text>-</xsl:text>
    					</xsl:otherwise>
    				</xsl:choose>
    			</span>
    		</div>
    		
    		<div>
    			<span class="Grupa1">
    				<span class="Grupa1Nazwa"><xsl:text>Miejscowość: </xsl:text></span>
    				<xsl:choose>
    					<xsl:when test="$PodmiotSciezka/adr:Miejscowosc != ''">
    						<xsl:value-of select="$PodmiotSciezka/adr:Miejscowosc"/>
    					</xsl:when>
    					<xsl:otherwise>
    						<xsl:text>-</xsl:text>
    					</xsl:otherwise>
    				</xsl:choose>
    			</span>
    		</div>
    		
    		<div>
    			<span class="Grupa1">
    				<span class="Grupa1Nazwa"><xsl:text>Gmina: </xsl:text></span>
    				<xsl:choose>
    					<xsl:when test="$PodmiotSciezka/adr:Gmina != ''">
    						<xsl:value-of select="$PodmiotSciezka/adr:Gmina"/>
    					</xsl:when>
    					<xsl:otherwise>
    						<xsl:text>-</xsl:text>
    					</xsl:otherwise>
    				</xsl:choose>
    			</span>
    			
    			<span class="Grupa1">
    				<span class="Grupa1Nazwa"><xsl:text>Powiat: </xsl:text></span>
    				<xsl:choose>
    					<xsl:when test="$PodmiotSciezka/adr:Powiat != ''">
    						<xsl:value-of select="$PodmiotSciezka/adr:Powiat"/>
    					</xsl:when>
    					<xsl:otherwise>
    						<xsl:text>-</xsl:text>
    					</xsl:otherwise>
    				</xsl:choose>
    			</span>
    
    			<span class="Grupa1">
    				<span class="Grupa1Nazwa"><xsl:text>Woj.: </xsl:text></span>
    				<xsl:choose>
    					<xsl:when test="$PodmiotSciezka/adr:Wojewodztwo != ''">
    						<xsl:value-of select="$PodmiotSciezka/adr:Wojewodztwo"/>
    					</xsl:when>
    					<xsl:otherwise>
    						<xsl:text>-</xsl:text>
    					</xsl:otherwise>
    				</xsl:choose>
    			</span>
    			
    			<span class="Grupa1">
    				<span class="Grupa1Nazwa"><xsl:text>Kod kraju: </xsl:text></span>
    				<xsl:choose>
    					<xsl:when test="$PodmiotSciezka/adr:Kraj != ''">
    						<xsl:value-of select="$PodmiotSciezka/adr:Kraj"/>
    					</xsl:when>
    					<xsl:otherwise>
    						<xsl:text>-</xsl:text>
    					</xsl:otherwise>
    				</xsl:choose>
    			</span>
    		</div>
    		
    		<xsl:if test="$PodmiotSciezka/adr:TERC != '' or $PodmiotSciezka/adr:SIMC != '' or $PodmiotSciezka/adr:ULIC != ''">
    			<div>
    				<span class="Grupa1">
    					<span class="Grupa1Nazwa"><xsl:text>Kod TERC: </xsl:text></span>
    					<xsl:choose>
    						<xsl:when test="$PodmiotSciezka/adr:TERC != ''">
    							<xsl:value-of select="$PodmiotSciezka/adr:TERC"/>
    						</xsl:when>
    						<xsl:otherwise>
    							<span class="Blad"><xsl:text>-</xsl:text></span>
    						</xsl:otherwise>
    					</xsl:choose>
    				</span>
    				
    				<span class="Grupa1">
    					<span class="Grupa1Nazwa"><xsl:text>Kod SIMC: </xsl:text></span>
    					<xsl:choose>
    						<xsl:when test="$PodmiotSciezka/adr:SIMC != ''">
    							<xsl:value-of select="$PodmiotSciezka/adr:SIMC"/>
    						</xsl:when>
    						<xsl:otherwise>
    							<span class="Blad"><xsl:text>-</xsl:text></span>
    						</xsl:otherwise>
    					</xsl:choose>
    				</span>
    				
    				<span class="Grupa1">
    					<span class="Grupa1Nazwa"><xsl:text>Kod ULIC: </xsl:text></span>
    					<xsl:choose>
    						<xsl:when test="$PodmiotSciezka/adr:ULIC != ''">
    							<xsl:value-of select="$PodmiotSciezka/adr:ULIC"/>
    						</xsl:when>
    						<xsl:otherwise>
    							<span class="Blad"><xsl:text>-</xsl:text></span>
    						</xsl:otherwise>
    					</xsl:choose>
    				</span>
    			</div>
    		</xsl:if>
    		
    		<xsl:if test="$PodmiotSciezka/adr:Uwagi != ''">
    			<div>
    				<div class="Wazne"><xsl:text>Uwagi:</xsl:text></div>
    				<xsl:value-of select="$PodmiotSciezka/adr:Uwagi"/>
    			</div>
    		</xsl:if>
    		
    	</xsl:template>
    	
    	<xsl:template name="PodmiotKontaktTmpl">
    		<xsl:param name="PodmiotSciezka"/>
    		
    		<xsl:if test="count($PodmiotSciezka/child::*) &gt; 0">
    			<xsl:for-each select="$PodmiotSciezka/child::*">
    				<span class="Grupa1">
    					<xsl:choose>
    						<xsl:when test="substring-after(name(), ':') = 'InnyKontakt'">
    							<xsl:if test="text() != ''">
    								<span class="Grupa1Nazwa"><xsl:text>Inny kontakt: </xsl:text></span>
    								<xsl:value-of select="text()"/>
    							</xsl:if>
    						</xsl:when>
    						<xsl:otherwise>
    							
    							<xsl:choose>
    								<xsl:when test="substring-after(name(), ':') = 'Email'">
    									<span class="Grupa1Nazwa"><xsl:text>E-mail: </xsl:text></span>
    									<xsl:call-template name="adresPocztyElektronicznej">
    										<xsl:with-param name="adresPoczty" select="text()"/>
    									</xsl:call-template>
    		
    								</xsl:when>
    								<xsl:otherwise>
    								
    									<span class="Grupa1Nazwa"><xsl:value-of select="substring-after(name(), ':')"/><xsl:text>: </xsl:text></span>
    									<xsl:choose>
    										<xsl:when test="count(text()) &gt; 0">
    											<xsl:value-of select="text()"/>
    										</xsl:when>
    										<xsl:otherwise>
    											<xsl:text> - </xsl:text>
    										</xsl:otherwise>
    									</xsl:choose>
    									
    								</xsl:otherwise>
    							</xsl:choose>	
    								
    						</xsl:otherwise>
    					</xsl:choose>
    				</span>
    			</xsl:for-each>
    		</xsl:if>
    	</xsl:template>
    	
    	<xsl:template name="TworcyTmpl">
    		<xsl:param name="TworcySciezka" select="str:DaneDokumentu/meta:Tworcy"/>
    		<xsl:param name="TworcaTyp" select="wnio:TrescDokumentu/wnio:TypTworcy"/>
    		<xsl:param name="TworcyIlosc" select="count($TworcySciezka/meta:Tworca/meta:Podmiot[normalize-space()])"/>
    		<xsl:param name="TworcyWartosc" select="$TworcySciezka/meta:Tworca/meta:Podmiot/descendant::*/text()"/>
    		
    		<div class="Sekcja">
    			<div class="TworcyTytul1">
    				<strong><xsl:text>Twórcy dokumentu</xsl:text></strong>
    				<xsl:text> (ilość: </xsl:text><xsl:value-of select="$TworcyIlosc"/><xsl:text>)</xsl:text>
    			</div>
    			
    			<xsl:if test="$TworcySciezka and $TworcyWartosc and count($TworcySciezka/meta:Tworca) &gt; 0">
    				<div class="SekcjaTresc">
    					<xsl:for-each select="$TworcySciezka/meta:Tworca">
    						<xsl:if test="./meta:Podmiot[normalize-space()]">
    							<div class="TworcyTytul2">
    								<div class="KategoriaTytulNazwa">
    									<xsl:text>Twórca nr </xsl:text>
    									<xsl:value-of select="position()"/>
    									<xsl:text>: </xsl:text>
    								</div>
    								<div class="KategoriaTytulTresc">
    									<xsl:call-template name="AdresatNazwaTmpl">
    										<xsl:with-param name="AdresatSciezka" select="current()/meta:Podmiot"/>
    										<xsl:with-param name="AdresatTyp" select="$TworcaTyp"/>
    									</xsl:call-template>
    								</div>
    								<div class="KategoriaWyczysc"/>
    							</div>
    							
    							<div class="KategoriaTresc">
    								<xsl:call-template name="TworcaTmpl">
    									<xsl:with-param name="TworcaSciezka" select="current()"/>
    									<xsl:with-param name="AdresatTyp" select="$TworcaTyp"/>
    								</xsl:call-template>
    							</div>
    						</xsl:if>
    					</xsl:for-each>
    				</div>
    			</xsl:if>
    				
    		</div>
    		
    	</xsl:template>
    	
    	<xsl:template name="TworcaTmpl">
    		<xsl:param name="TworcaSciezka"/>
    		<xsl:param name="AdresatTyp"/>
    		
    		<div class="Kategoria1">
    			<div class="Kategoria1Nazwa"><xsl:text>Funkcja:</xsl:text></div>
    			<div class="Kategoria1Tresc">
    				<xsl:call-template name="StworzylTmpl">
    					<xsl:with-param name="StworzylSciezka" select="$TworcaSciezka/meta:Funkcja"/>
    				</xsl:call-template>
    			</div>
    			<div class="KategoriaWyczysc"/>
    		</div>
    		
    		<xsl:call-template name="AdresatTmpl">
    			<xsl:with-param name="AdresatSciezka" select="$TworcaSciezka/meta:Podmiot"/>
    			<xsl:with-param name="AdresatTyp" select="$AdresatTyp"/>
    		</xsl:call-template>
    		
    	</xsl:template>
    	
    	<xsl:template name="StworzylTmpl">
    		<xsl:param name="StworzylSciezka"/>
    		
    		<xsl:if test="$StworzylSciezka = 'stworzyl'"><xsl:text>Stworzył</xsl:text></xsl:if>
    		<xsl:if test="$StworzylSciezka = 'modyfikowal'"><xsl:text>Modyfikował</xsl:text></xsl:if>
    		<xsl:if test="$StworzylSciezka = 'zatwierdzil'"><xsl:text>Zatwierdził</xsl:text></xsl:if>
    		
    	</xsl:template>
    	
    	<xsl:template name="NadawcyTmpl">
    		<xsl:param name="NadawcySciezka" select="str:DaneDokumentu/str:Nadawcy"/>
    		<xsl:param name="AdresatTyp" select="wnio:TrescDokumentu/wnio:TypNadawcy"/>
    		<xsl:param name="NadawcyIlosc" select="count($NadawcySciezka/meta:Podmiot[normalize-space()])"/>
    		<xsl:param name="NadawcyWartosc" select="$NadawcySciezka/meta:Podmiot/descendant::*/text()"/>
    		
    		<div class="NadawcyTytul1">
    			<strong><xsl:text>Nadawcy dokumentu</xsl:text></strong>
    			<xsl:text> (ilość: </xsl:text><xsl:value-of select="$NadawcyIlosc"/><xsl:text>)</xsl:text>
    		</div>
    		
    		<xsl:choose>
    			<xsl:when test="$NadawcySciezka and $NadawcyWartosc and $NadawcyIlosc &gt; 0">
    				<xsl:for-each select="str:DaneDokumentu/str:Nadawcy/meta:Podmiot">
    					<xsl:if test="self::node()[normalize-space()]">
    					
    						<div class="NadawcyTytul2">
    							<div class="KategoriaTytulNazwa">
    								<xsl:text>Nadawca nr </xsl:text>
    								<xsl:value-of select="position()"/>
    								<xsl:text>: </xsl:text>
    							</div>
    							
    							<div class="KategoriaTytulTresc">
    								<xsl:call-template name="AdresatNazwaTmpl">
    									<xsl:with-param name="AdresatSciezka" select="current()"/>
    									<xsl:with-param name="AdresatTyp" select="$AdresatTyp"/>
    								</xsl:call-template>
    							</div>
    							<div class="KategoriaWyczysc"/>
    						</div>
    						
    						<xsl:call-template name="AdresatTmpl">
    							<xsl:with-param name="AdresatSciezka" select="current()"/>
    							<xsl:with-param name="AdresatTyp" select="$AdresatTyp"/>
    						</xsl:call-template>
    					
    					</xsl:if>
    				</xsl:for-each>
    			</xsl:when>
    			<xsl:otherwise>
    				<div class="Blad">
    					<xsl:text>UWAGA! Brak informacji o nadawcach dokumentu!</xsl:text>
    				</div>
    			</xsl:otherwise>
    		</xsl:choose>
    
    	</xsl:template>
    	
    	<xsl:template name="ZalacznikiTmpl">
    		<xsl:param name="ZalacznikiSciezka" select="wnio:TrescDokumentu/str:Zalaczniki"/>
    		<xsl:param name="ZalacznikiIlosc" select="count($ZalacznikiSciezka/str:Zalacznik/str:DaneZalacznika[normalize-space()])"/>
    		
    		<div class="ZalacznikiObszar">
    			<div class="ZalacznikiTytul1">
    				<strong><xsl:text>Załączone pliki</xsl:text></strong>
    				<xsl:text> (ilość: </xsl:text>
    				<xsl:value-of select="$ZalacznikiIlosc"/>
    				<xsl:text>)</xsl:text>
    			</div>
    			<xsl:if test="$ZalacznikiSciezka and $ZalacznikiIlosc &gt; 0">
    				<table class="ZalacznikiTabela1" style="width: 100%;" cellspacing="0" cellpadding="5" border="0">
    					<tbody>
    						<tr>
    							<th><xsl:text>Nazwa pliku</xsl:text></th>
    							<th><xsl:text>Opis pliku</xsl:text></th>
    							<th><xsl:text>Format pliku</xsl:text></th>
    							<th><xsl:text>Kodowanie</xsl:text></th>
    						</tr>
    						
    						<xsl:for-each select="$ZalacznikiSciezka/str:Zalacznik">
    							<xsl:if test="./str:DaneZalacznika != ''">
    								<tr>
    									<td><xsl:value-of select="./@nazwaPliku"/></td>
    									<td><xsl:value-of select="./str:OpisZalacznika"/></td>
    									<td class="srodek"><xsl:value-of select="./@format"/></td>
    									<td class="srodek"><xsl:value-of select="./@kodowanie"/></td>
    								</tr>
    							</xsl:if>
    						</xsl:for-each>
    						
    					</tbody>
    				</table>
    			</xsl:if>
    		</div>
    		
    	</xsl:template>
    	
    	
    	<xsl:template name="nl2br">
    		<xsl:param name="string"/>
    		<xsl:value-of select="normalize-space(substring-before($string,'&#xA;'))"/>
    		<xsl:choose>
    			<xsl:when test="contains($string,'&#xA;')">
    				<br/>
    				<xsl:call-template name="nl2br">
    					<xsl:with-param name="string" select="substring-after($string,'&#xA;')"/>
    				</xsl:call-template>
    			</xsl:when>
    			<xsl:otherwise>
    				<xsl:value-of select="$string"/>
    			</xsl:otherwise>
    		</xsl:choose>
    	</xsl:template>
    	
    	
    	<xsl:template name="adresStronyInternetowej">
    		<xsl:param name="adresStrony"/>
    		<xsl:param name="adresTarget"/>
    		
    		<xsl:choose>
    			<xsl:when test="starts-with($adresStrony, 'http')">
    				<a href="{$adresStrony}" target="{$adresTarget}"><xsl:value-of select="$adresStrony"/></a>
    			</xsl:when>
    			<xsl:otherwise>
    				<a href="http://{$adresStrony}" target="{$adresTarget}"><xsl:value-of select="$adresStrony"/></a>
    			</xsl:otherwise>
    		</xsl:choose>
    		
    	</xsl:template>
    	
    	
    	<xsl:template name="adresPocztyElektronicznej">
    		<xsl:param name="adresPoczty"/>
    		
    		<xsl:choose>
    			<xsl:when test="string-length($adresPoczty) &gt; 0">
    			
    				<xsl:choose>
    					<xsl:when test="contains($adresPoczty, '@') and contains($adresPoczty, '.')">
    							<a href="mailto:{$adresPoczty}"><xsl:value-of select="$adresPoczty"/></a>
    						</xsl:when>
    						<xsl:otherwise>
    							<xsl:value-of select="$adresPoczty"/>
    						</xsl:otherwise>
    				</xsl:choose>
    		
    			</xsl:when>
    			<xsl:otherwise>
    				<xsl:text> - </xsl:text>
    			</xsl:otherwise>
    		</xsl:choose>
    		
    	</xsl:template>
    	
    	
    	<xsl:template name="PelnaDataTmpl">
    		<xsl:param name="PelnaDataSciezka"/>
    		
    		<xsl:if test="string-length($PelnaDataSciezka) &gt; 0">
    			<xsl:choose>
    				<xsl:when test="contains($PelnaDataSciezka, 'T') or string-length($PelnaDataSciezka) &gt; 10">
    					<xsl:value-of select="number(substring-before(substring-after(substring-after($PelnaDataSciezka,'-'),'-'), 'T'))"/>
    				</xsl:when>
    				<xsl:otherwise>
    					<xsl:value-of select="number(substring-after(substring-after($PelnaDataSciezka,'-'),'-'))"/>
    				</xsl:otherwise>
    			</xsl:choose>
    			
    			<xsl:variable name="numerMiesiaca" select="number(substring-before(substring-after($PelnaDataSciezka,'-'),'-'))"/>
    			<xsl:text> </xsl:text>
    			<xsl:if test="$numerMiesiaca=1"><xsl:text>stycznia</xsl:text></xsl:if>
    			<xsl:if test="$numerMiesiaca=2"><xsl:text>lutego</xsl:text></xsl:if>
    			<xsl:if test="$numerMiesiaca=3"><xsl:text>marca</xsl:text></xsl:if>
    			<xsl:if test="$numerMiesiaca=4"><xsl:text>kwietnia</xsl:text></xsl:if>
    			<xsl:if test="$numerMiesiaca=5"><xsl:text>maja</xsl:text></xsl:if>
    			<xsl:if test="$numerMiesiaca=6"><xsl:text>czerwca</xsl:text></xsl:if>
    			<xsl:if test="$numerMiesiaca=7"><xsl:text>lipca</xsl:text></xsl:if>
    			<xsl:if test="$numerMiesiaca=8"><xsl:text>sierpnia</xsl:text></xsl:if>
    			<xsl:if test="$numerMiesiaca=9"><xsl:text>września</xsl:text></xsl:if>
    			<xsl:if test="$numerMiesiaca=10"><xsl:text>października</xsl:text></xsl:if>
    			<xsl:if test="$numerMiesiaca=11"><xsl:text>listopada</xsl:text></xsl:if>
    			<xsl:if test="$numerMiesiaca=12"><xsl:text>grudnia</xsl:text></xsl:if>
    			<xsl:text> </xsl:text>
    			<xsl:value-of select="substring-before($PelnaDataSciezka,'-')"/>
    			<xsl:text> r.</xsl:text>
    		</xsl:if>
    	</xsl:template>
    
    </xsl:stylesheet>