Oceanography 549--Communicating Ocean Science--Spring Quarter 1996

Announcements:

Serving Content to the Web

Typically, the developer(s) of content and the administrator(s) of a web site are not the same people. However there is a need for content developers to understand the structure of a server in order to establish links within a site.

The web is a client-server environment. Clients (i.e., browsers like Netscape, Mosaic or Lynx) make requests to servers, generally using http (hypertext transfer protocol). The server we use on tsunami (aka www.ocean.washington.edu) is NCSA's (NCSA developed Mosaic) httpd (hypertext transfer protocol daemon; a daemon is a Unix program that responds to requests...some other daemons are ftpd which responds to ftp requests, telnetd which responds to telnet requests and so on).

The key concept for the content developer is that of the Server Root, which on tsunami is the directory /www/htdocs. This means that when a client makes a request via the browser to retrieve the URL http://www.ocean.washington.edu/people/faculty/mcduff/mcduff.html the following things happen:

Within the document, there may be additional documents referenced: links to other documents and/or images to be imbedded in the document. These may be of three forms: You often see URL's pointing not to a file but to a directory; for example the URL for this course's home page which is http://www2.ocean.washington.edu/oc549/. What happens in this case? If there is a file called index.html in that directory, our server will deliver that document. If there is not a file called index.html in that directory, our server will list all the documents present in the directory.
You all have a directory in which you can place documents within the /www/htdocs hierarchy on tsunami. (I think!; if not let me know).

Scientific Markup (and Other Graphic Libraries)

Knowing about absolute addressing there are simple ways to add some graphical elements to your documents. The directory /www/htdocs/gifs contain some stock art which we can look at by going to http://www.ocean.washington.edu/gifs/. For instance a blue line can be inserted, (like in my own home page) with the image tag -----. Whoops, I mean <img src=/gifs/line.blue.gif alt=----->, a good lesson in itself; take a look a the source for this page. You can't use < and > in HTML because they have special meanings, you must use &lt; and &gt; instead. Similarly for " and & which also have special meaning in HTML; use &quot; and &amp; instead. This construction for special characters can also be used for generating symbols like degrees (° is generated by the code &#176;). A complete listing of these symbols is part of the HTML specification; but be aware that there are some non-standard ones also available, for example Netscape will render ‰ with the code &#137;.

Last time we deferred discussion about the problem of superscripts, subscripts and Greek letters. There are images suitable for constructing these in /www/htdocs/scigifs which we can look at by going to http://www.ocean.washington.edu/scigifs/ . Using these on a routine basis can be a pain and so I've written a filter so that I can write in a shorthand and run the filter to build the reference. For instance this shorthand would replace:

GRKalpha|

with

<img src=/scigifs/alpha.gif alt=alpha>

This filter is called subscigif; make sure that /usr/local/bin is in your path on tsunami.


Syntax Checking

One more topic for today: finding mistakes in your code. Weblint is a program that does syntax checking. It is also available on tsunami in /usr/local/bin. For example to check the HTML in a file index.html, use the command:

weblint index.html

Various options can be set, for instance to suppress messages for Netscape-specific extensions sue instead:

weblint -x netscape index.html

Options will be listed with: weblint -U


Ocean 549 Home

Oceanography 549 Pages
Russ McDuff (mcduff@ocean.washington.edu)
Copyright (©) 1996 University of Washington; Copyright Notice
Last Updated 4/23/96