Basic Report Structure
Hello World
As report templates are XML files which adhere to a schema, so the first line in any report template will be the
<?xml version="1.0"?>
Every report template defines a Report element. The example below is the simplest Report Template which could be created.
<?xml version="1.0"?>
<rep:Report xmlns:rep="http://safe.epcc.ed.ac.uk/report">
Hello World!
</rep:Report>
The report template above would produce the following HTML report:
Hello World!
Titles, Headings and Paragraphs
Report can have a title, and several headings and paragraphs. The example below shows how these can be defined.
<?xml version="1.0"?>
<rep:Report xmlns:rep="http://safe.epcc.ed.ac.uk/report">
<Title>Title</Title>
<Heading>Heading 1</Heading>
<Text>Paragraph 1 ...</Text>
<Heading>Heading 2</Heading>
<P>Paragraph 2 ...</P>
<Heading>Heading 3</Heading>
<Para>Paragraph 3 ...</Para>
</rep:Report>
The report template above would produce the following HTML report:
Title
Heading 1
Paragraph 1 ...
Heading 2
Paragraph 2 ...
Heading 3
Paragraph 3 ...
Sections and Subsections
You can also break your report up into sections. In turn each section can be broken up into subsections. Sections and subsections should have a title. The example below shows how these can be defined.
<?xml version="1.0"?>
<rep:Report xmlns:rep="http://safe.epcc.ed.ac.uk/report">
<Section>
<Title>Section 1</Title>
This is a bit section text.
<Subsection>
<Title>Subsection 1</Title>
This is a subsection.
</Subsection>
<Subsection>
<Title>Subsection 2</Title>
And a second subsection.
</Subsection>
</Section>
<Section>
<Title>Section 2</Title>
This is some more section text.
<Subsection>
<Title>Subsection 1</Title>
This is a subsection in the second section.
</Subsection>
<Subsection>
<Title>Subsection 2</Title>
And a second subsection in the second section.
</Subsection>
</Section>
</rep:Report>
The report template above would produce the following HTML report:

