Revision 566
Added by Matt Jones over 23 years ago
resultset.xsl | ||
---|---|---|
116 | 116 |
<p><pre>Document ID: <xsl:value-of select="./docid"/></pre></p> |
117 | 117 |
</td> |
118 | 118 |
<td> |
119 |
<form action="@html-path@/servlet/marine" method="POST">
|
|
119 |
<form action="@html-path@/servlet/metacat" method="POST">
|
|
120 | 120 |
<xsl:attribute name="name"> |
121 |
<xsl:value-of select="translate(./docid,':','')"/>
|
|
121 |
<xsl:value-of select="translate(./docid,'.','')"/>
|
|
122 | 122 |
</xsl:attribute> |
123 | 123 |
<!-- abstractpath tells the servlet where the abstract is in |
124 | 124 |
the document. The % sign is used because the path could |
125 | 125 |
be resource/literature or resource/dataset. --> |
126 | 126 |
<input type="hidden" name="abstractpath" |
127 | 127 |
value="resource/%/abstract" /> |
128 |
<input type="hidden" name="action" value="getdocument"/>
|
|
128 |
<input type="hidden" name="action" value="read"/>
|
|
129 | 129 |
<input type="hidden" name="docid"> |
130 | 130 |
<xsl:attribute name="value"> |
131 | 131 |
<xsl:value-of select="./docid"/> |
... | ... | |
140 | 140 |
</xsl:for-each> |
141 | 141 |
|
142 | 142 |
<a> |
143 |
<xsl:attribute name="href">javascript:submitform('getdocument',document.<xsl:value-of select="translate(./docid, ':', '')"/>)</xsl:attribute>
|
|
143 |
<xsl:attribute name="href">javascript:submitform('read',document.<xsl:value-of select="translate(./docid, '.', '')"/>)</xsl:attribute>
|
|
144 | 144 |
Dataset Information |
145 | 145 |
</a><br /> |
146 | 146 |
<a> |
147 |
<xsl:attribute name="href">javascript:submitform('getabstract',document.<xsl:value-of select="translate(./docid,':','')"/>)</xsl:attribute>
|
|
147 |
<xsl:attribute name="href">javascript:submitform('getabstract',document.<xsl:value-of select="translate(./docid,'.','')"/>)</xsl:attribute>
|
|
148 | 148 |
View Abstract |
149 | 149 |
</a><br /> |
150 | 150 |
<a> |
151 |
<xsl:attribute name="href">javascript:submitform('getdatadoc',document.<xsl:value-of select="translate(./docid,':','')"/>)</xsl:attribute>
|
|
151 |
<xsl:attribute name="href">javascript:submitform('getdatadoc',document.<xsl:value-of select="translate(./docid,'.','')"/>)</xsl:attribute>
|
|
152 | 152 |
Download Data and Metadata |
153 | 153 |
</a><br /> |
154 | 154 |
</form> |
... | ... | |
198 | 198 |
</xsl:if> |
199 | 199 |
<xsl:if test="starts-with(./relationdoc, 'metacat')"> |
200 | 200 |
<xsl:attribute name="href"> |
201 |
<xsl:text>http://dev.nceas.ucsb.edu@html-path@/servlet/marine/?action=getrelateddocument&qformat=html&url=</xsl:text>
|
|
201 |
<xsl:text>http://dev.nceas.ucsb.edu@html-path@/servlet/metacat/?action=read&qformat=html&docid=</xsl:text>
|
|
202 | 202 |
<xsl:value-of select="./relationdoc" /> |
203 | 203 |
</xsl:attribute> |
204 | 204 |
<xsl:if |
Also available in: Unified diff
Modified stylesheets and server code to use a single "read" action instead
of the earlier "getdocument" and "getrelateddocument" actions. In the
process, developed and started to utilize a new suite of URL "protocol
handlers" that are in the package "edu.ucsb.nceas.protocols" and handle
the parsing of various forms of URLS (mainly metacat:// protocol URLS). New
protocols can be added by following the model for the metacat protocol handler.
Using this mechanism, the standard URL handling methods like "getProtocol()"
can be used, and I added the "parseQuery()" method to MetaCatUtil for
parsing query parameters into name/value pairs and returning a hashtable.
I've eliminated the use of the MetacatURL class from the main Metacat servlet
classes, but not yet from the replication server classes (because I don't
understand the implications of doing so yet).