1 |
878
|
berkley
|
<!--
|
2 |
|
|
* metacatread.html
|
3 |
|
|
*
|
4 |
|
|
* Authors: Jivka Bojilova
|
5 |
|
|
* Copyright: 2000 Regents of the University of California and the
|
6 |
|
|
* National Center for Ecological Analysis and Synthesis
|
7 |
|
|
* For Details: http://www.nceas.ucsb.edu/
|
8 |
|
|
* Created: 2000 April 5
|
9 |
|
|
* Version: 0.01
|
10 |
|
|
* File Info: '$Id$'
|
11 |
|
|
*
|
12 |
|
|
* October Meeting SDSC, 2000
|
13 |
|
|
-->
|
14 |
|
|
<HTML>
|
15 |
|
|
<HEAD>
|
16 |
|
|
<TITLE>Metacat</TITLE>
|
17 |
3780
|
daigle
|
<link rel="stylesheet" type="text/css" href="./default.css">
|
18 |
878
|
berkley
|
</HEAD>
|
19 |
|
|
<BODY>
|
20 |
|
|
<table width="100%">
|
21 |
|
|
<tr>
|
22 |
|
|
<td class="tablehead" colspan="2"><p class="label">Reading a Document
|
23 |
|
|
from the Database</p></td>
|
24 |
|
|
<td class="tablehead" colspan="2" align="right">
|
25 |
|
|
<a href="./metacatquery.html">Back</a> | <a href="./metacattour.html">Home</a> |
|
26 |
2310
|
jones
|
<a href="./metacatgetlog.html">Next</a>
|
27 |
878
|
berkley
|
</td>
|
28 |
|
|
</tr>
|
29 |
|
|
</table>
|
30 |
|
|
<p>Metacat allows clients to read a document in several different ways,
|
31 |
|
|
depending on how the client wants the document returned and how the client
|
32 |
|
|
wants to specify the requested document. </p>
|
33 |
|
|
<P> <img alt="architecture diagram of the Metacat read process"
|
34 |
|
|
src="metadataread.gif"> </p>
|
35 |
881
|
berkley
|
<p>The documents are requested by the <b>docid</b> servlet parameter by specifying
|
36 |
|
|
the document id that you wish to read.<br>
|
37 |
878
|
berkley
|
</p>
|
38 |
881
|
berkley
|
<p>
|
39 |
|
|
Metacat allows the dynamic transformation of read documents through the use
|
40 |
|
|
of style-sets. A style-set is an xsl stylesheet or a group of stylesheets
|
41 |
|
|
that are specified in a config file. The following is an example of a style-set
|
42 |
|
|
config file:
|
43 |
|
|
</p>
|
44 |
|
|
<pre>
|
45 |
|
|
<?xml version="1.0"?>
|
46 |
|
|
<style-set name="knb">
|
47 |
|
|
<default-style>http://http://server.domain.com/metacat/style/ascii-treeview.xsl</default-style>
|
48 |
|
|
<doctype publicid="-//NCEAS//resultset//EN">
|
49 |
|
|
<target publicid="-//W3C//HTML//EN">http://http://server.domain.com/metacat/style/resultset.xsl</target>
|
50 |
|
|
</doctype>
|
51 |
|
|
<doctype publicid="-//NCEAS//login//EN">
|
52 |
|
|
<target publicid="-//W3C//HTML//EN">http://http://server.domain.com/metacat/style/login.xsl</target>
|
53 |
|
|
</doctype>
|
54 |
|
|
<doctype publicid="-//NCEAS//eml-dataset-2.0//EN">
|
55 |
|
|
<target publicid="-//W3C//HTML//EN">http://http://server.domain.com/metacat/style/eml-dataset-display.xsl</target>
|
56 |
|
|
</doctype>
|
57 |
|
|
<doctype publicid="-//NCEAS//eml-dataset//EN">
|
58 |
|
|
<target publicid="-//W3C//HTML//EN">http://http://server.domain.com/metacat/style/eml-dataset-display.xsl</target>
|
59 |
|
|
</doctype>
|
60 |
|
|
<doctype publicid="-//NCEAS//eml-resource//EN">
|
61 |
|
|
<target publicid="-//W3C//HTML//EN">http://http://server.domain.com/metacat/style/eml-dataset-display.xsl</target>
|
62 |
|
|
</doctype>
|
63 |
|
|
<doctype publicid="-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN">
|
64 |
|
|
<target publicid="-//W3C//HTML//EN">http://http://server.domain.com/metacat/style/eml-dataset-display.xsl</target>
|
65 |
|
|
</doctype>
|
66 |
|
|
</style-set>
|
67 |
|
|
</pre>
|
68 |
878
|
berkley
|
|
69 |
881
|
berkley
|
<p>
|
70 |
|
|
Whenever a read action is requested from Metacat, you can also provide a qformat parameter.
|
71 |
|
|
This qformat parameter should be the name of the style-set that you wish to use
|
72 |
|
|
to transform the document you are requesting. Note that the value that you set
|
73 |
|
|
qformat to must equal the <style-set> name parameter.
|
74 |
878
|
berkley
|
</p>
|
75 |
|
|
<p>
|
76 |
881
|
berkley
|
A default style-set can be set in the metacat.properties file. If qformat
|
77 |
|
|
is set to 'html', Metacat will use the default. If qformat is set to 'xml',
|
78 |
|
|
Metacat will return the XML document untransformed.
|
79 |
878
|
berkley
|
</p>
|
80 |
|
|
<br>
|
81 |
|
|
<a href="./metacatquery.html">Back</a> | <a href="./metacattour.html">Home</a> |
|
82 |
2310
|
jones
|
<a href="./metacatgetlog.html">Next</a>
|
83 |
878
|
berkley
|
|
84 |
|
|
</BODY>
|
85 |
|
|
</HTML>
|