Changeset 2548


Ignore:
Timestamp:
02/07/13 10:25:31 (11 years ago)
Author:
twagoo
Message:

Created a branch for work in progress on imdi2clarin stylesheet that deals with resourcerefs in imdi

Location:
metadata/branches/clarin2imdi-resourcerefs
Files:
1 edited
3 copied

Legend:

Unmodified
Added
Removed
  • metadata/branches/clarin2imdi-resourcerefs/toolkit/xslt/imdi2clarin.xsl

    r2454 r2548  
    2727    <!-- definition of the SRU-searchable collections at TLA (for use later on) -->
    2828    <xsl:variable name="SruSearchable">childes,ESF corpus,IFA corpus,MPI CGN,talkbank</xsl:variable>
     29   
     30    <xsl:param name="keep-resource-refs" select="'true'" />
    2931
    3032    <xsl:template name="metatranscriptDelegate">
     
    601603
    602604    <xsl:template match="MediaFile">
    603         <MediaFile ref="{generate-id()}">
     605       
     606        <xsl:variable name="resourceRef">
     607            <xsl:choose>
     608                <xsl:when test="$keep-resource-refs and string-length(@ResourceId) &gt; 0">
     609                    <xsl:value-of select="@ResourceId" />
     610            </xsl:when>
     611                <xsl:otherwise>
     612                    <xsl:value-of select="generate-id()"/>
     613                </xsl:otherwise>
     614        </xsl:choose>
     615           
     616        </xsl:variable>
     617        <MediaFile>
     618            <xsl:attribute name="ref"><xsl:value-of select="$resourceRef"/></xsl:attribute>
    604619            <ResourceLink>
    605620                <xsl:value-of select=" ./ResourceLink"/>
Note: See TracChangeset for help on using the changeset viewer.