You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Alejandro Raiczyk <al...@technisys.com.ar> on 2000/09/07 20:52:51 UTC
xsl:copy
Hey people,
I have this XML file:
<?xml version="1.0"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="xsl/formulario.xsl" type="text/xsl"?>
<formulario accion="perfilInversorUI.xml">
<titulo colspan="2">Ingrese sus datos</titulo>
<fila>
<campo tipo="texto">Nombre</campo>
<campo tipo="html"><input type="text" name="nombre"
size="20"/></campo>
</fila>
</formulario>
and this template for matching the tag <campo>:
<xsl:template match="campo">
<xsl:choose>
<xsl:when test="@tipo='texto'">
<td height="25" bgcolor="#25AEAB"
colspan="{@colspan}">
<font face="Verdana" size="1">
<xsl:value-of select="."/>
</font>
</td>
</xsl:when>
<xsl:when test="@tipo='html'">
<td height="25" bgcolor="#25AEAB"
colspan="{@colspan}">
<xsl:copy>
<!-- HERE <xsl:apply-templates
select="."/> -->
</xsl:copy>
</td>
</xsl:when>
</xsl:choose>
</xsl:template>
when tipo='html' I must copy the child nodes of 'campo' (I need the exact
copy, including attributes) and I don't know how to do it (see where says
HERE).
Help!!
Thanks