<!-- CSC: PROBLEMA: URI CHE NON CONTENGONO / ED INIZIANO CON cic: -->
<xsl:template name="name_of_uri">
<xsl:param name="uri" select=""""/>
+ <xsl:param name="extension" select="'.con'"/>
<xsl:variable name="suffix" select="substring-after($uri, "/")"/>
<xsl:choose>
<xsl:when test="$suffix = """>
<!-- CSC: PROBLEMA: .con PUO' APPARIRE ALL'INTERNO DELLE URI ===>
SCRIVERE UNA FUNZIONE RICORSIVA CHE RISOLVA -->
- <xsl:value-of select="substring-before($uri,".con")"/>
+ <xsl:value-of select="substring-before($uri,$extension)"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="name_of_uri">
<xsl:with-param name="uri" select="$suffix"/>
+ <xsl:with-param name="extension" select="$extension"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:choose>
</xsl:template>
+<!-- path gives the path of a uri, up to the final name -->
+<xsl:template name="path">
+ <xsl:param name="uri" select=""""/>
+ <xsl:param name="current_path" select=""""/>
+ <xsl:choose>
+ <xsl:when test="(substring-after($uri,"/") != "")">
+ <xsl:call-template name="path">
+ <xsl:with-param
+ name="uri" select="substring-after($uri,"/")"/>
+ <xsl:with-param
+ name="current_path" select="concat($current_path,substring-before($uri,"/"),'/')"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$current_path"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
<xsl:template name="blank_counting">
<xsl:param name="string" select=""""/>
<xsl:param name="counter" select="0"/>