Changeset 5322 for CMDI-Interoperability


Ignore:
Timestamp:
06/03/14 12:37:51 (11 years ago)
Author:
Menzo Windhouwer
Message:

M xsl/CMDRecord2RDF.xsl
M xsl/CMDRecord2RDFcache.xsl

  • <if> should be <xsl:if>
  • pick the first component Hack: to deal with some invalid (Meertens) CMD records
Location:
CMDI-Interoperability/CMD2RDF/trunk/xsl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CMDI-Interoperability/CMD2RDF/trunk/xsl/CMDRecord2RDF.xsl

    r5310 r5322  
    5050
    5151    <xsl:template match="cmd:MdCreator">
    52         <rdf:Description rdf:about="{concat('#',generate-id(/cmd:CMD/cmd:Components/*))}">
     52        <rdf:Description rdf:about="{concat('#',generate-id((/cmd:CMD/cmd:Components/*)[1]))}">
    5353            <dc:creator>
    5454                <xsl:value-of select="."/>
     
    5858
    5959    <xsl:template match="cmd:MdCreationDate">
    60         <rdf:Description rdf:about="{concat('#',generate-id(/cmd:CMD/cmd:Components/*))}">
     60        <rdf:Description rdf:about="{concat('#',generate-id((/cmd:CMD/cmd:Components/*)[1]))}">
    6161            <dc:created>
    6262                <xsl:value-of select="."/>
     
    6666
    6767    <xsl:template match="cmd:MdSelfLink">
    68         <rdf:Description rdf:about="{concat('#',generate-id(/cmd:CMD/cmd:Components/*))}">
     68        <rdf:Description rdf:about="{concat('#',generate-id((/cmd:CMD/cmd:Components/*)[1]))}">
    6969            <dc:identifier>
    7070                <xsl:value-of select="."/>
     
    139139            </xsl:choose>
    140140        </xsl:variable>
    141         <if test="not(startsWith($id,'clarin.eu:'))">
     141        <xsl:if test="not(starts-with($id,'clarin.eu:'))">
    142142            <xsl:text>ERR: the CMDI record doesn't refer to a profile in the CR!</xsl:text>
    143         </if>
     143        </xsl:if>
    144144        <!-- load the profile -->
    145145        <xsl:variable name="profile" select="cmd:profile($id)"/>
  • CMDI-Interoperability/CMD2RDF/trunk/xsl/CMDRecord2RDFcache.xsl

    r5310 r5322  
    5050            </xsl:choose>
    5151        </xsl:variable>
    52         <if test="not(startsWith($id,'clarin.eu:'))">
     52        <xsl:if test="not(starts-with($id,'clarin.eu:'))">
    5353            <xsl:text>ERR: the CMDI record doesn't refer to a profile in the CR!</xsl:text>
    54         </if>
     54        </xsl:if>
    5555        <!-- prefetch the profile into the cache on the fly.
    5656            the profile (if freshly fetched)  will however only be available in subsequent calls
Note: See TracChangeset for help on using the changeset viewer.