XML Document "Flow"

There is one root node, commonly named either "ROOT" or "R", so you'll likely see xpaths like this:

/_R_/path/to/node

The root node name is customizable though, so your application or sites can use whatever you want.

Template Processing Order

This is a little confusing, but actually works well:

Sitemap loads a page specific template.

Page template loads another template usually called "main.xsl" or "html_main.xsl".

The main template then loads in all the other parts, including the outermost template, usually named "html_shell.xsl".

The outermost template is the one that initiates the template transformation process by matching the single root node.