Changeset 3378
- Timestamp:
- 08/14/13 09:25:31 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
metadata/trunk/toolkit/xslt/imdi2clarin.xsl
r3371 r3378 148 148 <xsl:for-each select="CorpusLink"> 149 149 <ResourceProxy id="{generate-id()}"> 150 <!-- Do we have both archive handle and link (text content)? --> 151 <xsl:if test="not(normalize-space(./@ArchiveHandle)='' or normalize-space(.)='')"> 152 <!-- Archive handle is kept, but original link is lost in CDMI. Keep content in a comment. --> 153 <xsl:comment> 154 <xsl:value-of select="."/> 155 </xsl:comment> 156 </xsl:if> 150 157 <ResourceType>Metadata</ResourceType> 151 158 <ResourceRef> 152 159 <xsl:choose> 153 <xsl:when test="not(normalize-space(./@ArchiveHandle)='')" 154 ><xsl:value-of select="./@ArchiveHandle"/></xsl:when> 160 <!-- Check for archive handle attribute --> 161 <xsl:when test="not(normalize-space(./@ArchiveHandle)='')"> 162 <xsl:choose> 163 <!-- MPI handle prefix? Use handle + @format=cmdi suffix --> 164 <xsl:when test="starts-with(normalize-space(@ArchiveHandle), 'hdl:1839/')"><xsl:value-of select="@ArchiveHandle"/>@format=cmdi</xsl:when> 165 <!-- Other handle prefix? Use handle (e.g. Lund) --> 166 <xsl:otherwise><xsl:value-of select="@ArchiveHandle"/></xsl:otherwise> 167 </xsl:choose> 168 </xsl:when> 169 <!-- Is link a handle? --> 155 170 <xsl:when test="starts-with(., 'hdl:')"> 156 171 <xsl:value-of select="."/> 157 172 </xsl:when> 173 <!-- Fallback: use original link, append .cmdi. Resolve from base URI if available. --> 158 174 <xsl:when test="$uri-base=''"><xsl:value-of select="."/>.cmdi</xsl:when> 159 175 <xsl:otherwise>
Note: See TracChangeset
for help on using the changeset viewer.