Tuesday, March 07, 2006

Evitar una dependencia en maven


servletapi
servlet-api
2.4
provided

Friday, February 24, 2006

Menus dinamicos cn css

http://platea.pntic.mec.es/~jmas/manual/html/hybrid/hybrid-4.html

Monday, January 30, 2006

Apache2 + php4 Windows

  • Instalacion de Apache 2
    1. Descargar el fichero: apache_2.0.55-win32-x86-no_ssl.msi
    2. Ejecutar e instalar como servicio
      C:\Archivos de programa\Apache Group\Apache2\bin\apache -k install
  • Instalacion de PHP4
    1. Descargar php-4.4.2-Win32.zip
      y descomprimir en D:\php4
    2. Copiar D:\php4\sapi\php4apache2.dll a D:\php4
    3. Copiar D:\php4\php4ts.dll a C:\Archivos de programa\Apache Group\Apache2\bin
    4. Agregar a httpd.conf
      LoadModule php4_module "D:/php/php4apache2.dll"
      AddType application/x-httpd-php .php
    5. Copiar D:\php4\php.ini a C:\Windows






Friday, January 13, 2006

Xsl Recursion

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/listado">
<xsl:call-template name="habitante">
<xsl:with-param name="municipio" select="/listado/datos_ayto/nombre"/>
<xsl:with-param name="habitante" select="/listado/habitantes/habitante"/>
</xsl:call-template>
</xsl:template>

<xsl:template name="habitante">
<xsl:param name="i" select="1" />
<xsl:param name="habitante" />
<xsl:value-of select="$i"/>
<xsl:value-of select="$habitante"/>
<xsl:variable name="sgte" select="$habitante/following-sibling::*" />
<xsl:if test="$sgte">
<xsl:call-template name="habitante">
<xsl:with-param name="habitante" select="$sgte"/>
<xsl:with-param name="i" select="$i + 1 "/>
</xsl:call-template>
</xsl:if>

</xsl:template>
</xsl:stylesheet>

Wednesday, January 11, 2006

XSL SUMA recursiva

Fichero XML


<?xml version="1.0"?>
<booklist>
<book>
<title>Angela's Ashes</title>
<author>Frank McCourt</author>
<publisher>HarperCollins</publisher>
<isbn>0 00 649840 X</isbn>
<price>6.99</price>
<sales>235</sales>
</book>
<book>
<title>Sword of Honour</title>
<author>Evelyn Waugh</author>
<publisher>Penguin Books</publisher>
<isbn>0 14 018967 X</isbn>
<price>12.99</price>
<sales>12</sales>
</book> </booklist>


Fichero XSL



<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>

<xsl:template match="/">
<xsl:call-template name="sumSales1">
<xsl:with-param name="pNodes" select="/*/book"/>
</xsl:call-template>
</xsl:template>

<xsl:template name="sumSales1">
<xsl:param name="pNodes" select="/.."/>
<xsl:param name="result" select="0"/>
<xsl:choose>
<xsl:when test="$pNodes">
<xsl:call-template name="sumSales1">
<xsl:with-param name="pNodes" select="$pNodes[position()!=1]"/>
<xsl:with-param name="result" select="$result + $pNodes[1]/sales*$pNodes[1]/price"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$result"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>