Revision 4014
Added by berkley over 16 years ago
lib/style/skins/sms/resultset.xsl | ||
---|---|---|
2 | 2 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> |
3 | 3 |
|
4 | 4 |
<xsl:template match="/"> |
5 |
<table> |
|
5 |
<table width="100%"> |
|
6 |
<tr> |
|
7 |
<th> |
|
8 |
Document ID |
|
9 |
</th> |
|
10 |
<th> |
|
11 |
  |
|
12 |
</th> |
|
13 |
<th> |
|
14 |
Title |
|
15 |
</th> |
|
16 |
<th> |
|
17 |
Document Type |
|
18 |
</th> |
|
19 |
</tr> |
|
6 | 20 |
<xsl:apply-templates select="//document"/> |
7 | 21 |
</table> |
22 |
|
|
8 | 23 |
<!-- page navigation--> |
9 | 24 |
<div class="resultnavbar"> |
10 | 25 |
<!--previous--> |
... | ... | |
15 | 30 |
<xsl:otherwise> |
16 | 31 |
<a> |
17 | 32 |
<xsl:attribute name="href"> |
18 |
javascript:reloadSearchContent('/sms/metacat?action=query&anytext=%25&qformat=sms&pagesize=10&pagestart=<xsl:value-of select="//previouspage"/>'); |
|
33 |
javascript:reloadSearchContent('/sms/metacat?action=query&anytext=%25&qformat=sms&returnfield=dataset/title&pagesize=10&pagestart=<xsl:value-of select="//previouspage"/>');
|
|
19 | 34 |
</xsl:attribute> |
20 | 35 |
← previous |
21 | 36 |
</a> |
... | ... | |
32 | 47 |
<xsl:otherwise> |
33 | 48 |
<a> |
34 | 49 |
<xsl:attribute name="href"> |
35 |
javascript:reloadSearchContent('/sms/metacat?action=query&anytext=%25&qformat=sms&pagesize=10&pagestart=<xsl:value-of select="//nextpage"/>'); |
|
50 |
javascript:reloadSearchContent('/sms/metacat?action=query&anytext=%25&qformat=sms&returnfield=dataset/title&pagesize=10&pagestart=<xsl:value-of select="//nextpage"/>');
|
|
36 | 51 |
</xsl:attribute> |
37 | 52 |
next → |
38 | 53 |
</a> |
... | ... | |
45 | 60 |
<xsl:template match="document"> |
46 | 61 |
<tr> |
47 | 62 |
<td> |
48 |
<a> |
|
63 |
<a><!--docid-->
|
|
49 | 64 |
<xsl:attribute name="href"> |
50 | 65 |
/sms/metacat?action=read&qformat=sms&docid=<xsl:value-of select="docid"/> |
51 | 66 |
</xsl:attribute> |
52 | 67 |
<xsl:value-of select="docid"/> |
53 | 68 |
</a> |
54 | 69 |
</td> |
55 |
<td> |
|
70 |
<td><!--xml link--> |
|
71 |
<a> |
|
72 |
<xsl:attribute name="href"> |
|
73 |
/sms/metacat?action=read&qformat=xml&docid=<xsl:value-of select="docid"/> |
|
74 |
</xsl:attribute> |
|
75 |
<img width="25px" src="style/skins/sms/xml-button.png"/> |
|
76 |
</a> |
|
77 |
</td> |
|
78 |
<td> <!--title of the doc if it's eml--> |
|
56 | 79 |
<xsl:choose> |
80 |
<xsl:when test="param[@name='dataset/title'] != ''"> |
|
81 |
<xsl:value-of select="param[@name='dataset/title']"/> |
|
82 |
</xsl:when> |
|
83 |
<xsl:otherwise> |
|
84 |
No Title |
|
85 |
</xsl:otherwise> |
|
86 |
</xsl:choose> |
|
87 |
</td> |
|
88 |
<td><!--doc type--> |
|
89 |
<xsl:choose> |
|
57 | 90 |
<xsl:when test="doctype='eml://ecoinformatics.org/eml-2.0.1'"> |
58 | 91 |
EML 2.0.1 Document |
59 | 92 |
</xsl:when> |
lib/style/skins/sms/rdf.xsl | ||
---|---|---|
1 |
<?xml version="1.0"?> |
|
2 |
<xsl:stylesheet |
|
3 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|
4 |
xmlns:owl="http://www.w3.org/2002/07/owl#" |
|
5 |
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
|
6 |
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" |
|
7 |
version="1.0"> |
|
8 |
|
|
9 |
<xsl:template match="/"> |
|
10 |
<html> |
|
11 |
<head> |
|
12 |
<link rel="stylesheet" type="text/css" href="style/skins/sms/sms.css"/> |
|
13 |
|
|
14 |
</head> |
|
15 |
<body> |
|
16 |
<h1>OWL Ontology</h1> |
|
17 |
<h2>Properties</h2> |
|
18 |
<xsl:apply-templates select="//owl:ObjectProperty"/> |
|
19 |
|
|
20 |
<hr/> |
|
21 |
<h2>Classes</h2> |
|
22 |
<xsl:apply-templates select="/rdf:RDF/owl:Class"/> |
|
23 |
|
|
24 |
</body> |
|
25 |
</html> |
|
26 |
</xsl:template> |
|
27 |
|
|
28 |
<xsl:template match="owl:ObjectProperty"> |
|
29 |
<h3>Object Property <xsl:value-of select="@rdf:about"/></h3> |
|
30 |
<p><xsl:value-of select="rdfs:comment"/></p> |
|
31 |
</xsl:template> |
|
32 |
|
|
33 |
<xsl:template match="owl:Class"> |
|
34 |
<h3>Class <xsl:value-of select="@rdf:about"/></h3> |
|
35 |
<p><xsl:value-of select="rdfs:comment"/></p> |
|
36 |
</xsl:template> |
|
37 |
|
|
38 |
</xsl:stylesheet> |
|
0 | 39 |
lib/style/skins/sms/index.jsp | ||
---|---|---|
87 | 87 |
<td>DocId:</td><td><input id="docidtextfield" type="text" name="docid" readonly="true"/></td> |
88 | 88 |
</tr> |
89 | 89 |
<tr> |
90 |
<td><a href="javascript:uploadfile()" >[Upload]</a> |
|
91 |
<input type="submit"/></td> |
|
90 |
<td> |
|
91 |
<a href="javascript:uploadfile()" >[Upload]</a> |
|
92 |
<!--<input type="submit"/>--> |
|
93 |
</td> |
|
92 | 94 |
</tr> |
93 | 95 |
</table> |
94 | 96 |
</form> |
lib/style/skins/sms/util.js | ||
---|---|---|
112 | 112 |
function search() |
113 | 113 |
{ |
114 | 114 |
var searchval = document.getElementById("searchtextbox").value |
115 |
var url = '/sms/metacat?action=query&anyfield=' + searchval + '&qformat=sms&pagesize=10&pagestart=0'; |
|
115 |
var url = '/sms/metacat?action=query&anyfield=' + searchval + '&returnfield=dataset/title&qformat=sms&pagesize=10&pagestart=0'; |
|
116 |
setCookie("sms-searchval", searchval); |
|
116 | 117 |
reloadSearchContent(url); |
117 | 118 |
} |
118 | 119 |
|
119 | 120 |
function showDatasets() |
120 | 121 |
{ |
122 |
var searchval = getCookie('sms-searchval'); |
|
123 |
alert('searchval: ' + searchval); |
|
124 |
if(searchval == '') |
|
125 |
{ |
|
126 |
searchval = '%25'; |
|
127 |
} |
|
121 | 128 |
var page = getCookie('sms-pagestart'); |
122 | 129 |
if(page) |
123 | 130 |
{ |
124 |
reloadSearchContent('/sms/metacat?action=query&anyfield=%25&qformat=sms&pagesize=10&pagestart=' + page);
|
|
131 |
reloadSearchContent('/sms/metacat?action=query&anyfield=' + searchval + '&returnfield=dataset/title&qformat=sms&pagesize=10&pagestart=' + page);
|
|
125 | 132 |
} |
126 | 133 |
else |
127 | 134 |
{ |
128 |
reloadSearchContent('/sms/metacat?action=query&anyfield=%25&qformat=sms&pagesize=10&pagestart=0');
|
|
135 |
reloadSearchContent('/sms/metacat?action=query&anyfield=' + searchval + '&returnfield=dataset/title&qformat=sms&pagesize=10&pagestart=0');
|
|
129 | 136 |
} |
130 | 137 |
} |
131 | 138 |
|
Also available in: Unified diff
javascript now remembers queries and can display xml or html versions of documents