Project

General

Profile

1 553 tao
<?xml version="1.0"?>
2
<!--
3
  *  '$RCSfile$'
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
  *
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
  * This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to
28
  * convert an XML file with information about login action
29
  * into an HTML format suitable for rendering with modern web browsers.
30
-->
31
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
32
  <xsl:output method="html"/>
33
34
  <xsl:template match="/">
35
    <html>
36
      <xsl:apply-templates/>
37
    </html>
38
  </xsl:template>
39
40
  <xsl:template match="*" name="login">
41
  <xsl:choose>
42
43
    <xsl:when test="name(self::node())='login'">
44
      <head>
45
        <link rel="stylesheet" type="text/css"
46
              href="@style-path@/rowcol.css" />
47
        <script language="JavaScript">
48
          <![CDATA[
49
          window.location="@html-path@/index.html"
50
          ]]>
51
        </script>
52
      </head>
53
      <body class="emlbody">
54
	<noscript>
55
          Please click <a href="@html-path@/metacat.html">here</a>
56
          to enter Metacat. To disable this message in the future
57
          please enable JavaScript on your browser.
58
        </noscript>
59
      </body>
60
    </xsl:when>
61
62
    <xsl:when test="name(self::node())='unauth_login'">
63
      <head>
64
        <link rel="stylesheet" type="text/css"
65
              href="@html-path@/style/rowcol.css" />
66
        <script language="JavaScript">
67
              <![CDATA[
68
              window.location="@html-path@/login.html"
69
              ]]>
70
        </script>
71
      </head>
72
      <body class="emlbody">
73
	<noscript>
74
              Please click <a href="@html-path@/login.html">here</a>
75
              to enter Metacat. To disable this message in the future
76
              please enable JavaScript on your browser.
77
        </noscript>
78
      </body>
79
    </xsl:when>
80
81
    <xsl:when test="name(self::node())='logout'">
82
      <head>
83
        <link rel="stylesheet" type="text/css"
84
              href="@html-path@/style/rowcol.css" />
85
        <script language="JavaScript">
86
              <![CDATA[
87
              window.location="@html-path@/index.html"
88
              ]]>
89
        </script>
90
      </head>
91
      <body class="emlbody">
92
        <noscript>
93
              Please click <a href="@html-path@/index.html">here</a>
94
              to enter Metacat. To disable this message in the future
95
              please enable JavaScript on your browser.
96
        </noscript>
97
      </body>
98
    </xsl:when>
99
100
    <xsl:when test="name(self::node())='error_login'">
101
      <head>
102
        <link rel="stylesheet" type="text/css"
103
              href="@html-path@/style/rowcol.css" />
104
      </head>
105
      <body class="emlbody">
106
        <p style="color:red"> <b> Error Page </b> </p>
107
        <p> <xsl:value-of select="message"/> </p>
108
        <p> <a href="@html-path@/login.html">Try again</a>
109
            <a href="@html-path@/index.html">Continue</a>  </p>
110
      </body>
111
    </xsl:when>
112
113
  </xsl:choose>
114
  </xsl:template>
115
116
</xsl:stylesheet>