ID: 33-cd | Version: 1 | Date: 9/12/05 4:25:37 AM
This document wil describe the process of how a document gets published by Daisy. What follows below are
some first rough notes.
The publishing process is split between a "Publisher" extension component running in the repository server
and the frontend running on Cocoon.
The goal of the Publisher component is to gather all information needed to publish a document and return
the result to Cocoon as an XML document. This avoids a lot of relatively expensive remote calls that would
otherwise need to happen. More specifically, here's what the Publisher component does:
It starts from the document XML (containing the data of the requested version: the live version, the last
version, or some other version)
For fields and parts, the label of the fields and parts is added to the XML, according to the user's locale.
Field values are also formatted using the user's locale.
For "Daisy HTML" parts, the content of those parts is retrieved, parsed and inserted into the XML
• Queries and query-includes embedded in the document are processed
Includes are processed, and for included documents, the same operations happen again: merging parts,
processing queries and includes, ... It is also here that detection of recursive includes happens.
Links and images having "daisy:" URLs are augmented with the name of the document.
The navigation tree is also added to the output
Included documents are not directly inserted at the location of inclusion, rather they will added "side by side"
to the output. This is to allow to execute different XSLs on them on the Cocoon side.
All this processing is done streaming (SAX). (with the exception of some parsing results that are first pushed
into buffers -- SaxBuffer instances -- to gracefully handle parsing exceptions)
Cocoon then performs the following tasks:
The XML retrieved from the Publisher is split into multiple parts: one for general information, and then
one for each document (the main d