A proposal for a new Atom construct, "template" whose contents are opaque to the protocol but can be interpreted by clients and servers using the media type of the template.
Many content management systems also allow the management of templates which determine how content will be transformed into target file formats such as HTML, XML, RDF, PostScript, plain text, and others. This proposal models templates in a simple and general way.
For many publishers, editing templates is of a piece with editing content: both are simply ways to update a website or other media product. Providing clients with a way to manipulate templates allows them to offer their publisher-users more complete control over those products.
Additions to the format document
X.Y Template Construct
A Template construct is an element whose content is a template in some templating language, which can be transformed into an output byte stream in a particular format. The content of the element constitutes the "template."
X.Y.Z1 "name" attribute
A template construct MAY contain a "name" attribute, which contains a human-readable name for the template, allowing it to be distinguished from others in a list. The value of a name attribute is plain text.
X.Y.Z2 "type" attribute
A media type identifying the template language in which the template should be interpreted. [[ stuff about what media types make sense here ]]
X.Y.Z3 "mode" Attribute
Template constructs MAY have a "mode" attribute, whose value indicates the method used to encode the content. When present, this attribute's value MUST be listed below. If not present, processors MUST behave as if its value were "xml".
"xml": A mode attribute with the value "xml" indicates that the element's content is inline xml (for example, namespace-qualified XHTML).
"escaped": A mode attribute with the value "escaped" indicates that the element's content is escaped, as defined in [W3C.REC-xml-20040204] (section 4.6). Processors MUST unescape the element's content before considering it as content of the indicated media type.
Additions to the protocol document
U.V Operations on Templates
A client can fetch or update a template construct through HTTP requests in the Atom protocol. [[ describe GET / PUT or SOAP-style ]].
A server MAY deny a template update operation based on its attributes or content by returning a status code of 409 Conflict.
Still open is the question of how a client can discover the set of templates stored by the Atom server.
An alternative would be to re-use the Content construct for templates: PaceTemplatesAreContentConstructs.