The document discusses how Diazo, an XML-based theming engine for Plone, works. It begins with a naive mental model that does not accurately capture Diazo's processing and then presents a better mental model. The accurate model shows that Diazo rules are processed by an XSLT template into an output page. This involves recursively processing nodes and transforming the content based on the rules. Specific Diazo rules and their processing are also explained in detail.