From a5a69130edaadd96faaf2d4a3c863531837eaedd Mon Sep 17 00:00:00 2001
From: Stefanus Du Toit More operating systems may be available.
+
+
+ Let's now suppose we want to add a page detailing what operating
+ systems the CSC distributes through its CD-burning. First, we go
+ to the appropriate directory, in this case probably
+ www/office
. Here we now open a new file called
+ operating-systems.xml
in our favourite text editor
+ (emacs, of course). Take note that the filename ends in
+ .xml
. All CSC web pages should have this file
+ ending.
+
+ The next thing to do is to add a few standard XML things to the + file. We add the two lines: +
+
+ <xml version='1.0'>
+ <!DOCTYPE cscpage SYSTEM "../csc.dtd">
+
+
+ Note the reference to the file ../csc.dtd
. This
+ file is located in the www/
directory, which is the
+ parent directory of www/office/
, therefore we use
+ ../
. These two lines should appear at the top of
+ every CSC web page.
+
+ Next we start the actual page. To begin, we open a
+ cscpage
tag with the title attribute set to the
+ title of our page. We also want to add a header with the CSC
+ logo, the current section directory and the title of the
+ page. Don't worry though, as you'll see this is really easy. Add
+ the following two lines to the end of the page:
+
+ <cscpage title="Operating Systems the CSC
+ distributes">
+ <header />
+
+
+ That's it! So we can see what our page looks like so far, we
+ also add the footer (with the menu, generation date, and
+ copyright information) and we close the cscpage
+ tag. Add the following lines to the end:
+
+ <footer />
+ </cscpage>
+
+
+ Notice how in the case of header
and
+ footer
we have a /
before the
+ >
? This is one of the major differences between
+ HTML and XML: tags that don't really have an end tag, such as
+ <br>
have to be specified as being
+ empty in XML by adding a /
before the
+ >
. This is particularily important to remember
+ when you add XHTML (XML's version of HTML) to the page.
+
+ Now we want to see what the resulting HTML page looks like. But
+ first we have to tell make
about our new page. To
+ do so, open up the file www/office/Makefile
, find
+ the line beginning with INPUTS =
and simply add
+ operating-systems.xml
to the end of that line. So
+ the line might look like INPUTS = index.html staff.xml
+ books.xml operating-systems.xml
. Save
+ Makefile
and close it. Now, in the
+ www/
directory, type make
. This will
+ build the whole website, (hopefully!) including our little
+ document. Once make
is done, have a look at the
+ resulting file,
+ www/office/operating-systems.html
. It should look
+ like example
+ 1 (use your browsers Back button to return to this page
+ after viewing the example).
+
+ Looking at the generated page, you may have noticed that it does
+ not yet appear in the menu at the top of the page. Opening up
+ the special file www/office/directory.xml
you will
+ see several entries, each corresponding to one of the menu
+ items. After the last line beginning with
+ <diritem
, add in the following line:
+
+ <diritem title=""Operating Systems"
+ href="operating-systems.html" />
+
+
+ Now recompile the site with make
. You should see
+ that the page now looks something like example
+ 2. Also note that all the other office pages will now have a
+ reference to the new operating systems page.
+
+ With that out of the way, it's time to add some content. You may
+ be happy to hear that you can add regular (X)HTML to any CSC web
+ page. So, we'll add the following content between the
+ <header />
and <footer />
+ of the page:
+
+ <section title="List of operating systems">
+ <ul>
+ <li><a href="http://www.debian.org/">Debian GNU/Linux</a></li>
+ <li><a href="http://www.freebsd.org/">FreeBSD</a></li>
+ </ul>
+ <p>More operating systems may be available.</p>
+ </section>
+
+
+ As usual, compile your changes using make
and have
+ a look. The resulting file should look something like example 3. A
+ few things to keep in mind are:
+
<br/>
is good
+ whereas <BR/>
is bad.
+ <tag/>
syntax. For
+ example: <ul> <li>Item
+ 1<br/>Linebreak</li> <li>Item
+ 2</li></ul>
is good, whereas
+ <ul> <li>Item
+ 1<br>Linebreak <li>Item 2</ul>
is bad.
+ <section>
+ tags. You can have as many section as you want on the page.
+ - To be added... + The CSC Office is located at room MC3036/3037, in the Math & + Computer Building of the University of Waterloo. The office is open + whenever office staff are around to keep it + open, which basically means it is open most of the time. At the + office we have lots of books, a couple of + computer terminals, and most of the time an array of knowledgeable + people to talk to and ask questions. +
++ One of our most popular services at the office is providing anybody + with CD copies of Free Software and Open Source operating system + distributions (including, but by no means limited to, Debian + GNU/Linux, Mandrake Linux, Red Hat Linux, FreeBSD and NetBSD for + various architectures). The cost is $1.50 per CD at the time of + this writing, or free if you provide your own CDs. +
++ Another favourite is our $0.50 pop for members. We have a fridge in + the office which is at most times stocked with many different kinds + of pop cans. +
++ We can always use good office staff, so if + you're interested in helping out, just come by the office and chat + to somebody there, and the office manager will probably give you + something to do.