<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<!-- log.xsl -->
<xsl:template match="/">
<xsl:apply-templates />
</xsl:template>

<xsl:template match="/log">
	<html>
		<head>
			<title>Informe d'excepcions 
				 <xsl:value-of select="generat" /> 
				 <xsl:value-of select="eina" /> 
			</title> 
		</head>
		<body>
			<h1 style="font-size:2em">Informe d'excepcions</h1>
			<p style="position:relative; right:5px;">
				<a href="logActivitat.xml" title="Informe d'activitat">Informe d'activitat</a>
			</p>
			<p style="margin-right:30%;text-align:right;font-size:0.8em;font-weight:normal">
				iniciat <xsl:value-of select="inici" /></p>
			<p><xsl:apply-templates match="record" /> </p>
			<p style="margin-right:30%;text-align:right;font-size:0.8em;font-weight:normal">
				finalitzat <xsl:value-of select="fi" /></p>
		</body>
	</html>
</xsl:template>

<xsl:template match="record">
	<strong><xsl:value-of select="level" /> : </strong>  
	<xsl:value-of select="message" />
	<ul style="list-style-type:none;">
	<xsl:apply-templates match="exception" /> 
	</ul>		
</xsl:template>

<xsl:template match="exception">
		<li>Missatge: <xsl:value-of select="message" /></li>
		<xsl:apply-templates match="frame" /> 
</xsl:template>


<xsl:template match="frame">
	<li>Produit per: <em><xsl:value-of select="class" /> (<xsl:value-of select="method" />)</em> linia <xsl:value-of select="line" /><br /></li>
</xsl:template>

<xsl:template match="web">
	<ul style="list-style-type:none;">
		<li><strong>Web processat: </strong><xsl:value-of select="nom" /></li>
		<ul style="list-style-type:none;">			
			 <xsl:apply-templates match="resultat" /> 
		</ul>
	</ul>		
</xsl:template>


<xsl:template match="local">
	<li><strong>a partir del web situat a: </strong><xsl:value-of select="directori_local" /></li>
	<li><strong>amb el fitxer inicial: </strong><xsl:value-of select="fitxer_inicial" /></li>
</xsl:template>

<xsl:template match="resultat">
	<li><strong>el resultat s'ha escrit a: </strong><xsl:value-of select="directori_resultat" /><br /></li>
</xsl:template>

<xsl:template match="xarxa">
	<li><strong>i ubicacio base a la xarxa: </strong><xsl:value-of select="url" />
			<xsl:apply-templates match="ip_alternativa" /> </li>
</xsl:template>

<xsl:template match="ip_alternativa">
	(<xsl:value-of select="ip_alternativa" />)	
</xsl:template>


</xsl:stylesheet>

