Robert,
I'm not sure I understand which problem you're trying to solve here. Are you proposing syntax for a template list? Are you proposing to layer the template-editing protocol on WebDAV in this respect?
Working from the syntax of PaceCategoriesFacet, the introspection file would have a service element for the template facet:
<?xml version="1.0" encoding='utf-8'?> <introspection version="0.3" xmlns="http://purl.org/atom/ns#"> <site title="Main Site" > <service name="post" href="http://example.org/reilly/post" /> <service name="feed" href="http://example.org/reilly/feed" /> <service name="categories" href="http://example.org/reilly/cat" /> <service name="templates" href="http://example.org/reilly/templates" /> </site> </introspection>
Then, at http://example.org/reilly/templates, we'd have some kind of template list:
<?xml version="1.0" encoding="utf-8"?>
<templates version="1.0" xmlns="http://purl.org/atom/ns#draft-ietf-atompub-format-02">
<template href="http://example.net/templates/1" name="Entry Template" />
<template href="http://example.net/templates/2" name="Monthly Archive Template" />
<template href="http://example.net/templates/3" name="Index Template" />
</templates>
A GET to http://example.net/templates/1 would return a template construct [1]. Assuming vnd.joe.templatelanguage was a language that used double-brace delimiters, it might return something like this:
<template mode="escaped" type="application/vnd.joe.templatelanguage"> <h1> {{BlogTitle}} </h1> <h2> {{EntryTitle}} </h2> <p> {{EntryBody}} </p> </template>
HTTP/1.1 200 OK Content-Type: application/vnd.joe.templatelanguage
Here the template "content" is just the content of the tag. This <atom:template> tag conforms to the "content" construct in the format.
So the chain of discovery goes: IntrospectionFile -> TemplateFacet -> TemplateResource, much like IntrospectionFile -> CategoryFacet -> CategoryResource.