]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/style/link.xsl
Now MQueryGenerator generates the query and MQueryLevels produces the restrictions...
[helm.git] / helm / style / link.xsl
index ba22dea1225fe75d7c735a0e34980645e013abec..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>
@@ -48,11 +50,18 @@ xlink:href) -->
 <xsl:template match = "*" mode="semantics">
   <xsl:copy>
    <xsl:copy-of select="@*"/>
-   <xsl:if test="@m:xref">
-    <xsl:variable name="cnode" select="key('id',@m:xref)"/>
+   <xsl:if test="@xref">
+    <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 -->
@@ -116,4 +125,3 @@ xlink:href) -->
 </xsl:template>
 
 </xsl:stylesheet> 
-