<!-- PINES - create url instead of using one brought in
<xsl:variable name="url"><xsl:call-template name="resolvelink"><xsl:with-param name="url" select="(atom:link[not(@rel) or @rel='alternate' or @rel='']/@href | link | guid[@isPermaLink='true'] | rss1:link | rss9:link)[1]" /></xsl:call-template></xsl:variable>
-->
- <xsl:variable name="url">
- <xsl:variable name="tcnraw"><xsl:value-of select="substring-before(substring-after(.,'TCN:'),' ')"/></xsl:variable>
- <xsl:value-of select="concat('/eg/opac/record/',$tcnraw)" />
+ <xsl:variable name="url">
+ <xsl:variable name="tcnraw"><xsl:value-of select="substring-after(.,'TCN:')"/></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="contains($tcnraw, ' ')">
+ <xsl:value-of select="concat('/eg/opac/record/', substring-before($tcnraw,' '))" />
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="concat('/eg/opac/record/', $tcnraw)" />
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:variable>
<!-- item title -->
<dt>