cerco di spiegare quale è il mio problema
ti spiego
1. ho questo input (<blocco>p,w,e,h,r</blocco>)
----------------------------------------------
questa è l'xslt che ho fatto e funziona.
<xsl:template match="/prova">
<ret>
<da>
<out>
<blocco>
<xsl:call-template name="tra">
<xsl:with-param name="tx" select="P/sm:ne"/>
</xsl:call-template>
</blocco>
</out>
</da>
</ret>
</xsl:template>
<xsl:template name="tra">
<xslaram name="tx" select="''"/>
<xsl:if test="string-length($tx) > 0">
<xsl:variable name="field" select="substring-before($tx, ',')"/>
<xsl:choose>
<xsl:when test="string-length($field) > 0">
<xsl:element name="{$field}"/>
</xsl:when>
<xsltherwise>
<xsl:element name="{$tx}"/>
</xsltherwise>
</xsl:choose>
<xsl:call-template name="tra">
<xsl:with-param name="tx" select="substring-after($tx, ',')"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
------------------------------
questo l'output che adesso mi restitusice la mappa
<blocco>
<w/>
<e/>
<h/>
<r/>
</blocco>
ma a me servirebbe che l'output dovrebbe essere cosi:
<blocco>
</p>
<w></w>
<e></e>
<h></h>
<r></r>
</blocco>
spero di essere stato chiario ..e grazie in anticipo

aram name="tx" select="''"/>
therwise>
Rispondi quotando
