Directory and File Structure

One of the advantages of an XML-based Web site is that it simplifies routine maintenance by reducing the actual number of files to maintain. It does this by having the machine do the work of creating HTML pages. Whereas a typical Web site may have 5,000 pages and 5,000 HTML files corresponding to those pages, an XML-based Web site may produce those same 5,000 pages using a few dozen XSL files to produce the HTML "on the fly." Once the XSL files are created and in place, ongoing updates to the Web site consist primarily of adding new content. Since content resides in the XML source files, these updates can be as simple as uploading new XML files to the Web server.

With that in mind, it makes sense to design a directory structure that mirrors the structure and navigation of the Web site. For this Web site, the .asp and .xsl files that operate across the site have been placed iin the root directory. Then, sub-directories have been created for the main sections of the Web site (as reflected in the top navigation banner). Each sub-directory contains only the files pertinent to that section of the Web site: the .xml file containing the content and any associated graphic or supporting files. As content changes, a revised .xml file can simply be uploaded to the sub-directory.

The illustration below shows the actual directory and file structure of this Web site.

Directory and File Structure of this Web site

The files above will be explained in more detail in the other parts of this section of the Web site, but note that there are only 3 .xsl files in total and 1 .asp file for each major section of the Web site. In fact, it's even simpler than that because all those .asp files are identical. They just include the managexmlxsl.inc file which by itself controls all the navigation and file management of the site.

The illustration below shows what's inside one of the subdirectories (in this case, it's the "inside" subdirectory): the .xml file containing the content for that section along with the graphics and supporting files, if any.

Directory and File Structure of this Web site