<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/TR/REC-html40">
	<xsl:output method="html" encoding="ISO-8859-1" indent="yes"/>

	<!--
	Step 1: Define la clave primaria usada por el grupo. Lo interesante acerca del 
	elemento xsl:key  es que conociendo la "region", se puede facilmente encontrar todos los 
	productos que coinciden con cierta region.
	El elemento xsl:key (diferente de la funcion key()) se define de la siguiente manera:-->

	<xsl:key name="maquina" match="SOFTWARE" use="AREA_CATEGORIA"/>

	<!-- Template para el raiz -->

	<xsl:template match="/">
		<xsl:apply-templates/>
	</xsl:template>


	<!-- Template para LISTA_SOFTWARE -->

	<xsl:template match="LISTA_SOFTWARE">

		<html>
			<head>
				<title>Modificar Ficha Software - Centro Nacional de Cálculo Científico</title>
				<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
				<link rel="stylesheet" href="../../estilos.css" type="text/css"/>
			</head>
			<body class="contenido">
				<table width="610" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td class="tituloI" height="20" background="../../imagenes/titulo_azul_grande.gif"> 
										&#160;&#160;<a class="titulo1" href="../../administracion/index.php">Administración</a> 
										/ <a class="titulo1" href="../../administracion/index.php#recursos">Recursos</a> / <a class="titulo1" href="../../administracion/index.php#software">Software</a> 
				                  / Modificar</td>
					</tr>
					<tr>
						<td height="2" background="../../imagenes/linea_naranja_superior.gif"><spacer type="block" height="2"  /></td>
					</tr>
				</table>

				<!--Step 2: Lazo a través de cada tipo de hardware único (clave primaria) en el documento -->

				<xsl:for-each select="//SOFTWARE[generate-id(.)=generate-id(key('maquina',AREA_CATEGORIA))]">

					<!-- Ordena según la clave primaria por AREA_CATEGORIA en orden ascendente -->

					<xsl:sort select="AREA_CATEGORIA" order="ascending"/>   

					<!-- Despliega el Tipo de Hardware como el encabezado -->

					<br/>
					<table width="610" border="0" cellspacing="0" cellpadding="0">
					  <tr> 
						 <td class="tituloII" height="20"><xsl:value-of select="AREA_CATEGORIA"/></td>
					  </tr>
					  <tr> 
						 <td height="2" background="../../imagenes/linea_naranja_superior.gif"><spacer type="block" height="2"  /></td>
					  </tr>
					</table>
					
					<table border="0" cellspacing="0" cellpadding="3" width="610">
						<!-- Por cada valor en la colección (key collection) para el tipo de hardware dado, despliega los valores -->

						<xsl:for-each select="key('maquina',AREA_CATEGORIA)">

						<!--
						The expression "key('maquina',AREA_CATEGORIA)" will return all of the "SOFTWARE"
						elements from the key table whose "use=" expression defined in xsl:key
						(see xsl:key at top)  evaluated to the same value as the "AREA_CATEGORIA" child
						of the current element.  In the the example, we specified use="AREA_CATEGORIA".
						If region has a value of "Computadores de alto rendimiento", then all of the product elements from
						the key table that contain a child element with a value of "Computadores de alto rendimiento" will
						be returned.
						-->

						<!--Sort our secondary key, SOFTWARE nodes,  by NOMBRE_SOFTWARE -->
						<xsl:sort select="NOMBRE_SOFTWARE"/> 
						<tr> 
							<td valign="baseline" width="15" align="right"><img src="../../imagenes/cuadritonaranja.gif" width="5" height="5"/></td>
							<td width="595">
								<xsl:element name="A">
									<xsl:attribute name="HREF">fichasoftware/parser.php?URL=<xsl:value-of select="FICHA_SOFTWARE"/>&amp;XSL=formulario_fichasoftware.xsl</xsl:attribute>
									<xsl:value-of select="NOMBRE_SOFTWARE"/>
									<xsl:if test="ESTADO='No publicar'">
																	   <span class="error">&#160;&#160;(No publicada)</span>
									</xsl:if>
								</xsl:element>
							</td>
						</tr>	
						</xsl:for-each>					
					</table>
				</xsl:for-each>
				<br/>
				<!--  MEMBRETE DE LAS PAGINAS -->
				
					<table width='610' border='0' cellspacing='0' cellpadding='0'>
						<tr> 
							<td class='fuentemembrete' width='30%' align='center'>
								<table border='0' cellspacing='0' cellpadding='0' width='100%'>
								  <tr> 
									 <td class='fondoII' colspan='3' height='2'><spacer type='block' height='2'/></td>
								  </tr>
								  <tr> 
									 <td class='fondoII' width='2'><spacer type='block' width='2'/></td>
									 <td class='fuentemembrete' align='center'><br class='espacio' />
										| <a class='azul' href='http://www.cecalc.ula.ve/usuarios/'>Usuarios</a> 
										| <a class='azul' href='http://www.cecalc.ula.ve/informacion/'>Información</a> 
										| <a class='azul' href='http://www.cecalc.ula.ve/soporte/'>Soporte</a> 
										| <a class='azul' href='http://www.cecalc.ula.ve/recursos/'>Recursos</a> 
										| <a class='azul' href='http://www.cecalc.ula.ve/adiestramiento/'>Adiestramiento</a> 
										| <a class='azul' href='http://www.cecalc.ula.ve/investigacion/'>Investigación</a> 
										| <a class='azul' href='http://www.cecalc.ula.ve/afiliacion/'>Afiliación</a> 
										| <br />
										| <a class='azul' href='http://www.cecalc.ula.ve/listas/'>Lista de Discusión</a> 
										| <a class='azul' href='http://www.cecalc.ula.ve/documentacion/'>Documentación</a> 
										| <a class='azul' href='http://www.cecalc.ula.ve/servidores/'>Servidordes</a> 
										| <a class='azul' href='http://www.cecalc.ula.ve/estadisticas/'>Estadísticas</a> 
										| <a class='azul' href='http://www.cecalc.ula.ve/mapasitio/'>Mapa del Sitio</a> 
										| <br />
										<br class='espacio'/>
									 </td>
									 <td class='fondoII' width='2'><spacer type='block' width='2'/></td>
								  </tr>
									<tr> 
									 <td class='fondoII' colspan='3' height='2'><spacer type='block' height='2'/></td>
									</tr>
								</table>
								<br />
								<a class='azul' href='http://www.cecalc.ula.ve' target='_parent'>Centro Nacional de Cálculo Científico</a><br />
								<a class='azul' href='http://www.ula.ve' target='_blank'>Universidad de Los Andes </a><br />
								<a class='azul' href='http://www.cptm.ula.ve' target='_blank'>Corporación Parque Tecnológico de Mérida (CPTM)</a><br />
								Mérida - Venezuela <br/><br/>
								E-mail: <a class='azul' href='mailto:info@cecalc.ula.ve'>info@cecalc.ula.ve</a><br />
								Web: <a class='azul' href='http://www.cecalc.ula.ve' target='_parent'>http://www.cecalc.ula.ve</a>
							</td>
						</tr>
					</table>						 
				
				<!--  FIN MEMBRETE DE LAS PAGINAS -->
			</body>
		</html>
	</xsl:template>

</xsl:stylesheet>
