Delete URL link

Jan 30, 2010 at 10:31 PM

Hi, I'm using Harvard-Exeter and it automatically creates link to provided URL. For my faculty I have to delete the link (but not the URL itself) - is it possible to change/delete anything here:

<!-- Handle URLs. -->
                  <xsl:when test="$name = 'URL' and string($source/b:URL)">
                    <xsl:call-template name="format-url">
                      <xsl:with-param name="url" select="$source/b:URL"></xsl:with-param>
                      <xsl:with-param name="options" select="$options"></xsl:with-param>
                    </xsl:call-template>
                  </xsl:when>

or here:

<!-- Formats an URL. -->
  <xsl:template name="format-url">
    <!-- URL to format. -->
    <xsl:param name="url"></xsl:param>
    <!-- Formatting options. Currently only 'l' for link is supported. -->
    <xsl:param name="options"></xsl:param>
    <xsl:if test="string-length($url) &gt; 0">
      <!-- Open tag. -->
      <xsl:if test="$options = 'l'">
        <xsl:text>&lt;a href="</xsl:text>
        <xsl:value-of select="$url"></xsl:value-of>
        <xsl:text>"&gt;</xsl:text>
      </xsl:if>
      <!-- Hack in case <URL> is requested and not as link. -->
      <xsl:if test="$options != 'l'">
        <xsl:text>&lt;span/&gt;</xsl:text>
      </xsl:if>
      <!-- Display URL. -->
      <xsl:value-of select="$url"></xsl:value-of>
      <!-- Close tag. -->
      <xsl:if test="$options = 'l'">
        <xsl:text>&lt;/a&gt;</xsl:text>
      </xsl:if>
    </xsl:if>
  </xsl:template>

 

Many thanks!

Coordinator
Jan 31, 2010 at 1:31 PM

You should not be making changes to the template itself (though you can). Instead, you should be making the changes to the format strings in the data element. In your case, just do a find and replace of "URL:l" to "URL" (without the quotes).

(I do notice that their is an inconsistency in the style where some URLs are displayed as links, while others are not. As soon as I have some time, I will fix this)

Jan 31, 2010 at 2:05 PM
Edited Jan 31, 2010 at 2:06 PM

Thank you so much, so simple - yet so useful for me! Thanks a lot!

Marko