Changeset 2235 for SMC/trunk/SMC/src/scripts/dcr_rdf2terms.xsl
- Timestamp:
- 09/19/12 10:36:16 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
SMC/trunk/SMC/src/scripts/dcr_rdf2terms.xsl
r1607 r2235 6 6 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 7 7 xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" 8 xmlns:dcif="http://www.isocat.org/ns/dcif" 8 9 exclude-result-prefixes="dcr rdf rdfs" 9 10 > … … 24 25 <xsl:output method="xml" indent="yes" > </xsl:output> 25 26 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>--> 27 28 28 29 <!-- 29 30 decide based on the inner-structure, what it is and how to handle 30 31 --> 31 <xsl:template match="*" mode="dcr"> 32 <xsl:template match="*" mode="dcr"> 33 <xsl:param name="config-node" /> 32 34 <xsl:param name="set" /> 33 35 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 "> 36 38 <xsl:with-param name="set" select="$set" /> 37 39 </xsl:apply-templates> 38 40 </Termset> 39 41 </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 40 53 41 54 <!-- isocat.rdf --> … … 80 93 </Concept> 81 94 </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> 83 105 </xsl:stylesheet>
Note: See TracChangeset
for help on using the changeset viewer.