Project

General

Profile

« Previous | Next » 

Revision 116

Added by Matt Jones over 24 years ago

moved shell scripts to bin dir, config files to lib dir

View differences:

rowcol.css
1
 .page    {font-family: Tahoma, sans-serif; background-color:white}
2
 .emlbody    {font-family: Tahoma, sans-serif; background-color:white}
3
 .rowodd  {background-color: #CCCCCC; color: black; vertical-align: top}
4
 .roweven {background-color: #F8F8F8; color: black; vertical-align: top}
5
 .rowlight {background-color: #CCCCFF; color: black; vertical-align: top}
6
 .rowwhite {background-color: #FFFFFF; color: black; vertical-align: top}
7
 .coleven {}
8
 .colodd  {}
9
 .shaded  {background-color: #DDDDDD; color: black}
10 0

  
resultset.xsl
1
<?xml version="1.0"?>
2
<!--
3
  * resultset.xsl
4
  *
5
  *      Authors: Matt Jones
6
  *    Copyright: 2000 Regents of the University of California and the 
7
  *               National Center for Ecological Analysis and Synthesis
8
  *  For Details: http://www.nceas.ucsb.edu/
9
  *      Created: 2000 April 5
10
  *    File Info: '$Id$'
11
  *
12
  * This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to
13
  * convert an XML file showing the resultset of a query
14
  * into an HTML format suitable for rendering with modern web browsers.
15
-->
16
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
17

  
18
  <xsl:output method="html"/>
19

  
20
  <xsl:template match="/">
21
    <html>
22
      <head>
23
	<link rel="stylesheet" type="text/css" href="/xmltodb/rowcol.css" />
24
      </head>
25
      <body class="emlbody">
26
	<center>
27
          <b>Query Results</b>
28
          for query <xsl:value-of select="resultset/query"/>
29
        </center>
30
        
31
        <form action="/servlets/MetaCatServlet" method="POST">
32
        <input type="hidden" name="action" value="getdocument"/>
33

  
34
        <xsl:text>Output Format: </xsl:text>
35
        <select name="qformat">
36
          <option value="html">HTML</option>
37
          <option value="xml">XML</option>
38
        </select>
39

  
40
        <table width="100%">
41
        <tr class="rowodd">
42
        <th>&nbsp;</th>
43
        <th><xsl:text>Title</xsl:text></th>
44
        <th><xsl:text>Document</xsl:text></th>
45
        <th><xsl:text>Document Type</xsl:text></th>
46
        </tr>
47

  
48
        <xsl:for-each select="resultset/document">
49
          <tr valign="top">
50
            <xsl:attribute name="class">
51
              <xsl:choose>
52
                <xsl:when test="position() mod 2 = 1">rowwhite</xsl:when>
53
                <xsl:when test="position() mod 2 = 0">rowlight</xsl:when>
54
              </xsl:choose>
55
            </xsl:attribute>
56

  
57
          <td>
58
<!--
59
              <input type="radio" name="docid">
60
                <xsl:attribute name="value">
61
                  <xsl:value-of select="./docid"/>
62
                </xsl:attribute>
63
              </input>
64
              <input type="submit" value="Display"/>
65
-->
66
              <input border="0" type="image">
67
                <xsl:attribute name="src">
68
                  <xsl:choose>
69
                    <xsl:when test="position() 
70
                         mod 2 = 1">/xmltodb/images/bttns-white.png</xsl:when>
71
                    <xsl:when test="position() 
72
                         mod 2 = 0">/xmltodb/images/bttns-blue.jpg</xsl:when>
73
                  </xsl:choose>
74
                </xsl:attribute>
75
                <xsl:attribute name="name">
76
                  <xsl:value-of select="./docid"/>
77
                </xsl:attribute>
78
              </input>
79
          </td>
80
          <td><xsl:value-of select="./doctitle"/>
81
              <xsl:text>&nbsp;</xsl:text>
82
         </td>
83
          <td>
84
              <xsl:value-of select="./docname"/> 
85
              <xsl:text> </xsl:text>
86
              <xsl:value-of select="./docid"/>
87
              <xsl:text>&nbsp;</xsl:text>
88
          </td>
89
          <td><xsl:value-of select="./doctype"/>
90
              <xsl:text>&nbsp;</xsl:text>
91
         </td>
92
          </tr>
93
        </xsl:for-each>
94
        </table>
95
        </form>
96

  
97
      </body>
98
    </html>
99
  </xsl:template>
100

  
101
</xsl:stylesheet>
102 0

  
loadxml
1
#!/bin/sh
2
export CPATH=/home/httpd/servlets/xsql/lib/xmlparserv2.jar:${ORACLE_HOME}/jdbc/lib/classes111.zip:/usr/lib/apache/ApacheJServ.jar:/home/httpd/classes/servlet-2.0.jar:./classes
3
export USER=jones
4
export PW=your-pw-goes-here
5
export DBC=jdbc:oracle:thin:@localhost:1521:test
6

  
7
java -cp ${CPATH} edu.ucsb.nceas.metacat.DBSAXWriter $1 $USER $PW $DBC
8 0

  
build.xml
27 27
      <property name="jsdk" 
28 28
                value="/home/httpd/classes/servlet-2.0.jar" />
29 29
      <property name="cat" 
30
                value="catalog.jar" />
30
                value="lib/catalog.jar" />
31 31
      <property name="cpath" 
32 32
                value="${xmlp}:${jdbc}:${jserv}:${jsdk}:${cat}" />
33 33
      <property name="metacat.home" value="edu/ucsb/nceas/metacat" />
......
39 39
       <javac srcdir="${src.metacat.home}" 
40 40
              destdir="${classesdir}" 
41 41
              classpath="${cpath}" /> 
42
       <copyfile src="metacat.properties" 
42
       <copyfile src="lib/metacat.properties" 
43 43
                 dest="${classesdir}/${metacat.home}/metacat.properties" />
44 44
   </target> 
45 45

  
46 46
   <target name="install" depends="init,compileServlet">
47
       <delete file="metacat.jar" />
48
       <jar jarfile="metacat.jar" basedir="${classesdir}"  />
47
       <delete file="lib/metacat.jar" />
48
       <jar jarfile="lib/metacat.jar" basedir="${classesdir}"  />
49 49
       <!-- copy the file here to the web install dir -->
50 50
   </target> 
51 51

  
52 52
   <target name="clean" depends="init">
53
       <delete file="XMLClient.jar" />
53
       <delete file="lib/metacat.jar" />
54 54
       <deltree dir="${classesdir}" />
55 55
   </target>
56 56

  

Also available in: Unified diff