Ignore:
Timestamp:
05/29/14 13:10:47 (10 years ago)
Author:
Menzo Windhouwer
Message:

M xsl/CMDRecord2RDF.xsl
M xsl/CMD2RDF.xsl
M xsl/CMDRecord2RDFcache.xsl
M xsl/CMD2RDFcache.xsl

  • be a bit smarter in finding and cleaning the profile ID
File:
1 edited

Legend:

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

    r3792 r5310  
    7070    </xsl:function>
    7171   
     72    <!-- make sure we use a clean ID -->
     73    <xsl:function name="cmd:id">
     74        <xsl:param name="id"/>
     75        <xsl:sequence select="replace($id,'.*(clarin.eu:cr[0-9]+:p_[0-9]+).*','$1')"/>
     76    </xsl:function>
     77   
    7278    <!-- the registry URL for a profile -->
    7379    <xsl:function name="cmd:ppath">
    7480        <xsl:param name="id"/>
    7581        <xsl:param name="ext"/>
    76         <xsl:sequence select="concat($registry,'/rest/registry/profiles/',$id,'/',$ext)"/>
     82        <xsl:sequence select="concat($registry,'/rest/registry/profiles/',cmd:id($id),'/',$ext)"/>
    7783    </xsl:function>
    7884
     
    8187        <xsl:param name="id"/>
    8288        <xsl:param name="ext"/>
    83         <xsl:sequence select="concat($registry,'/rest/registry/components/',$id,'/',$ext)"/>
     89        <xsl:sequence select="concat($registry,'/rest/registry/components/',cmd:id($id),'/',$ext)"/>
    8490    </xsl:function>
    8591   
Note: See TracChangeset for help on using the changeset viewer.