Changeset 3482 for SMC


Ignore:
Timestamp:
08/28/13 12:31:13 (11 years ago)
Author:
vronk
Message:

hack to normalize isocat-uris

File:
1 edited

Legend:

Unmodified
Added
Removed
  • SMC/trunk/SMC/src/xsl/smc_functions.xsl

    r3467 r3482  
    111111                </xsl:choose>                                                   
    112112        </xsl:variable>
    113                
    114         <Term  type="{$type}" name="{@name}" datcat="{@ConceptLink}" id="{$id}"  elem="{@name}"
     113
     114        <!-- hack to normalize isocat-uris -->
     115                <xsl:variable name="datcat" select="if (starts-with(normalize-space(@ConceptLink),'http://www.isocat.org/rest/dc/')) then
     116                        concat('http://www.isocat.org/datcat/DC-', substring-after(@ConceptLink,'http://www.isocat.org/rest/dc/')) else normalize-space(@ConceptLink)" />
     117        <Term  type="{$type}" name="{@name}" datcat="{$datcat}" id="{$id}"  elem="{@name}"
    115118                parent="{ancestor::CMD_Component[1]/@name}" path="{$context}"
    116119                >
     
    293296                <!-- <xsl:variable name="matchinge_termset"  select="if($url!='') then if ($terms_setup/Termsets/Termset[@url_prefix][starts-with($url,@url_prefix)]) then $terms_setup/Termsets/Termset[@url_prefix][starts-with($url,@url_prefix)][1]
    294297                        else if $terms_setup/Termsets/Termset[@url][starts-with($url,@url)] then $terms_setup/Termsets/Termset[@url][starts-with($url,@url)][1] else ()" /> --> 
    295                 <xsl:message>shortURL: <xsl:value-of select="$matching_termset/url_prefix" />:: <xsl:value-of select="$url" />
    296                 </xsl:message>                 
     298                <!--<xsl:message>shortURL: <xsl:value-of select="$matching_termset/url_prefix" />:: <xsl:value-of select="$url" />
     299                </xsl:message>-->               
    297300                <xsl:value-of select="if ($matching_termset/url_prefix and $matching_termset/url_prefix!='' and $url!='') then replace($url, $matching_termset[1]/url_prefix, concat(string-join($matching_termset/key,','),':')) else $url" />         
    298301        </xsl:function>
Note: See TracChangeset for help on using the changeset viewer.