<?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" version="1.0" encoding="ISO-8859-2" indent="yes"/>
<xsl:strip-space elements="cikk-szám év cikk-azonosító témakör témakörök"/>

<xsl:template match="/">
	<html>
		<head>			
		  	<title><xsl:value-of select="/IT3-körkép/körkép-szám"/></title>
		</head>
		<body>
			<xsl:apply-templates/>
		</body>
	</html>
</xsl:template>

<xsl:template match="körkép-szám"/>

<!-- Vezércikk elemek  -->

<xsl:template match="vezércikk">
	<table width="700" cellpadding="5">
		<xsl:copy>
			<xsl:apply-templates/>
		</xsl:copy>
	</table>
	<br style="page-break-after:always;"/>
</xsl:template>

<xsl:template match="vezércikk-cím">
	<tr align="justify"><font size="5"><xsl:apply-templates/></font><br/><br/></tr>
</xsl:template>

<xsl:template match="vezércikk-alcím">
	<br/><br/><tr align="justify"><font size="4"><xsl:apply-templates/></font><br/></tr>
</xsl:template>

<xsl:template match="vezércikk-bekezdés">
	<tr align="justify"><br/><font size="3"><xsl:apply-templates/></font></tr>
</xsl:template>

<xsl:template match="pont">
	<p align="justify"><font size="2">&#160;&#160;&#160;&#160;-&#160;<xsl:apply-templates/></font></p>
</xsl:template>

<xsl:template match="vezércikk-kép">
  		<xsl:choose>
	  		<xsl:when test="@méret = 'kicsi'">
				<img src="Kepek/{.}" width="100" align="right" hspace="30" vspace="20"></img>
  			</xsl:when>
  			<xsl:when test="@méret = 'nagy'">
				<img src="Kepek/{.}" width="300" align="right" hspace="30" vspace="20"></img>
  			</xsl:when>
	  		<xsl:otherwise>
				<img src="Kepek/{.}" height="150" align="right" hspace="30" vspace="20"></img>
	  		</xsl:otherwise>
	  	</xsl:choose>
</xsl:template>

<xsl:template match="vezércikk-link">
	 <a href="{./teljes-link}"><xsl:value-of select="./rövid-link"/></a>
</xsl:template>

<!-- Elválasztólap-->

<xsl:template match="elválasztólap">
	<table width="700" cellpadding="5">
		<xsl:copy>
			<xsl:apply-templates/>
		</xsl:copy>
	</table>
	<br style="page-break-after:always;"/>
</xsl:template>

<xsl:template match="elválasztókép">
	<tr align="right"><img src="Kepek/{.}" width="400"></img></tr>
</xsl:template>

<xsl:template match="elválasztókép-szöveg">
	<tr align="right"><font size="5"><xsl:apply-templates/></font></tr>
</xsl:template>

<!-- Hírgyűjtemény elemek -->

