Changeset 2454 for metadata


Ignore:
Timestamp:
01/10/13 15:24:21 (11 years ago)
Author:
dietuyt
Message:

Updated rule to account for MdSelfLinks? that use a non-MPI handle (e.g. the Lund IMDIs), so that these do not use the @format=cmdi suffix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • metadata/trunk/toolkit/xslt/imdi2clarin.xsl

    r2408 r2454  
    3737            <MdSelfLink>
    3838                <xsl:choose>
    39                     <xsl:when test="not($uri-base='') and normalize-space(@ArchiveHandle)=''">
    40                         <xsl:value-of select="$uri-base"/>
    41                     </xsl:when>
    42                     <xsl:otherwise><xsl:value-of select="@ArchiveHandle"/>@format=cmdi</xsl:otherwise>
     39                    <!-- MPI handle prefix? Use handle + @format=cmdi suffix -->
     40                    <xsl:when test="starts-with(normalize-space(@ArchiveHandle), 'hdl:1839/')"><xsl:value-of select="@ArchiveHandle"/>@format=cmdi</xsl:when>
     41                    <!-- No handle? Then just use the URL -->
     42                    <xsl:when test="not($uri-base='') and normalize-space(@ArchiveHandle)=''"><xsl:value-of select="$uri-base"/></xsl:when>
     43                    <!-- Other handle prefix? Use handle (e.g. Lund) -->
     44                    <xsl:otherwise><xsl:value-of select="@ArchiveHandle"/></xsl:otherwise>
    4345                </xsl:choose>
    4446            </MdSelfLink>
Note: See TracChangeset for help on using the changeset viewer.