Skip to content

Commit

Permalink
use HTTPS-Rostock-PURLs in Docdetails #69
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteph-de committed Sep 28, 2023
1 parent 0f83837 commit d413a41
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@
</xsl:element></p>
</xsl:when>
<xsl:when test="./mods:identifier[@type='purl']">
<xsl:variable name="p" select="replace(./mods:identifier[@type='purl'], 'http://purl.uni-rostock.de', 'https://purl.uni-rostock.de')" />
<p><xsl:element name="a">
<xsl:attribute name="href"><xsl:value-of select="./mods:identifier[@type='purl']" /></xsl:attribute>
<xsl:value-of select="./mods:identifier[@type='purl']" />
<xsl:attribute name="href"><xsl:value-of select="$p" /></xsl:attribute>
<xsl:value-of select="$p" />
</xsl:element></p>
</xsl:when>
</xsl:choose>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<xsl:attribute name="href" select="concat('https://doi.org/', ./mods:identifier[@type='doi'])" />
</xsl:when>
<xsl:when test="./mods:identifier[@type='purl']">
<xsl:attribute name="href" select="./mods:identifier[@type='purl']" />
<xsl:attribute name="href" select="replace(./mods:identifier[@type='purl'], 'http://purl.uni-rostock.de', 'https://purl.uni-rostock.de')" />
</xsl:when>
</xsl:choose>
<xsl:attribute name="data-toggle">popover</xsl:attribute>
Expand Down Expand Up @@ -89,7 +89,7 @@
<xsl:attribute name="href" select="concat('https://doi.org/', ./mods:identifier[@type='doi'])" />
</xsl:when>
<xsl:when test="./mods:identifier[@type='purl']">
<xsl:attribute name="href" select="./mods:identifier[@type='purl']" />
<xsl:attribute name="href" select="replace(./mods:identifier[@type='purl'], 'http://purl.uni-rostock.de', 'https://purl.uni-rostock.de')" />
</xsl:when>
</xsl:choose>
<xsl:attribute name="data-toggle">popover</xsl:attribute>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@
<a href="https://doi.org/{./mods:identifier[@type='doi']}">https://doi.org/{./mods:identifier[@type='doi']}</a>
</xsl:when>
<xsl:when test="./mods:identifier[@type='purl']">
<a href="{./mods:identifier[@type='purl']}">{./mods:identifier[@type='purl']}</a>
<xsl:variable name="p" select="replace(./mods:identifier[@type='purl'], 'http://purl.uni-rostock.de', 'https://purl.uni-rostock.de')" />
<a href="{$p}">{$p}</a>
</xsl:when>
</xsl:choose>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,16 @@
</xsl:if>
</xsl:for-each>
<xsl:for-each select="mods:identifier[@type='purl']">
<xsl:variable name="p" select="replace(., 'http://purl.uni-rostock.de', 'https://purl.uni-rostock.de')" />
<xsl:variable name="categ_purl" select="mcrclass:category('identifier', 'purl')" />
<tr><th><abbr class="text-nowrap" title="{$categ_purl/label[@xml:lang=$CurrentLang]/@description}">{$categ_purl/label[@xml:lang=$CurrentLang]/@text}</abbr>: </th>
<td><a href="{.}">{.}</a></td>
<td>
<a href="{$p}">{$p}</a>
<a class="ir-identifier-portal text-dark small ml-3" title="{mcri18n:translate('OMD.ir.docdetails.metadata.tooltip.identifier')}"
href="{replace($p, '://purl.uni-rostock.de/','://purl.uni-rostock.de/info/purl/')}">
<i class="fas fa-external-link-alt"></i>
</a>
</td>
</tr>
</xsl:for-each>
</xsl:template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@
</xsl:for-each>
<xsl:for-each select="./mods:recordInfo/mods:recordIdentifier">
<tr><th><abbr class="text-nowrap" title="Persistente URL">PURL</abbr>: </th>
<td><a href="http://purl.uni-rostock.de/{.}">http://purl.uni-rostock.de/{.}</a></td>
<td><a href="https://purl.uni-rostock.de/{.}">https://purl.uni-rostock.de/{.}</a></td>
</tr>
</xsl:for-each>
</table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<meta name="DC.identifier" content="{$WebApplicationBaseURL}resolve/id/{$mcrid}" />

<xsl:for-each select="./mods:identifier[@type='purl']/text()">
<meta name="citation_abstract_url" content="{.}" />
<meta name="citation_abstract_url" content="{replace(., 'http://purl.uni-rostock.de', 'https://purl.uni-rostock.de')}" />
<meta name="DC.identifier" content="{.}" />
</xsl:for-each>
<xsl:for-each select="./mods:identifier[@type='urn']/text()">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@
<a href="https://doi.org/{./mods:identifier[@type='doi']}">https://doi.org/{./mods:identifier[@type='doi']}</a>
</xsl:when>
<xsl:when test="./mods:identifier[@type='purl']">
<a href="{./mods:identifier[@type='purl']}">{./mods:identifier[@type='purl']}</a>
<xsl:variable name="p" select="replace(./mods:identifier[@type='purl'], 'http://purl.uni-rostock.de', 'https://purl.uni-rostock.de')" />
<a href="{$p}">{$p}</a>
</xsl:when>
</xsl:choose>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,12 @@
</xsl:when>
<xsl:when test="/mycoreobject/metadata/def.modsContainer/modsContainer/mods:mods/mods:identifier[@type='purl']">
<xsl:for-each select="/mycoreobject/metadata/def.modsContainer/modsContainer/mods:mods/mods:identifier[@type='purl' and not(contains(text(), 'ub1vm'))]">
<p class="d-none d-xl-block mb-0"><a href="{.}" style="transform: scaleX(96%) translate(-2%);display: inline-block;white-space: nowrap">
{substring-before(.,'.de/')}.de/<br class="d-md-none"/>{substring-after(.,'.de/')}
<xsl:variable name="p" select="replace(./mods:identifier[@type='purl'], 'http://purl.uni-rostock.de', 'https://purl.uni-rostock.de')" />
<p class="d-none d-xl-block mb-0"><a href="{$p}" style="transform: scaleX(96%) translate(-2%);display: inline-block;white-space: nowrap">
{substring-before($p,'.de/')}.de/<br class="d-md-none"/>{substring-after($p,'.de/')}
</a></p>
<p class="d-xl-none mb-0"><a href="{.}">
{substring-before(.,'.de/')}.de/<br />{substring-after(.,'.de/')}
<p class="d-xl-none mb-0"><a href="{$p}">
{substring-before($p,'.de/')}.de/<br />{substring-after($p,'.de/')}
</a></p>
</xsl:for-each>
</xsl:when>
Expand Down

0 comments on commit d413a41

Please sign in to comment.