<xsl:template match="körkép-cikk">	
	<table width="700" cellpadding="5">
		<tr>
			<td width="300" align="left">
				<xsl:for-each select="./témakörök/témakör">
					<img height="35">
					
					<xsl:if test=".='alapok' "><xsl:attribute name="src">http://www.carneades.hu/it3projekt/Korkepek/Ikonok/1.jpg</xsl:attribute></xsl:if>

					<xsl:if test=".='hírközlés' "><xsl:attribute name="src">http://www.carneades.hu/it3projekt/Korkepek/Ikonok/2.jpg</xsl:attribute></xsl:if>

					<xsl:if test=".='végberendezések' "><xsl:attribute name="src">http://www.carneades.hu/it3projekt/Korkepek/Ikonok/3.jpg</xsl:attribute></xsl:if>

					<xsl:if test=".='rendszertechnika' "><xsl:attribute name="src">http://www.carneades.hu/it3projekt/Korkepek/Ikonok/4.jpg</xsl:attribute></xsl:if>

					<xsl:if test=".='alkalmazási eszközök' "><xsl:attribute name="src">http://www.carneades.hu/it3projekt/Korkepek/Ikonok/5.jpg</xsl:attribute></xsl:if>

					<xsl:if test=".='tartalom-kezelés' "><xsl:attribute name="src">http://www.carneades.hu/it3projekt/Korkepek/Ikonok/6.jpg</xsl:attribute></xsl:if>

					<xsl:if test=".='fejlesztés és működtetés' "><xsl:attribute name="src">http://www.carneades.hu/it3projekt/Korkepek/Ikonok/7.jpg</xsl:attribute></xsl:if>

					<xsl:if test=".='üzlet' "><xsl:attribute name="src">http://www.carneades.hu/it3projekt/Korkepek/Ikonok/8.jpg</xsl:attribute></xsl:if>

					<xsl:if test=".='közszolgálat' "><xsl:attribute name="src">http://www.carneades.hu/it3projekt/Korkepek/Ikonok/9.jpg</xsl:attribute></xsl:if>

					<xsl:if test=".='magánfelhasználás' "><xsl:attribute name="src">http://www.carneades.hu/it3projekt/Korkepek/Ikonok/10.jpg</xsl:attribute></xsl:if>
					
					<xsl:if test=".='biztonság' "><xsl:attribute name="src">http://www.carneades.hu/it3projekt/Korkepek/Ikonok/11.jpg</xsl:attribute></xsl:if>
					
					<xsl:if test=".='szabályozás' "><xsl:attribute name="src">http://www.carneades.hu/it3projekt/Korkepek/Ikonok/12.jpg</xsl:attribute></xsl:if>
					
					</img>
				</xsl:for-each>
			</td>
			<td width="400" align="left">
				<xsl:copy>
					<xsl:apply-templates select="./cikk-cím"/>
				</xsl:copy>
			</td>
		</tr>
		<tr>
			<td align="right" valign="bottom">
				<xsl:copy>
					<xsl:apply-templates select="./kép"/>
				</xsl:copy>
			</td>
			<td align="justify">
				<xsl:copy>
					<xsl:apply-templates select="./komment"/>
				</xsl:copy>
			</td>
		</tr>
		<tr>
			<td colspan="2" align="justify">
				<xsl:copy>
					<xsl:apply-templates select="./cikk-szöveg"/>
				</xsl:copy>
			</td>
		</tr>
		<tr>
			<td align="left">
				<xsl:copy>
					<xsl:apply-templates select="./cikk-azonosító"/>
				</xsl:copy>			
			</td>
			<td align="right">
				<xsl:copy>
					<xsl:apply-templates select="./cikk-link"/>
				</xsl:copy>
			</td>
		</tr>	
	</table>
	<xsl:choose>
		<xsl:when test="position() mod 2 = 0">
			<br style="page-break-after:always;"> </br>
		</xsl:when>
		<xsl:otherwise>
        		        	<br></br>
			<br></br>
                	</xsl:otherwise>
                </xsl:choose>                
</xsl:template>

<xsl:template match="hírgyűjtemény">
		<xsl:copy>
			<xsl:apply-templates select="körkép-cikk">
				<xsl:sort select=".//cikk-szám" data-type="number" />
			</xsl:apply-templates>
		</xsl:copy>
</xsl:template>

<xsl:template match="kép">
  		<xsl:choose>
	  		<xsl:when test="@méret = 'nagy'">
		  		<img src="Kepek/{.}" width="250"></img>
  			</xsl:when>  
	  		<xsl:otherwise>
				<img src="Kepek/{.}" height="130"></img>
	  		</xsl:otherwise>
	  	</xsl:choose>
</xsl:template>

<xsl:template match="témakörök"/>

<xsl:template match="témakör"/>

<xsl:template match="cikk-cím">
	<font size="4"><xsl:apply-templates/></font>
</xsl:template>

<xsl:template match="komment">
	<font size="3"><xsl:apply-templates/></font>
</xsl:template>

<xsl:template match="cikk-szöveg">
	<font size="2"><xsl:apply-templates/></font>
</xsl:template>

<xsl:template match="cikk-link">
	 <a href="{./teljes-link}"> 
                                <xsl:value-of select="./rövid-link"/>
                </a><br/>
</xsl:template>

<xsl:template match="cikk-azonosító">
	(<xsl:value-of  select="./cikk-szám"/>/<xsl:value-of  select="./év"/>)
</xsl:template>


</xsl:stylesheet>