<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
&lt;html>
&lt;title> USUARIO: SOFTBOT: &lt;/title>
&lt;body>
&lt;form>
<xsl:for-each select="(descendant::*/atributos)">
<xsl:variable name="hijo">
<xsl:value-of select="count(child::*)"/>
</xsl:variable>
<xsl:variable name="nieto">
<xsl:value-of select="count(child::*/*)"/>
</xsl:variable>
<xsl:variable name="nombre">
<xsl:value-of select="name(*)"/>
</xsl:variable>
<xsl:if test="$nieto>0">
&lt;fieldset>
&lt;legend> <xsl:value-of select="name(*)"/> &lt;/legend>
</xsl:if>
</xsl:for-each>
&lt;/form>
&lt;/body>
&lt;/html>
</xsl:template>
</xsl:stylesheet>