]> matita.cs.unibo.it Git - helm.git/commitdiff
Bug related to #xpointer(1/n/m) constructor URI fixed.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 16 Oct 2001 16:53:07 +0000 (16:53 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 16 Oct 2001 16:53:07 +0000 (16:53 +0000)
helm/style/mk_meta_graph.xsl

index 44d5a9070a9a4ed1889ea4aad34c48b384b26a8c..243aedc44d788658343819e27c38bce2c2f8a43f 100644 (file)
@@ -40,7 +40,7 @@
 <xsl:param name="getterURL" select="''"/>
 <xsl:param name="uri_set_queueURL" select="''"/>
 <xsl:param name="uri_set_size" select="30"/>
-<xsl:variable name="RDF_base_URL_of_CIC_URI" select="concat($getterURL,'getxml?uri=helm:rdf:www.cs.unibo.it/helm/rdf/rdfprova//')"/>
+<xsl:variable name="base_URL_of_URI" select="concat($getterURL,'getxml?uri=')"/>
 
 <!-- CSC: next functions because I don't remember the name of the    -->
 <!-- CSC: subst function of xslt and I don't have the specs with me -->
  </xsl:choose>
 </xsl:template>
 
+<xsl:template name="RDFURI_of_CICURI">
+ <xsl:param name="uri" select="''"/>
+ <xsl:variable name="base_RDF_URI" select="'helm:rdf:www.cs.unibo.it/helm/rdf/rdfprova//'"/>
+ <xsl:variable name="before" select="substring-before($uri,'#xpointer(1/')"/>
+ <xsl:value-of select="$base_RDF_URI"/>
+ <xsl:choose>
+  <xsl:when test="$before=''">
+   <xsl:value-of select="$uri"/>
+  </xsl:when>
+  <xsl:otherwise>
+   <xsl:value-of select="concat($before,',')"/>
+   <xsl:variable name="after" select="substring-after($uri,'#xpointer(1/')"/>
+   <xsl:value-of select="translate(substring-before($after,')'),'/',',')"/>
+  </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
 <xsl:template match="/">
  <!--
  <xsl:text>strict digraph L0 { size = "83,83"; concentrate=true; node [style=filled, shape = box];&CSCbr;</xsl:text>
 <xsl:template mode="loop" match="empty"/>
 
 <xsl:template mode="loop" match="uri|marked_uri">
- <xsl:variable name="document" select="document(concat($RDF_base_URL_of_CIC_URI,@value))"/>
+ <xsl:variable name="rdfuri">
+  <xsl:call-template name="RDFURI_of_CICURI">
+   <xsl:with-param name="uri" select="@value"/>
+  </xsl:call-template>
+ </xsl:variable>
+ <xsl:variable name="document" select="document(concat($base_URL_of_URI,$rdfuri))"/>
  <xsl:choose>
   <xsl:when test="$document/*">
    <xsl:apply-templates mode="first_time" select="$document/*">