/[volute]/trunk/projects/theory/snapdm/res/skos.xsl
ViewVC logotype

Contents of /trunk/projects/theory/snapdm/res/skos.xsl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 455 - (show annotations)
Mon May 12 08:52:39 2008 UTC (12 years, 6 months ago) by gerard.lemson
File MIME type: application/xml
File size: 1167 byte(s)
first check in, preliminary !
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE stylesheet [
3 <!ENTITY cr "<xsl:text>
4 </xsl:text>">
5 <!ENTITY bl "<xsl:text> </xsl:text>">
6 ]>
7 <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
8 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
9 xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
10 xmlns:dc="http://purl.org/dc/elements/1.1/"
11 xmlns:skos="http://www.w3.org/2004/02/skos/core#">
12
13
14 <!-- This style sheet extracts SKOS concepts from a SKOS dovument in RDF/XML format.
15 To be used to simply parsing of the document by Java code (as no XML schema seems to be available
16 that would allow us to use JAXB... -->
17
18 <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
19
20 <xsl:template match="/">
21 <xsl:apply-templates select="rdf:RDF"/>
22 </xsl:template>
23
24
25
26 <xsl:template match="rdf:RDF">
27 <xsl:element name="skos">
28 <xsl:apply-templates select="skos:Concept" />
29 </xsl:element>
30 </xsl:template>
31
32
33
34 <xsl:template match="skos:Concept">
35 <concept><xsl:value-of select="skos:prefLabel[@xml:lang='en']"/></concept>
36 </xsl:template>
37
38
39
40
41
42 </xsl:stylesheet>

msdemlei@ari.uni-heidelberg.de
ViewVC Help
Powered by ViewVC 1.1.26