cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "emilio leiva serrano" <emle...@hotmail.com>
Subject Re: use of variables on XSL
Date Tue, 18 Jan 2005 12:05:09 GMT
Hi again!!

I'm trying to make a table of notes (idnota and nota) with request values

First xsl page:

........

<notas>
    <xsl:for-each select="notas/sql:rowset/sql:row/sql:id_nota">
      <idnota>
	<xsl:value-of select="."/>
      </idnota>
    </xsl:for-each>

    <xsl:for-each select="notas/sql:rowset/sql:row/sql:nota">
      <nota>
         <xsl:value-of select="."/>
      </nota>
     </xsl:for-each>
</notas>

...........

Second xsl page:

<xsl:variable name="cont">1</xsl:variable>
<xsl:variable name="valor"/>

  <xsl:template match="/">
	<html>
		<body>
			<xsl:apply-templates />
		</body>
	</html>
  </xsl:template>

  .............

<xsl:template match="notas">
<form action="editnotas" method="get">
<table border="1">
    <xsl:for-each select="idnota">
     <xsl:variable name="valor"><xsl:value-of select="."/></xsl:variable>
     <tr>
      <td>
         <select name="opcion{$cont}">
	<option value="">Opciones</option>
                <option value="M-{$valor}">Modificar</option>
	<option value="S-{$valor}">Suprimir</option>
         </select>
      </td>
      <td>
            <xsl:value-of select="../nota[$cont]"/><xsl:value-of 
select="$cont"/>
      </td>
   </tr>
   <xsl:variable name="cont"><xsl:value-of select="$cont+1"/></xsl:variable>
   </xsl:for-each>

</table>
</form>
  </xsl:template>

.......


If I can't use <xsl:variable.... for the counter, What can I do???

(BTW, this "no me friegues" sounds like Nicaraguan spanish! is n't? ;-) )

   Yes, this "no me friegues" sounds like Nicaraguan spanish!!!  Your friend 
Thorsten told me about it, and we allways are saying it!!



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message