]> matita.cs.unibo.it Git - helm.git/commitdiff
URLs_or_URIs param added to choose if the xlink:href should be an URL (i.e.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Mon, 18 Nov 2002 09:54:00 +0000 (09:54 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Mon, 18 Nov 2002 09:54:00 +0000 (09:54 +0000)
a request to UWOBO to ...) or simply an URI (i.e. cic:/...).

helm/style/link.xsl

index e3568a18ffb386ca03acc26471127570a4115197..e6d639a3bcf151aa92e47031597e26b5902232a3 100644 (file)
@@ -39,6 +39,8 @@
 
 <xsl:key name="id" use="@id" match="m:*"/>
 
+<xsl:param name="URLs_or_URIs" select="'URLs'"/>
+
 <xsl:template match = "m:semantics">
    <xsl:apply-templates select="*[1]" mode="semantics"/>
 </xsl:template>
@@ -52,7 +54,14 @@ xlink:href) -->
     <xsl:variable name="cnode" select="key('id',@xref)"/>
     <xsl:if test="$cnode/@definitionURL"> 
      <xsl:attribute name="xlink:href">
-      <xsl:call-template name="makeURL"><xsl:with-param name="uri" select="$cnode/@definitionURL"/></xsl:call-template>
+      <xsl:choose>
+       <xsl:when test="$URLs_or_URIs = 'URLs'">
+        <xsl:call-template name="makeURL"><xsl:with-param name="uri" select="$cnode/@definitionURL"/></xsl:call-template>
+       </xsl:when>
+       <xsl:otherwise>
+        <xsl:value-of select="$cnode/@definitionURL"/> 
+       </xsl:otherwise>
+      </xsl:choose>
      </xsl:attribute>
     <!-- xlink:show='other' requires the exact modality to be -->
     <!-- specified in non-xlink markup. The point is that the -->