]> matita.cs.unibo.it Git - helm.git/commitdiff
error: "iso8859-1" ==> "'iso8859-1'"
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Mon, 19 Mar 2001 14:57:42 +0000 (14:57 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Mon, 19 Mar 2001 14:57:42 +0000 (14:57 +0000)
helm/style/links_library.xsl

index d107c3dd3c67fc2f20a259a9a8bfeec0746293d0..5a6a1ba4fb1897c524ab488be93f4bf1d98a5723 100644 (file)
@@ -43,7 +43,7 @@ step for expanding objects -->
 <xsl:param name="annotations" select="'no'"/>
 <xsl:param name="media-type" select="'text/html'"/>
 <xsl:param name="doctype-public" select="'-//W3C//DTD XHTML 1.0 Transitional//EN'"/>
-<xsl:param name="encoding" select="iso-8859-1"/>
+<xsl:param name="encoding" select="'iso-8859-1'"/>
 
 <xsl:variable name="absPath"><xsl:value-of select="$getterURL"/>getxml?uri=</xsl:variable>
 
@@ -56,16 +56,22 @@ step for expanding objects -->
   <xsl:otherwise>
    <xsl:variable name="char" select="substring($s,1,1)"/>
    <xsl:choose>
-    <xsl:when test="$char != ' '">
+    <xsl:when test="$char = ' '">
      <xsl:call-template name="quote">
       <xsl:with-param name="s" select="substring($s,2)"/>
-      <xsl:with-param name="news" select="concat($news,$char)"/>
+      <xsl:with-param name="news" select="concat($news,'%20')"/>
+     </xsl:call-template>
+    </xsl:when>
+    <xsl:when test="$char = '&amp;'">
+     <xsl:call-template name="quote">
+      <xsl:with-param name="s" select="substring($s,2)"/>
+      <xsl:with-param name="news" select="concat($news,'%26')"/>
      </xsl:call-template>
     </xsl:when>
     <xsl:otherwise>
      <xsl:call-template name="quote">
       <xsl:with-param name="s" select="substring($s,2)"/>
-      <xsl:with-param name="news" select="concat($news,'%20')"/>
+      <xsl:with-param name="news" select="concat($news,$char)"/>
      </xsl:call-template>
     </xsl:otherwise>
    </xsl:choose>
@@ -79,10 +85,22 @@ step for expanding objects -->
  </xsl:call-template>
 </xsl:variable>
 
+<xsl:variable name="escaped-processorURL">
+ <xsl:call-template name="quote">
+  <xsl:with-param name="s" select="$processorURL"/>
+ </xsl:call-template>
+</xsl:variable>
+
+<xsl:variable name="escaped-getterURL">
+ <xsl:call-template name="quote">
+  <xsl:with-param name="s" select="$getterURL"/>
+ </xsl:call-template>
+</xsl:variable>
+
 <!-- makeURL() maps URIs into URLs -->
 
 <xsl:variable name="header1"><xsl:value-of select="$processorURL"/>apply?keys=</xsl:variable>
-<xsl:variable name="header2">&#x26;param.naturalLanguage=<xsl:value-of select="$naturalLanguage"/>&#x26;param.annotations=<xsl:value-of select="$annotations"/>&#x26;prop.media-type=<xsl:value-of select="$media-type"/>&#x26;param.media-type=<xsl:value-of select="$media-type"/>&#x26;prop.doctype-public=<xsl:value-of select="$escaped-doctype-public"/>&#x26;param.doctype-public=<xsl:value-of select="$escaped-doctype-public"/>&#x26;prop.encoding=<xsl:value-of select="$encoding"/>&#x26;param.encoding=<xsl:value-of select="$encoding"/>&#x26;param.keys=<xsl:value-of select="$keys"/>&#x26;param.getterURL=<xsl:value-of select="$getterURL"/>&#x26;param.processorURL=<xsl:value-of select="$processorURL"/>&#x26;xmluri=<xsl:value-of select="$absPath"/></xsl:variable>
+<xsl:variable name="header2">&#x26;param.naturalLanguage=<xsl:value-of select="$naturalLanguage"/>&#x26;param.annotations=<xsl:value-of select="$annotations"/>&#x26;prop.media-type=<xsl:value-of select="$media-type"/>&#x26;param.media-type=<xsl:value-of select="$media-type"/>&#x26;prop.doctype-public=<xsl:value-of select="$escaped-doctype-public"/>&#x26;param.doctype-public=<xsl:value-of select="$escaped-doctype-public"/>&#x26;prop.encoding=<xsl:value-of select="$encoding"/>&#x26;param.encoding=<xsl:value-of select="$encoding"/>&#x26;param.keys=<xsl:value-of select="$keys"/>&#x26;param.getterURL=<xsl:value-of select="$escaped-getterURL"/>&#x26;param.processorURL=<xsl:value-of select="$escaped-processorURL"/>&#x26;xmluri=<xsl:value-of select="$absPath"/></xsl:variable>
 
 <xsl:template name="makeURL">
 <xsl:param name="uri" select="''"/>