Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions mir-module/src/main/resources/xslt/mods2epicur.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
</xsl:for-each>
</xsl:variable>

<xsl:variable name="objectID" select="mycoreobject/@ID" />

<xsl:template match="mycoreobject">
<epicur xsi:schemaLocation="urn:nbn:de:1111-2004033116 http://www.persistent-identifier.de/xepicur/version1.0/xepicur.xsd" xmlns="urn:nbn:de:1111-2004033116"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
Expand Down Expand Up @@ -87,7 +89,8 @@
<xsl:otherwise>
<resource xmlns="urn:nbn:de:1111-2004033116">
<identifier scheme="url" target="transfer">
<xsl:value-of select="concat($ServletsBaseURL,'MCRZipServlet/',@id)" />
<xsl:value-of select="concat($WebApplicationBaseURL,'api/v2/objects/',$objectID,
'/derivates/',@id,'/contents.zip')" />
</identifier>
<format scheme="imt">
<xsl:value-of select="'application/zip'" />
Expand All @@ -106,7 +109,8 @@
</xsl:for-each>
<xsl:value-of select="concat('/', encode-for-uri($ifsFileChild/name))" />
</xsl:variable>
<xsl:value-of select="concat($ServletsBaseURL,'MCRFileNodeServlet/',$derId,$filePath)" />
<xsl:value-of select="concat($WebApplicationBaseURL,'api/v2/objects/',$objectID,
'/derivates/',$derId,'/contents',$filePath)" />
</xsl:template>

</xsl:stylesheet>
6 changes: 4 additions & 2 deletions mir-module/src/main/resources/xslt/mods2oai_dc.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,14 @@
<xsl:variable name="uri" select="$ifs/der/mcr_directory/children//child[@type='file']/uri" />
<xsl:variable name="derId" select="substring-before(substring-after($uri,':/'), ':')" />
<xsl:variable name="filePath" select="substring-after(substring-after($uri, ':'), ':')" />
<xsl:value-of select="concat($ServletsBaseURL,'MCRFileNodeServlet/',$derId,$filePath)" />
<xsl:value-of select="concat($WebApplicationBaseURL,'api/v2/objects/',$objId,
'/derivates/',$derId,'/contents',$filePath)" />
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$dernumber = 1">
<xsl:value-of select="concat($ServletsBaseURL,'MCRZipServlet/',$ifs/der/@id)" />
<xsl:value-of select="concat($WebApplicationBaseURL,'api/v2/objects/',$objId,
'/derivates/',$ifs/der/@id,'/contents.zip')" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat($ServletsBaseURL,'MCRZipServlet/',$objId)" />
Expand Down
6 changes: 4 additions & 2 deletions mir-module/src/main/resources/xslt/mods2xMetaDissPlus.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1102,12 +1102,14 @@
<xsl:variable name="derId" select="substring-before(substring-after($uri,':/'), ':')" />
<xsl:variable name="filePath" select="substring-after(substring-after($uri, ':'), ':')" />
<!-- DNB requires ASCII-only URLs -->
<xsl:value-of select="concat($ServletsBaseURL,'MCRFileNodeServlet/', $derId, fn:iri-to-uri($filePath))" />
<xsl:value-of select="concat($WebApplicationBaseURL,'api/v2/objects/', /mycoreobject/@ID,
'/derivates/', $derId, '/contents', fn:iri-to-uri($filePath))" />
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$dernumber = 1">
<xsl:value-of select="concat($ServletsBaseURL,'MCRZipServlet/',$ifs/der/@id)" />
<xsl:value-of select="concat($WebApplicationBaseURL,'api/v2/objects/',/mycoreobject/@ID,
'/derivates/',$ifs/der/@id,'/contents.zip')" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat($ServletsBaseURL,'MCRZipServlet/',/mycoreobject/@ID)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,17 @@
</fn:string>
</xsl:when>
</xsl:choose>
<xsl:if test="count(/mycoreobject/structure/derobjects/derobject[fn:contains(maindoc/text(), '.pdf')])&gt;0">
<xsl:variable name="derivate"
select="/mycoreobject/structure/derobjects/derobject[fn:contains(maindoc/text(), '.pdf')]"/>
<xsl:variable name="derivate"
select="(/mycoreobject/structure/derobjects/derobject[fn:contains(maindoc/text(), '.pdf')])[1]"/>
<xsl:if test="$derivate">
<fn:string key="pdf_url">
<xsl:value-of select="concat($WebApplicationBaseURL,
'servlets/MCRFileNodeServlet/',
'api/v2/objects/',
/mycoreobject/@ID,
'/derivates/',
$derivate/@xlink:href,
'/',
$derivate/maindoc/text())"/>
'/contents/',
fn:string-join(fn:tokenize($derivate/maindoc/text(), '/') ! fn:encode-for-uri(.), '/'))"/>
</fn:string>
</xsl:if>
</fn:map>
Expand Down