Changeset 2555


Ignore:
Timestamp:
02/08/13 13:59:56 (11 years ago)
Author:
twagoo
Message:

fixed issue with sources when keep-resource-refs disabled. also gave this parameter an actual boolean default value.

File:
1 edited

Legend:

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

    r2554 r2555  
    2828    <xsl:variable name="SruSearchable">childes,ESF corpus,IFA corpus,MPI CGN,talkbank</xsl:variable>
    2929   
    30     <xsl:param name="keep-resource-refs" select="'true'" />
     30    <xsl:param name="keep-resource-refs" select="true()" />
    3131
    3232    <xsl:template name="metatranscriptDelegate">
     
    249249    <!-- Used to create the ref attribute on sources from the original ResourceRefs attribute (multiple refs) -->
    250250    <xsl:template match="@ResourceRefs" mode="CreateResourceRefAttribute">
    251         <xsl:variable name="resourceRefsValid">
    252             <xsl:call-template name="CheckResourceRefsValidity">
    253                 <xsl:with-param name="resourceRefs" select="concat(normalize-space(string(.)),' ')"></xsl:with-param>
    254             </xsl:call-template>
    255         </xsl:variable>
    256         <xsl:if test="$resourceRefsValid = 'true'">
    257             <xsl:attribute name="ref" select="."/>
     251        <xsl:if test="$keep-resource-refs">
     252            <xsl:variable name="resourceRefsValid">
     253                <xsl:call-template name="CheckResourceRefsValidity">
     254                    <xsl:with-param name="resourceRefs" select="concat(normalize-space(string(.)),' ')"></xsl:with-param>
     255                </xsl:call-template>
     256            </xsl:variable>
     257            <xsl:if test="$resourceRefsValid = 'true'">
     258                <xsl:attribute name="ref" select="."/>
     259            </xsl:if>
    258260        </xsl:if>
    259261    </xsl:template>
Note: See TracChangeset for help on using the changeset viewer.