Daisy documentation
 PreviousHomeNext 
4.12.2 The publisher request formatBook Index4.12.4 Testing a publisher request

4.12.3 Concepts

4.12.3.1 Two kinds of publisher requests

A publisher request takes the form of an XML document, describing the various stuff you want the publisher to return. The publisher request is send to the Publisher component, and the Publisher answers with a big XML response.

Next to the publisher requests that are sent to the Publisher, the Publisher can also execute additional publisher requests as part of the p:preparedDocuments instruction. These additional publisher requests are stored in a directory accessible by the Publisher, usually this is:

<repodata dir>/pubreqs/

The format of these publisher requests is exactly the same.

4.12.3.2 Context document stack

The p:document instruction in a a publisher request pushes a document on the context document stack. A good part of the publisher instructions need a context document based on which they will work.

In expressions or in queries (such as in p:performQuery), the context document stack can be accessed using the ContextDoc(expr[, level]) function. The optional level argument of the ContextDoc function describes how high to go up in the context doc stack. See the query language reference for details.

4.12.3.3 Expressions

The parameters of some publisher instructions, specified in attributes and child-elements, can contain expressions, rather than just a literal value.

To specify an expression, the attribute or element must start with ${ and end on }. For example:

<element attribute=”${some expr}”>${some expr}</element>

Using multiple expressions or having additional content around the expression is not supported.

The expressions are Daisy query-language expressions. The identifiers apply to the current context document. For example the expression ${id} would evaluate to the ID of the current context document.

 PreviousHomeNext 
4.12.2 The publisher request format4.12.4 Testing a publisher request