Project

General

Profile

metacat / lib / style / skins / metacatui / eml-2 / eml-settings.xsl @ 8077

1
<?xml version="1.0"?>
2
<!--
3
  *  '$RCSfile$'
4
  *      Authors: Matthew Brooke
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
  *
9
  *   '$Author: leinfelder $'
10
  *     '$Date: 2013-07-25 15:55:14 -0700 (Thu, 25 Jul 2013) $'
11
  * '$Revision: 8077 $'
12
  *
13
  * This program is free software; you can redistribute it and/or modify
14
  * it under the terms of the GNU General Public License as published by
15
  * the Free Software Foundation; either version 2 of the License, or
16
  * (at your option) any later version.
17
  *
18
  * This program is distributed in the hope that it will be useful,
19
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
  * GNU General Public License for more details.
22
  *
23
  * You should have received a copy of the GNU General Public License
24
  * along with this program; if not, write to the Free Software
25
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26
  *
27
  *****************************************************************************
28
  *
29
  * This is an XSLT (http://www.w3.org/TR/xslt) stylesheet that provides a
30
  * single, central location for setting all installation-specific paths for
31
  * XSLT stylesheets.  It is intended to be imported (using the
32
  * <xsl:import href="..." /> element) into other XSLT stylesheets used in the
33
  * transformation of xml files that are valid with respect to the
34
  * applicable dtd of the Ecological Metadata Language (EML).
35

    
36
  * Some of these paths incorporate values of the form: @token-name@; these are
37
  * intended to allow an Ant (http://jakarta.apache.org/ant/index.html) build
38
  * script to replace the tokens automatically with the correct values at build/
39
  * install time.  If Ant is not used, the tokens may simply be edited by hand
40
  * to point to the correct resources.
41
  * Note that the values given below may be overridden by passing parameters to
42
  * the XSLT processor programatically, although the procedure for doing so is
43
  * vendor-specific.  Note also that these parameter definitions will be overridden
44
  * by any identical parameter names declared within xsl stylesheets that import
45
  * this stylesheet.
46
  *
47
-->
48

    
49
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
50

    
51

    
52
<!--
53
    /**
54
    *   The filename of the default css stylesheet to be used
55
    *   (filename only - not the whole path, and no ".css" extension.  The
56
    *   example below would look for a file named "default.css" in the same
57
    *   directory as the stylesheets
58
    */
59
-->
60

    
61
  <xsl:param name="qformat">default</xsl:param>
62

    
63

    
64
<!--
65
    /**
66
    *   The module which need to be display in eml2 document. The default
67
    *   value is dataset
68
    */
69
-->
70
  <xsl:param name="displaymodule">printall</xsl:param>
71

    
72

    
73
<!--
74
    /**
75
    *   To show the links for the Entities in the dataset display module.
76
    */
77
-->
78
  <xsl:param name="withEntityLinks">1</xsl:param>
79

    
80

    
81
<!--
82
    /**
83
    *   To show the link for Additional Metadata in the dataset display module.
84
    */
85
-->
86
  <xsl:param name="withAdditionalMetadataLink">1</xsl:param>
87

    
88

    
89
<!--
90
    /**
91
    *   To show the link for the Original XML in the dataset display module.
92
    */
93
-->
94
  <xsl:param name="withOriginalXMLLink">1</xsl:param>
95

    
96

    
97
<!--
98
    /**
99
    *   To show any html links (emails and webpage).
100
    */
101
-->
102
  <xsl:param name="withHTMLLinks">1</xsl:param>
103

    
104
<!--
105
    /**
106
    *   To show the Attributes table in the entity display.
107
    */
108
-->
109
  <xsl:param name="withAttributes">1</xsl:param>
110

    
111
<!--
112
    /**
113
    *   To insert templates where header and footer are defined.
114
    */
115
-->
116
  <xsl:param name="insertTemplate">1</xsl:param>
117

    
118

    
119
<!--the docid of xml which is processed-->
120
    <xsl:param name="docid"/>
121
<!-- type of entity, data table or spacial raster or others-->
122
    <xsl:param name="entitytype"></xsl:param>
123
<!-- the index of entity in same entity type -->
124
    <xsl:param name="entityindex"/>
125
<!-- the index of attribute in same entity -->
126
    <xsl:param name="attributeindex"/>
127
<!-- the index of physical part in entity part-->
128
    <xsl:param name="physicalindex"/>
129
<!-- the index of distribution in physical part  -->
130
    <xsl:param name="distributionindex"/>
131
<!-- the levle of distribution -->
132
    <xsl:param name="distributionlevel"/>
133
<!-- the index of additional metadata-->
134
    <xsl:param name="additionalmetadataindex">1</xsl:param>
135
<!-- attribute set to get rid of cell spacing-->
136
    <xsl:attribute-set name="cellspacing">
137
      <xsl:attribute name="cellpadding">0</xsl:attribute>
138
      <xsl:attribute name="cellspacing">0</xsl:attribute>
139
    </xsl:attribute-set>
140

    
141
<!-- determines whether to use metacat or LSID identiers-->
142
	<xsl:param name="lsidauthority"></xsl:param>
143
<!-- the url for the data registry of the dataset-->
144
	<xsl:param name="registryurl"></xsl:param>
145
<!-- the name of the data registry of the dataset-->
146
	<xsl:param name="registryname"></xsl:param>
147

    
148
  
149
<!-- for getting the server context and cgi locations -->  
150
  <xsl:param name="contextURL"/>
151
  <xsl:param name="cgi-prefix"/>
152
  
153
<!-- for access to "protected" documents/files -->  
154
  <xsl:param name="sessionid"/>
155
  
156
  
157
<!--
158
    /**
159
    *   The base URI to be used for the href link to each document in a
160
    *   "subject-relationaship-object" triple
161
    *
162
    *   EXAMPLE:
163
    *       <xsl:param name="tripleURI">
164
    *         <![CDATA[/brooke/servlet/metacat?action=read&qformat=knb&docid=]]>
165
    *       </xsl:param>
166
    *
167
    *   (Note in the above case the "qformat=knb" parameter in the url; a system
168
    *   could pass this parameter to the XSLT engine to override the local
169
    *   <xsl:param name="qformat"> tags defined earlier in this document.)
170
    */
171
-->
172

    
173
  <xsl:param name="tripleURI"><xsl:value-of select="$contextURL" /><![CDATA[/metacat?action=read&qformat=]]><xsl:value-of select="$qformat" /><![CDATA[&sessionid=]]><xsl:value-of select="$sessionid" /><![CDATA[&docid=]]></xsl:param>
174

    
175
    <!-- URL for xmlformat-->
176
    <xsl:param name="xmlURI"><xsl:value-of select="$contextURL" /><![CDATA[/metacat?action=read&qformat=xml]]><![CDATA[&sessionid=]]><xsl:value-of select="$sessionid" /><![CDATA[&docid=]]></xsl:param>
177

    
178

    
179
<!--
180
    /**
181
    *   Most of the html pages are currently laid out as a 2-column table, with
182
    *   highlights for more-major rows containing subsection titles etc.
183
    *   The following parameters are used within the
184
    *           <td width="whateverWidth" class="whateverClass">
185
    *   tags to define the column widths and (css) styles.
186
    *
187
    *   The values of the "xxxColWidth" parameters can be percentages (need to
188
    *   include % sign) or pixels (number only). Note that if a width is defined
189
    *   in the CSS stylesheet (see next paragraph), it will override this local
190
    *   width setting in browsers newer than NN4
191
    *
192
    *   The values of the "xxxColStyle" parameters refer to style definitions
193
    *   listed in the *.css stylesheet that is defined in this xsl document,
194
    *   above (in the <xsl:param name="qformat"> tag).
195
    *
196
    *   (Note that if the "qformat" is changed from the default by passing a
197
    *   value in the url (see notes for <xsl:param name="qformat"> tag, above),
198
    *   then the params below must match style names in the "new" CSS stylesheet
199
    */
200
-->
201

    
202
<!--    the style for major rows containing subsection titles etc. -->
203
  <xsl:param name="subHeaderStyle" select="'tablehead'"/>
204

    
205
<!--    the style for major rows containing links, such as additional metadata,
206
        original xml file etc. -->
207
  <xsl:param name="linkedHeaderStyle" select="'linkedHeaderStyle'"/>
208

    
209
<!--    the width for the first column (but see note above) -->
210
  <xsl:param name="firstColWidth" select="'15%'"/>
211

    
212
<!-- the style for the first column -->
213
  <xsl:param name="firstColStyle" select="'rowodd'"/>
214

    
215
<!--    the width for the second column (but see note above) -->
216
  <xsl:param name="secondColWidth" select="'85%'"/>
217

    
218
<!-- the style for the second column -->
219
  <xsl:param name="secondColStyle" select="'roweven'"/>
220

    
221
<!-- the style for the attribute table -->
222
  <xsl:param name="tableattributeStyle" select="'tableattribute'"/>
223

    
224
<!-- the style for the border -->
225
  <xsl:param name="borderStyle" select="'bordered'"/>
226

    
227
<!-- the style for the even col in attributes table -->
228
  <xsl:param name="colevenStyle" select="'coleven'"/>
229

    
230
<!-- the style for the inner even col in attributes table -->
231
  <xsl:param name="innercolevenStyle" select="'innercoleven'"/>
232

    
233
<!-- the style for the odd col in attributes table -->
234
  <xsl:param name="coloddStyle" select="'colodd'"/>
235

    
236
<!-- the style for the inner odd col in attributes table -->
237
  <xsl:param name="innercoloddStyle" select="'innercolodd'"/>
238

    
239

    
240
<!-- the default alignment style for the wrapper around the main tables -->
241
  <!--
242
  <xsl:param name="mainTableAligmentStyle" select="'mainTableAligmentStyle'"/>
243
  -->
244
  <xsl:param name="mainTableAligmentStyle" select="'content'"/>
245

    
246
<!-- the default style for the main container table -->
247
  <xsl:param name="mainContainerTableStyle" select="'group group_border'"/>
248

    
249
<!-- the default style for all other tables -->
250
  <xsl:param name="tabledefaultStyle" select="'subGroup subGroup_border onehundred_percent'"/>
251

    
252
<!-- the style for table party -->
253
  <xsl:param name="tablepartyStyle" select="'tableparty'"/>
254

    
255
<!-- Some html pages use a nested table in the second column.
256
     Some of these nested tables set their first column to
257
     the following width: -->
258
  <xsl:param name="secondColIndent" select="'10%'"/>
259

    
260
<!-- the first column width of attribute table-->
261
  <xsl:param name="attributefirstColWidth" select="'15%'"/>
262

    
263
<!--
264
   /**
265
    *   the path of the directory where the XSL and CSS files reside - starts
266
    *   with context name, eg: /myContextRoot/styleDirectory.
267
    *   (As found in "http://hostname:port/myContextRoot/styleDirectory").
268
    *   Needs leading slash but not trailing slash
269
    *
270
    *   EXAMPLE:
271
    *       <xsl:param name="stylePath">/brooke/style</xsl:param>
272
    */
273
-->
274

    
275
    <xsl:param name="stylePath"><xsl:value-of select="$contextURL" />/style/skins</xsl:param>
276

    
277

    
278
<!--
279
   /*
280
    *   the path of the directory where the common javascript and css files
281
    *   reside - i.e the files that are not skin-specific. Starts
282
    *   with context name, eg: /myContextRoot/styleCommonDirectory.
283
    *   (As found in "http://hostname:port/myContextRoot/styleCommonDirectory").
284
    *
285
    *   EXAMPLE
286
    *       <xsl:param name="styleCommonPath">/brooke/style/common</xsl:param>
287
    */
288
-->
289

    
290
    <xsl:param name="styleCommonPath"><xsl:value-of select="$contextURL" />/style/common</xsl:param>
291

    
292
</xsl:stylesheet>