Ignore:
Timestamp:
09/19/12 10:36:16 (12 years ago)
Author:
vronk
Message:

intermediate commit of older minor(?) changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • SMC/trunk/SMC/src/scripts/dcr_rdf2terms.xsl

    r1607 r2235  
    66  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    77  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     8  xmlns:dcif="http://www.isocat.org/ns/dcif"
    89  exclude-result-prefixes="dcr rdf rdfs"
    910>
     
    2425<xsl:output method="xml" indent="yes" > </xsl:output>
    2526
    26         <xsl:param name="isocat_prefix" select="'http://www.isocat.org/datcat/'"></xsl:param>
     27<!--    <xsl:param name="isocat_prefix" select="'http://www.isocat.org/datcat/'"></xsl:param>-->
    2728
    2829 <!--
    2930        decide based on the inner-structure, what it is and how to handle
    3031        -->
    31 <xsl:template match="*" mode="dcr">
     32<xsl:template match="*" mode="dcr">     
     33        <xsl:param name="config-node" />
    3234        <xsl:param name="set" />
    3335       
    34         <Termset set="{$set}">
    35                 <xsl:apply-templates select="/rdf:RDF/rdf:Description | /rdf:RDF/rdf:Property ">
     36        <Termset set="{$set}" name="{$config-node/name}" url="{$config-node/url_prefix}" >
     37                <xsl:apply-templates select="/rdf:RDF/rdf:Description | /rdf:RDF/rdf:Property | /dcif:dataCategorySelection/dcif:dataCategory  ">
    3638                        <xsl:with-param name="set" select="$set" />
    3739                </xsl:apply-templates>
    3840        </Termset>
    3941</xsl:template>
     42
     43<xsl:template match="*" mode="rr">
     44        <xsl:param name="set" />
     45       
     46        <Termset set="{$set}">
     47                <xsl:apply-templates select="/rdf:RDF/rdf:Description" mode="rr">
     48                        <xsl:with-param name="set" select="$set" />
     49                </xsl:apply-templates>
     50        </Termset>
     51</xsl:template>
     52
    4053
    4154        <!-- isocat.rdf -->
     
    8093        </Concept>
    8194</xsl:template>
    82        
     95
     96<!-- process relations from RR -->
     97        <xsl:template match="rdf:Description" mode="rr">
     98                <xsl:param name="set" />               
     99                <xsl:variable name="reltype" select= "*/name()" />
     100                <Relation type="{$reltype}" >
     101                        <Concept type="datcat" id="{@rdf:about}" role="about"></Concept>                       
     102                        <Concept type="datcat" id="{*/@rdf:resource}" ></Concept>
     103                </Relation>
     104        </xsl:template>
    83105</xsl:stylesheet>
Note: See TracChangeset for help on using the changeset viewer.