Description

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="http://www.w3.org/1999/xhtml"
 3:    xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
 4:    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 5:    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
 6:    xmlns:dcterms="http://purl.org/dc/terms/">
 7:<head>
 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" />
12:</head>
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>
20:</body>
21:</html>

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.