A view template determines how resources from a Callimachus class are rendered for display. Each view template is associated with a Callimachus class, and developers may script view templates by applying these patterns.

Initial view template code

 1:<?xml version="1.0" encoding="UTF-8" ?>
 2:<html xmlns=""
 3:    xmlns:xsd=""
 4:    xmlns:rdf=""
 5:    xmlns:rdfs=""
 6:    xmlns:dcterms="">
 8:    <title resource="?this">{rdfs:label}</title>
 9:    <link rel="edit-form" href="?edit" />
10:    <link rel="comments" href="?discussion" />
11:    <link rel="version-history" href="?history" />
13:<body resource="?this">
14:    <div class="container">
15:        <div class="page-header">
16:            <h1 property="rdfs:label" />
17:        </div>
18:        <pre property="rdfs:comment" />
19:    </div>

Code Analysis

Lines Element Purpose
1 xml Specifies the character encoding to be UTF-8.
3-6 html Declares the namespaces used to identify resources in this page.
8 title Displays the name of the current resource.
9-11 link(s) Links for editing, describing and viewing the version history of the current resource.
13 body Sets the subject of the RDFa attributes contained in the body of the page.
16 h1 Displays the name of the resource being edited.
18 pre The content of the comment field, which may include wiki markup.