-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
community-view.xsl
81 lines (65 loc) · 3.04 KB
/
community-view.xsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!--
The contents of this file are subject to the license and copyright
detailed in the LICENSE and NOTICE files at the root of the source
tree and available online at
http://www.dspace.org/license/
-->
<!--
Rendering specific to the community home page.
Author: art.lowel at atmire.com
Author: lieven.droogmans at atmire.com
Author: ben at atmire.com
Author: Alexey Maslov
-->
<xsl:stylesheet
xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
xmlns:dri="http://di.tamu.edu/DRI/1.0/"
xmlns:mets="http://www.loc.gov/METS/"
xmlns:dim="http://www.dspace.org/xmlns/dspace/dim"
xmlns:xlink="http://www.w3.org/TR/xlink/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:ore="http://www.openarchives.org/ore/terms/"
xmlns:oreatom="http://www.openarchives.org/ore/atom/"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xalan="http://xml.apache.org/xalan"
xmlns:encoder="xalan://java.net.URLEncoder"
exclude-result-prefixes="xalan encoder i18n dri mets dim xlink xsl">
<xsl:output indent="yes"/>
<xsl:template name="communitySummaryView-DIM">
<i18n:text>xmlui.dri2xhtml.METS-1.0.community-not-implemented</i18n:text>
</xsl:template>
<!-- A community rendered in the detailView pattern; default way of viewing a community. -->
<xsl:template name="communityDetailView-DIM">
<div class="detail-view"> 
<!-- Generate the logo, if present, from the file section -->
<xsl:apply-templates select="./mets:fileSec/mets:fileGrp[@USE='LOGO']"/>
<!-- Generate the info about the collections from the metadata section -->
<xsl:apply-templates select="./mets:dmdSec/mets:mdWrap[@OTHERMDTYPE='DIM']/mets:xmlData/dim:dim"
mode="communityDetailView-DIM"/>
</div>
</xsl:template>
<!-- Generate the info about the community from the metadata section -->
<xsl:template match="dim:dim" mode="communityDetailView-DIM">
<xsl:if test="string-length(dim:field[@element='description'][not(@qualifier)])>0">
<p class="intro-text">
<xsl:copy-of select="dim:field[@element='description'][not(@qualifier)]/node()"/>
</p>
</xsl:if>
<xsl:if test="string-length(dim:field[@element='description'][@qualifier='tableofcontents'])>0">
<div class="detail-view-news">
<h3><i18n:text>xmlui.dri2xhtml.METS-1.0.news</i18n:text></h3>
<p class="news-text">
<xsl:copy-of select="dim:field[@element='description'][@qualifier='tableofcontents']/node()"/>
</p>
</div>
</xsl:if>
<xsl:if test="string-length(dim:field[@element='rights'][not(@qualifier)])>0">
<div class="detail-view-rights-and-license">
<p class="copyright-text">
<xsl:copy-of select="dim:field[@element='rights'][not(@qualifier)]/node()"/>
</p>
</div>
</xsl:if>
</xsl:template>
</xsl:stylesheet>