AlexOlson.com
About This Website
1. If you were curious...

If you were curious about the way this website was made, continue reading... If not, then don't expect to be entralled.

2. So you are curious...

My first real attempt at this website involved only the use of PHP scripts. I had a common script for displaying a page and functions for displaying tables, links, etc. It worked fine but adding pages was really a pain. Adding pages was very tedious as I would write PHP files like this:

First Approach
<?php require ('shared/site.inc.php'); $page_title = "WELCOME"; // function PageLoad(){return true;} function PageMain() { echo <<<TEXT Welcome to my humble website. TEXT; echo "Would you like to visit: ".MakeExtLink('http://www.yahoo.com','Yahoo!')." today ?"; }

I used CSS for formatting and color. The approach above worked great for purely dynamic webpages.. But for static ones, it was very tedious.

3. The New Site

After learning a little XML, I have re-worked everything. Now just make a simple XML file using a structure well-suited for my needs. I still have PHP scripts though -- all they do is run the page through XSLT to produce a nice HTML. I even have a site-wide DTD file for validating pages.

While the initial learning was a bit tough, this new design will allow for much greater flexibility and ease of use. Even the floating menu is done entirely with XSLT and stored as a seperate XML file.

In short, if you are considering taking on such a task, I highly recommend it.

FYI, the beginning part of my XML file for this page looks like this:

Second Approach
<?xml version="1.0" encoding="ISO-8859-1"?> <page tag="about" > <header> <title> About This Website </title> <author> Alex Olson</author> </header> <body> <section title="If you were curious..."> <p> If you were curious about the way this website was made, continue reading... ... ... ...