+
+<!-- FUNZIONI AUSILIARIE -->
+
+<xsl:template name="name_of_uri_bis">
+ <xsl:param name="uri" select=""""/>
+ <xsl:variable name="suffix" select="substring-after($uri, "/")"/>
+ <xsl:choose>
+ <xsl:when test="$suffix = """>
+ <xsl:value-of select="substring-before($uri,".var")"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="name_of_uri_bis">
+ <xsl:with-param name="uri" select="$suffix"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="var_name">
+ <xsl:param name="uri"/>
+ <xsl:param name="string" select=""""/>
+ <xsl:variable name="prefix" select="substring-before($uri, " ")"/>
+ <xsl:variable name="suffix" select="substring-after($uri, " ")"/>
+ <xsl:variable name="prefix">
+ <xsl:call-template name="name_of_uri_bis">
+ <xsl:with-param name="uri" select="$prefix"/>
+ </xsl:call-template>
+ </xsl:variable>
+ <!--xsl:if test="string($prefix) != " " "-->
+ <xsl:variable name="string" select="concat($string,', ', $prefix)"/>
+ <!--/xsl:if-->
+ <xsl:choose>
+ <xsl:when test="$suffix = """>
+ <xsl:value-of select="substring-after(concat($string, ' '),',')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="var_name">
+ <xsl:with-param name="uri" select="$suffix"/>
+ <xsl:with-param name="string" select="$string"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+