Outer Court

Tech - ASP - XML Sitemap Creator

(Following files are freeware.)

Last update March 2002:
The sitemap output is now sorted (using the XSLT order-by attribute).


These files create sitemaps based on the file-system folders and files, using ASP/ VBScript/ XML, XSLT & XPath (via IIS and MSXML3).

To map your own site (or file-system structure in general), you need to have a Personal WebServer/ IIS to run ASPs. Edit the file "config.xml". You can also directly access the class "classFileSystemTree" found in "fileSystemTree.asp" (also see "sitemap.asp", which instantiates a fileSystemTree object). The properties are found in the public part of the class, or use the "config.xml" file as reference.

The additional configuration files "file_exclusions.xml" and "file_types.xml" determine which files are to be excluded from mapping, and which icons are assigned to which file-extensions.

After you configured the data, start the file "index_dynamic.htm" of this folder via HTTP.

Technical background

The page "index_dynamic.htm" is XHTML Frameset. The left frame points to "sitemap.asp". The script instantiates the VBScript classFileSystemTree class. The object loads its default properties by the class_initialize sub-function, overwrites these by the "config.xml" node-texts (if provided) and assigns it to its private members via the property let methods. (Private members, which are global to the class but shielded to the outside, use the "m_" prefix.) Then, the method "create" is called. Afterwards, the XML-Tree is in the object memory, and also saved to disk as "tree.xml" for further use. Finally, the sub-function "handleFileSystemDisplay" gets the objects XHTML. This is created using the XSL transformation template provided in the configuration ("xhtml.xsl" by default). The final output, which by default uses Internet Explorer 5 scripting (since JScript5/ client-side DOM + XML support is needed) is converted to a string and send as ASP response to the browser. You can also use client-side conversion by simply having the file "tree.xml" be displayed in the browser. Client-side conversion might mean there's less data to transmit, but more work for the client to do. (Start "index_client.htm" to see this.) Starting the file "index.htm" will bring the browser to the already processed output; it's the fastest, but will not adapt to changes in the file-system structure.

Here's what a folder-element looks like:


<folder
        name="cssml"
        path="/tech/cssml"
>
    ...
</folder>

Here's what a file-element looks like:


<file
        name="css2cssml.vbp"
        path="/tech/cssml/css2cssml.vbp"
        sizeKB="1"
        dateLastModified="07.11.00"
        type="default"
/>

To create your own tree, you can write additional XSLTs to do the job. If you need more information provided in the file-system-tree generated, turn on the boolean option "includeDetails" in either the "config.xml" file, or by scripting ASP which assigns this object property dynamically. Additional attributes provided when "includeDetails" is set to true are (for both folder- and file-elements):

And, for the folder-node (because this is included in the file-node by default):

(Dates are always given as short-dates without the time.)

Continue with ASP Project Parser

 

Sitemap output

Basic
Goodies
Design
Tech
Email
Make a donation