Home

Castle Stronghold

How Castle Anakia works

The sections below gives an overall explanation of the inner working of Castle Anakia.

The process

The NAnt task runs against a content folder, recursively. An object model is constructed and populated to reflect that structure. See the figure below.

Each physical folder will be represented by a Folder instance. A Folder holds a collection of DocumentNodes. Each DocumentNode has a type:

A set of visitors transverse the object model to create the site map, breadcrumbs and finally the html files.

The transformation

The transformation of the xml content is handled by a NVelocity template. The following context entries are made available to the template:

Context entry nameDescription
breadcrumbsList of BreadCrumb instances. Each BreadCrumb has a Title and a Relative property that allow you to generate the links
metaInstance of DocumentMeta which is created for each document content based on the properties node
rootThe XmlElement for the current content file
nodeThe DocumentNode instance for the content file
sitemapA XmlElement for the generated sitemap
projectA XmlElement for the project.xml
folderThe Folder instance
converterAn instance of SimpleConverter that is able to convert strings to different types
helperAn instance of SimpleHelper
navigationA XmlElement with the content of navigation.xml
relativePathThe relative path to access the root folder.

Google
Search WWW Search castleproject.org