I'm experimenting with a CSS-inspired approach, allowing to partly cascade templates. This means that there is always a matching generic template for each resource type. Before rendering the template, the system walks down the class hierarchy of the given resource, looking for annotation properties pointing to a more specific template (e.g. a template for
foaf:Persons). Additionally, how to render certain properties can be defined at any template level, so that a foaf:img is not only rendered when a resource is typed as being a foaf:Person but everytime a resource has such an image assigned. Customizing resource-specific views is not really easy, though. You can't be sure that certain assumed properties are present or that image URLs don't 404. So I ended up with lots of if... then branches and other ugly stuff. But I think templates for more constrained resource types such as RSS channels or feed items could make a lot of sense.

