Home


A Note about the Creation and Maintenance of this Website

For the most part, this is not a "dynamic" website. Most of the pages you are seeing are not generated by CGI scripts, Dynamic HTML (DHTML), Java Servlets, Java Server Pages (JSP), or any of the other technologies that allow the creation of pages by some type of "program" that is run when a page is requested. While these technologies are interesting, the site content simply doesn't vary enough to justify dynamic generation. (There is little value in applying a technology to a task just because you can.)

However, it is important to have the pages on this site have a common "look & feel." We want to have a similar page layout and some common content for each page of the site. We also want to be able to update the common content and have that update easily propagate throughout the site. (We certainly don't want to have to individually edit each page in order to update the common content or change the common page layout.)

There are some very sophisticated tools for creating websites and defining, maintaining, and updating common layout and content. Microsoft's FrontPage and Macromedia's Dreamweaver are two such tools that seem to be market leaders and have received some very good reviews. However, neither of these tools is inexpensive.

So we devised a simple technique for maintaining common content and common look & feel.

The technique is based on using XML, XSL and XSLT, the Xalan-Java XSLT processor, and the Ant Java based build tool.

Each page of this website is first written in XML instead of directly in HTML. Each XML <page> consists of

  • a <title>,
  • an<image>,
  • a <navigation> section,
  • a <banner>, and
  • a <content> section.

For example, the page you are viewing was originally written in XML which looks something like the following:


    <?xml version="1.0"?>
    <!DOCTYPE page [
      <!ENTITY Banner SYSTEM "...">
      <!ENTITY LocalLinks  SYSTEM "...">
      <!ENTITY GlobalLinks SYSTEM "...">
    ]>

    <page>
      <title>Bio-Behavior Analysis Systems, LLC</title>
      <image>images/BBAS_Icon.png</image>

      <navigation>
        <localLinks>
          &LocalLinks;
        </localLinks>

        <globalLinks>
          &GlobalLinks;
        </globalLinks>
      </navigation>

      <banner>
        <pureHTML>
          &Banner;
        </pureHTML>
      </banner>

      <content>
        <pureHTML>

          <div style="color: blue; font-size: 125%">
            A Note about the Creation and Maintenance of this Website
          </div>

          ...

        </pureHTML>
      </content>

    </page>

An XSL Stylesheet is then applied to the XML file to generate the fairly simple HTML file you are viewing. The stylesheet contains the common layout, and XML's entity mechanism is used to place common content (like a common set of links) in separate files which are "included" into the XML file. The uses of &GlobalLinks;, &LocalLinks;, and &Banner; seen above are examples of this simple "include" mechanism.

A collection of Ant buildfiles are written (in XML also) which invoke the Xalan-Java XSLT processor to apply stylesheets to the appropriate XML files to generate HTML files. This allows the entire site to be rebuilt via a single ant command whenever changes have been made to any of the common content or common layout.



© 2001-2010Bio-Behavior Analysis Systems, LLC