Project

General

Profile

metacat / lib / style / common / spatial_results.xsl @ 10195

1
<?xml version="1.0"?>
2
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3
    <xsl:output method="html" indent="yes" encoding="ISO-8859-1" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" doctype-system="http://www.w3.org/TR/html4/loose.dtd" />
4

    
5
    <xsl:template match="/">
6
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
<head>
8
<title>Metacat Spatial Query Results</title>
9
<!--link href="http://knb.ecoinformatics.org/knb/style/common/spatial_results.css" media="screen" rel="Stylesheet" type="text/css"/-->
10
<link href="http://knb.ecoinformatics.org/knb/style/skins/knb/knb.css" type="text/css" rel="stylesheet"/>
11
<script src="http://knb.ecoinformatics.org/knb/style/skins/knb/knb.js" type="text/JavaScript" language="Javascript"></script>
12
<script src="http://knb.ecoinformatics.org/knb/style/common/branding.js" type="text/JavaScript" language="Javascript"></script>
13

    
14
<style type="text/css">
15
#query_results {
16
    width: 70%;
17
}
18

    
19
.mc_doc { margin: 9px 3px; }
20
.odd { background-color: #e6e6e6; }
21
.even { background-color: #ccc; }
22

    
23
.mc_doc a,
24
.mc_doc a:visited {
25
    /* docid */
26
    color: #05F;
27
    border: 1px solid #bcbcbc;
28
    background-color: #fff;
29
    padding: 5px 15px;
30
    font-weight: bold;
31
    font-size: 13pt;
32
    text-decoration: none;
33
}
34
.mc_doc a:visited {
35
    background-color: #efefef;
36
    color: #7AA4FF;
37
}
38
.mc_doc a:hover {
39
    border-color: #05f;
40
    background-color: #B8CFFF;
41
    color: #05f;
42
}
43

    
44
.mc_doc i {
45
    /* creator */
46
    padding-left: 10px;
47
    color: #666;
48
    font-size: 10pt;
49
}
50

    
51
blockquote {
52
    /* abstract */
53
    margin: 0px;
54
    padding: 1px 3px 9px 18px;
55
    color: #333;
56
    font-size: 11pt;
57
}
58
</style>
59

    
60
</head>
61

    
62
<body>
63
    <div id="mainTableAligmentStyle">
64
    <script language="JavaScript">insertTemplateOpening();</script>
65

    
66
    <h2>Metacat Spatial Query Results</h2>
67
    <xsl:apply-templates />
68

    
69
    </div>
70

    
71
</body>
72
</html>
73
</xsl:template>
74

    
75
<xsl:template match="metacatspatialdataset">
76
    <div id="query_results">
77
        <xsl:apply-templates />
78
    </div>
79
</xsl:template>
80

    
81
<xsl:template match="metacatspatialdocument[position() mod 2 = 1]">
82
    <p class="mc_doc odd">
83
    <xsl:call-template name="show_doc" />
84
    </p>
85
</xsl:template>
86

    
87
<xsl:template match="metacatspatialdocument">
88
    <p class="mc_doc even">
89
    <xsl:call-template name="show_doc" />
90
    </p>
91
</xsl:template>
92

    
93
<xsl:template name="show_doc">
94
    <a><xsl:attribute name="href">http://nebulous.msi.ucsb.edu:9999/knp/metacat?action=read&amp;docid=<xsl:value-of select="docid"/>&amp;qformat=knb</xsl:attribute><xsl:value-of select="docid"/></a>
95
    <i>
96
	<xsl:choose>
97
	<xsl:when test="creator/individualName/surName = ''">
98
		<xsl:value-of select="creator/individualName/givenName"/>
99
	</xsl:when>
100
	<xsl:otherwise>
101
		<xsl:value-of select="creator/individualName/surName"/>,
102
		<xsl:value-of select="creator/individualName/givenName"/>
103
	</xsl:otherwise>
104
	</xsl:choose>
105
	</i>
106
    <blockquote>
107
	<xsl:choose>
108
	<xsl:when test="title = 'null'">
109
		<!-- no title -->	
110
	</xsl:when>
111
	<xsl:otherwise>
112
		<xsl:value-of select="title"/>
113
	</xsl:otherwise>
114
	</xsl:choose>
115
	</blockquote>
116
</xsl:template>
117

    
118
</xsl:stylesheet>