Changeset 2550


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

added id in ResourceProxy? items

File:
1 edited

Legend:

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

    r2549 r2550  
    187187    <!-- to be called during the creation of the ResourceProxyList (in linking mode) -->
    188188    <xsl:template name="CreateResourceProxyTypeResource">
    189         <ResourceProxy id="{generate-id()}">
     189       
     190        <xsl:variable name="resourceId">
     191            <xsl:choose>
     192                <xsl:when test="$keep-resource-refs and string-length(@ResourceId) &gt; 0">
     193                    <xsl:value-of select="@ResourceId" />
     194                </xsl:when>
     195                <xsl:otherwise>
     196                    <xsl:value-of select="generate-id()"/>
     197                </xsl:otherwise>
     198            </xsl:choose>
     199        </xsl:variable>
     200       
     201        <ResourceProxy>
     202            <xsl:attribute name="id">
     203                <xsl:value-of select="$resourceId"/>
     204            </xsl:attribute>
    190205            <ResourceType>
    191206                <xsl:if test="exists(Format) and not(empty(Format))">
     
    613628                <xsl:when test="$keep-resource-refs and string-length(@ResourceId) &gt; 0">
    614629                    <xsl:value-of select="@ResourceId" />
    615             </xsl:when>
     630                </xsl:when>
    616631                <xsl:otherwise>
    617632                    <xsl:value-of select="generate-id()"/>
    618633                </xsl:otherwise>
    619         </xsl:choose>
    620            
     634            </xsl:choose>
    621635        </xsl:variable>
     636       
    622637        <MediaFile>
    623638            <xsl:attribute name="ref">
Note: See TracChangeset for help on using the changeset viewer.