Subject: [xsl] problems with recurssion From: "rafael vazquez" <rc_vazquez@xxxxxxxxxxx> Date: Thu, 13 Dec 2001 18:08:30 +0100 |
... <xsl:template match="/LISTA"> <xsl:element name="INPUT"> <xsl:attribute name="TYPE">TEXT</xsl:attribute> <xsl:attribute name="NAME">nombreLista</xsl:attribute> <xsl:attribute name="VALUE"><xsl:value-of select="./ID/NOMBRE_LISTA"/> </xsl:attribute> </xsl:element> <xsl:element name="INPUT"> <xsl:attribute name="TYPE">TEXT</xsl:attribute> <xsl:attribute name="NAME">fechaCreacion</xsl:attribute> <xsl:attribute name="VALUE"><xsl:value-of select="./ID/FECHA_CREACION"/> </xsl:attribute> </xsl:element> <xsl:call-template name="articulos"> <xsl:with-param name="numArr" select="0"/> <xsl:with-param name="listaNodos" select="."/> </xsl:call-template> <INPUT TYPE="button" onClick="alert(hidArtDC0.value)"/> </xsl:template>
<xsl:template name="articulos"> <xsl:param name="numArr"/> <xsl:param name="listaNodos"/> <xsl:variable name="nodoAct" select="$listaNodos[1]"/> <xsl:variable name="restoNodos" select="$listaNodos[position()!=1]"/> <xsl:call-template name="crearArticulos"> <xsl:with-param name="numArr" select="$numArr"/> <xsl:with-param name="nodoAct" select="$nodoAct"/> </xsl:call-template> <xsl:if test="listaNodos"> <xsl:call-template name="articulos"> <xsl:with-param name="numArr" select="number($numArr)+1"/> <xsl:with-param name="restoNodos" select="$restoNodos"/> </xsl:call-template> </xsl:if> </xsl:template>
<?xml version = '1.0' encoding='iso-8859-1'?> <?xml-stylesheet href='../XSLT/FormatoListas.xsl' type='text/xsl'?> <LISTA> <ID> <NOMBRE_LISTA>sabado</NOMBRE_LISTA> <FECHA_CREACION>8/11/2001 10:17:16</FECHA_CREACION> </ID> <ARTICULO> <DESCRIPCION_CORTA>desco_corta</DESCRIPCION_CORTA> </ARTICULO> <ARTICULO> <DESCRIPCION_CORTA>desc2_corta</DESCRIPCION_CORTA> </ARTICULO> </LISTA>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Using xsl to test value o, Chris Bayes | Thread | Re: [xsl] problems with recurssion, Jeni Tennison |
RE: [xsl] Using xsl to test value o, Chris Bayes | Date | [xsl] outputting   to HTML, gabor farkas |
Month |