3 <!-- Copyright (C) 2000, HELM Team -->
5 <!-- This file is part of HELM, an Hypertextual, Electronic -->
6 <!-- Library of Mathematics, developed at the Computer Science -->
7 <!-- Department, University of Bologna, Italy. -->
9 <!-- HELM is free software; you can redistribute it and/or -->
10 <!-- modify it under the terms of the GNU General Public License -->
11 <!-- as published by the Free Software Foundation; either version 2 -->
12 <!-- of the License, or (at your option) any later version. -->
14 <!-- HELM is distributed in the hope that it will be useful, -->
15 <!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
16 <!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
17 <!-- GNU General Public License for more details. -->
19 <!-- You should have received a copy of the GNU General Public License -->
20 <!-- along with HELM; if not, write to the Free Software -->
21 <!-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, -->
22 <!-- MA 02111-1307, USA. -->
24 <!-- For details, see the HELM World-Wide-Web page, -->
25 <!-- http://cs.unibo.it/helm/. -->
27 <xsl:stylesheet version="1.0"
28 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
29 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
30 xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
31 xmlns:dc="http://purl.org/metadata/dublin_core#"
32 xmlns:dcq="http://purl.org/metadata/dublin_core_qualifiers#"
33 xmlns:h="http:/www.cs.unibo.it/helm/schemas/schema-h.rdf#"
34 xmlns:hth="http://www.cs.unibo.it/helm/schemas/schema-hth.rdf#">
39 media-type="text/html"
40 doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
41 doctype-system="DTD/xhtml1-transitional.dtd" />
43 <xsl:template name="loop_show_dc">
44 <xsl:param name="CICURI" select="''"/>
45 <xsl:param name="first_time" select="true()"/>
46 <xsl:variable name="document" select="document(concat($BaseRDFURLDC,$CICURI))"/>
48 <xsl:when test="$document/rdf:RDF/*/*">
49 <h1>Dublin Core Metadata for <xsl:value-of select="$CICURI"/>:</h1>
50 <xsl:apply-templates mode="show_dc" select="$document">
51 <xsl:with-param name="CICURI" select="$CICURI"/>
52 </xsl:apply-templates>
55 <xsl:if test="$first_time">
56 <h1>No Dublin Core Metadata available for <xsl:value-of select="$CICURI"/>.</h1>
60 <xsl:variable name="basename">
61 <xsl:call-template name="get_basename">
62 <xsl:with-param name="CICURI" select="$CICURI"/>
65 <xsl:variable name="parentURI" select="substring-before($CICURI,concat('/',$basename))"/>
66 <xsl:if test="not($parentURI = 'cic:')">
67 <xsl:call-template name="loop_show_dc">
68 <xsl:with-param name="CICURI" select="$parentURI"/>
69 <xsl:with-param name="first_time" select="false()"/>
74 <xsl:template name="get_basename">
75 <xsl:param name="CICURI"/>
76 <xsl:variable name="suffix" select="substring-after($CICURI,'/')"/>
78 <xsl:when test="$suffix = ''">
79 <xsl:value-of select="$CICURI"/>
82 <xsl:call-template name="get_basename">
83 <xsl:with-param name="CICURI" select="$suffix"/>
89 <xsl:template mode="show_dc" match="/">
91 <xsl:apply-templates mode="show_dc" select="rdf:RDF/*/*"/>
95 <xsl:template mode="show_dc" match="dc:title">
98 <td><xsl:apply-templates mode="show_dc"/></td>
102 <xsl:template mode="show_dc" match="dc:creator">
105 <td><xsl:apply-templates mode="show_dc"/></td>
109 <xsl:template mode="show_dc" match="dc:contributor">
111 <td>Contributor:</td>
112 <td><xsl:apply-templates mode="show_dc"/></td>
116 <xsl:template mode="show_dc" match="dc:subject">
119 <td><xsl:apply-templates mode="show_dc"/></td>
123 <xsl:template mode="show_dc" match="dc:description">
125 <td>Description:</td>
126 <td><xsl:apply-templates mode="show_dc"/></td>
130 <xsl:template mode="show_dc" match="dc:publisher">
133 <td><xsl:apply-templates mode="show_dc"/></td>
137 <xsl:template mode="show_dc" match="dc:date">
140 <td><xsl:apply-templates mode="show_dc"/></td>
144 <xsl:template mode="show_dc" match="dc:coverage">
147 <td><xsl:apply-templates mode="show_dc"/></td>
151 <xsl:template mode="show_dc" match="dc:type">
154 <td><xsl:apply-templates mode="show_dc"/></td>
158 <xsl:template mode="show_dc" match="hth:ResourceType">
159 <xsl:value-of select="substring-after(@rdf:about,'#')"/>
162 <xsl:template mode="show_dc" match="dc:format">
165 <td><xsl:apply-templates mode="show_dc"/></td>
169 <xsl:template mode="show_dc" match="hth:ResourceFormat">
170 <xsl:value-of select="substring-after(@rdf:about,'#')"/>
173 <xsl:template mode="show_dc" match="dc:identifier">
176 <td><xsl:apply-templates mode="show_dc"/></td>
180 <xsl:template mode="show_dc" match="dc:source">
183 <td><xsl:apply-templates mode="show_dc"/></td>
187 <xsl:template mode="show_dc" match="dc:language">
190 <td><xsl:apply-templates mode="show_dc"/></td>
194 <xsl:template mode="show_dc" match="dc:relation">
197 <td><xsl:apply-templates mode="show_dc"/></td>
201 <xsl:template mode="show_dc" match="dcq:RelationType">
202 <xsl:value-of select="substring-after(@rdf:about,'#')"/>
203 <xsl:text> </xsl:text>
204 <xsl:value-of select="@rdf:value"/>
207 <xsl:template mode="show_dc" match="dc:rights">
210 <td><xsl:apply-templates mode="show_dc"/></td>
214 <xsl:template mode="show_dc" match="hth:institution">
216 <td>Institution:</td>
217 <td><xsl:apply-templates mode="show_dc"/></td>
221 <xsl:template mode="show_dc" match="hth:contact">
224 <td><xsl:apply-templates mode="show_dc"/></td>
228 <xsl:template mode="show_dc" match="hth:firstVersion">
230 <td>First Version:</td>
231 <td><xsl:apply-templates mode="show_dc"/></td>
235 <xsl:template mode="show_dc" match="hth:modified">
238 <td><xsl:apply-templates mode="show_dc"/></td>
242 <xsl:template mode="show_dc" match="*">
245 <td><xsl:value-of select="name(.)"/></td>