Demonstration Page

Revised: 09 Sep 2018
demo.xsl demo.css demo.xml Contents



" Not everything that can be counted counts, and not everything that counts can be counted. "
- Albert Einstein (1879-1955)


Notes:

The web page you are viewing has been rendered using four files:
  1. demo.xml
    Holds the content of the page - its text and images.
  2. demo.xsl
    Holds transformation templates that describe how to transform XML tagged items into HTML.
  3. demo.css
    Has style declarations that together form a theme - a group of related sizes and colors.
  4. demo.jpg
    Holds an image to be rendered within the generated HTML page.
This seperation is very useful. The web site I've built for all my classes uses this technique. Seperating content from styling lets me easily keep content up-to-date because it is not mixed in with lots of styling constructs.

Furthermore, now is it possible to have several different styling themes for different kinds of pages, simply by building a theme file for each of them, e.g., homeTheme, coursesTheme, codeTheme, etc.

Example:

The table below is defined in three files. Demo.xml declares the table, its rows, and its cells. Demo.xsl associates the XML declarations with HTML table constructs and classes that are defined in the styles file, demo.css.

Table

First
Second
Third
1
2
3
4
5
6