1 |
553
|
tao
|
<?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$'
|
10 |
|
|
* '$Date$'
|
11 |
|
|
* '$Revision$'
|
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">dataset</xsl:param>
|
71 |
|
|
|
72 |
|
|
|
73 |
|
|
|
74 |
|
|
<!--
|
75 |
|
|
/**
|
76 |
|
|
* the path of the directory where the XSL and CSS files reside - starts
|
77 |
|
|
* with context name, eg: /myContextRoot/styleDirectory.
|
78 |
|
|
* (As found in "http://hostname:port/myContextRoot/styleDirectory").
|
79 |
|
|
* Needs leading slash but not trailing slash
|
80 |
|
|
*
|
81 |
|
|
* EXAMPLE:
|
82 |
|
|
* <xsl:param name="stylePath">/brooke/style</xsl:param>
|
83 |
|
|
*/
|
84 |
|
|
-->
|
85 |
|
|
|
86 |
|
|
<!--<xsl:param name="stylePath">@style-path@</xsl:param>-->
|
87 |
1668
|
tao
|
<xsl:param name="stylePath">@style-path@</xsl:param>
|
88 |
553
|
tao
|
|
89 |
1642
|
tao
|
<!--the docid of xml which is processed-->
|
90 |
|
|
<xsl:param name="docid"/>
|
91 |
|
|
<!-- type of entity, data table or spacial raster or others-->
|
92 |
|
|
<xsl:param name="entitytype"/>
|
93 |
|
|
<!-- the index of entity in same entity type -->
|
94 |
|
|
<xsl:param name="entityindex"/>
|
95 |
1643
|
tao
|
<!-- the index of physical part in entity part-->
|
96 |
|
|
<xsl:param name="physicalindex"/>
|
97 |
|
|
<!-- the index of distribution in physical part -->
|
98 |
|
|
<xsl:param name="distributionindex"/>
|
99 |
|
|
<!-- the index of attribute in attribute list-->
|
100 |
|
|
<xsl:param name="attributeindex"/>
|
101 |
553
|
tao
|
|
102 |
|
|
<!--
|
103 |
|
|
/**
|
104 |
|
|
* The base URI to be used for the href link to each document in a
|
105 |
|
|
* "subject-relationaship-object" triple
|
106 |
|
|
*
|
107 |
|
|
* EXAMPLE:
|
108 |
|
|
* <xsl:param name="tripleURI">
|
109 |
|
|
* <![CDATA[/brooke/servlet/metacat?action=read&qformat=knb&docid=]]>
|
110 |
|
|
* </xsl:param>
|
111 |
|
|
*
|
112 |
|
|
* (Note in the above case the "qformat=knb" parameter in the url; a system
|
113 |
|
|
* could pass this parameter to the XSLT engine to override the local
|
114 |
|
|
* <xsl:param name="qformat"> tags defined earlier in this document.)
|
115 |
|
|
*/
|
116 |
|
|
-->
|
117 |
|
|
|
118 |
|
|
<xsl:param name="tripleURI"><![CDATA[@html-path@/servlet/metacat?action=read&qformat=@default-style@&docid=]]></xsl:param>
|
119 |
|
|
|
120 |
|
|
|
121 |
|
|
<!--
|
122 |
|
|
/**
|
123 |
|
|
* Most of the html pages are currently laid out as a 2-column table, with
|
124 |
|
|
* highlights for more-major rows containing subsection titles etc.
|
125 |
|
|
* The following parameters are used within the
|
126 |
|
|
* <td width="whateverWidth" class="whateverClass">
|
127 |
|
|
* tags to define the column widths and (css) styles.
|
128 |
|
|
*
|
129 |
|
|
* The values of the "xxxColWidth" parameters can be percentages (need to
|
130 |
|
|
* include % sign) or pixels (number only). Note that if a width is defined
|
131 |
|
|
* in the CSS stylesheet (see next paragraph), it will override this local
|
132 |
|
|
* width setting in browsers newer than NN4
|
133 |
|
|
*
|
134 |
|
|
* The values of the "xxxColStyle" parameters refer to style definitions
|
135 |
|
|
* listed in the *.css stylesheet that is defined in this xsl document,
|
136 |
|
|
* above (in the <xsl:param name="qformat"> tag).
|
137 |
|
|
*
|
138 |
|
|
* (Note that if the "qformat" is changed from the default by passing a
|
139 |
|
|
* value in the url (see notes for <xsl:param name="qformat"> tag, above),
|
140 |
|
|
* then the params below must match style names in the "new" CSS stylesheet
|
141 |
|
|
*/
|
142 |
|
|
-->
|
143 |
|
|
|
144 |
|
|
<!-- the style for major rows containing subsection titles etc. -->
|
145 |
|
|
<xsl:param name="subHeaderStyle" select="'tablehead'"/>
|
146 |
|
|
|
147 |
|
|
<!-- the width for the first column (but see note above) -->
|
148 |
|
|
<xsl:param name="firstColWidth" select="'15%'"/>
|
149 |
|
|
|
150 |
|
|
<!-- the style for the first column -->
|
151 |
|
|
<xsl:param name="firstColStyle" select="'highlight'"/>
|
152 |
|
|
|
153 |
|
|
<!-- the width for the second column (but see note above) -->
|
154 |
|
|
<xsl:param name="secondColWidth" select="'85%'"/>
|
155 |
|
|
|
156 |
|
|
<!-- the style for the second column -->
|
157 |
|
|
<xsl:param name="secondColStyle" select="''"/>
|
158 |
|
|
|
159 |
|
|
<!-- Some html pages use a nested table in the second column.
|
160 |
|
|
Some of these nested tables set their first column to
|
161 |
|
|
the following width: -->
|
162 |
|
|
<xsl:param name="secondColIndent" select="'10%'"/>
|
163 |
|
|
|
164 |
|
|
</xsl:stylesheet>
|