1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/examples/Common/Questionnaire/Resources/question_template.xhtml Fri Jan 21 13:44:47 2005 +0000
1.3 @@ -0,0 +1,77 @@
1.4 +<?xml version="1.0" encoding="iso-8859-1"?>
1.5 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
1.6 + "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
1.7 +<html xmlns="http://www.w3.org/1999/xhtml"
1.8 + xmlns:template="http://www.boddie.org.uk/ns/xmltools/template">
1.9 +<head>
1.10 + <title>Questionnaire Editor</title>
1.11 + <meta name="generator" content="amaya 8.1a, see http://www.w3.org/Amaya/" />
1.12 + <link xmlns:xlink="http://www.w3.org/1999/xlink" href="styles.css"
1.13 + rel="stylesheet" type="text/css" />
1.14 +</head>
1.15 +
1.16 +<body template:element="questionnaire">
1.17 +<h1>Questionnaire Editor</h1>
1.18 +
1.19 +<p>Enter questions and possible responses below.</p>
1.20 +
1.21 +<form method="get" action="">
1.22 +
1.23 + <table class="questionnaire">
1.24 + <tbody template:element="question">
1.25 + <tr>
1.26 + <th class="question">Question</th>
1.27 + <td class="question" template:attribute="question-text"><textarea cols="40" rows="4"
1.28 + name="{template:field-name()}" template:value="$this-value">Question</textarea></td>
1.29 + <td class="question-options">
1.30 + <input type="submit" value="Remove question" name="remove-question={template:this-position()}"
1.31 + /></td>
1.32 + </tr>
1.33 + <tr>
1.34 + <th class="response">Response</th>
1.35 + <td class="response" template:attribute="question-type"><input type="radio"
1.36 + name="{template:field-name()}" value="text" template:expr-attr="checked"
1.37 + template:expr="$this-value = 'text'" /> Text</td>
1.38 + <td></td>
1.39 + </tr>
1.40 + <tr>
1.41 + <td class="response"></td>
1.42 + <td class="response" template:attribute="response-text"><input type="text" size="40"
1.43 + name="{template:field-name()}" value="{$this-value}" /></td>
1.44 + <td></td>
1.45 + </tr>
1.46 + <tr>
1.47 + <td class="response"></td>
1.48 + <td class="response" template:attribute="question-type"><input type="radio"
1.49 + name="{template:field-name()}" value="choice" template:expr-attr="checked"
1.50 + template:expr="$this-value = 'choice'" /> Multiple choice</td>
1.51 + <td></td>
1.52 + </tr>
1.53 + <tr template:element="choice">
1.54 + <td class="response"></td>
1.55 + <td class="choice" template:attribute="response-choice"><input type="text" size="40"
1.56 + name="{template:field-name()}" value="{$this-value}" /></td>
1.57 + <td class="choice-options">
1.58 + <input type="submit" value="Remove choice" name="remove-choice={template:this-position()}"
1.59 + /></td>
1.60 + </tr>
1.61 + <tr>
1.62 + <td class="response"></td>
1.63 + <td class="response"></td>
1.64 + <td class="response">
1.65 + <input type="submit" value="Add choice" name="add-choice={template:this-position()}"
1.66 + /></td>
1.67 + </tr>
1.68 + </tbody>
1.69 + </table>
1.70 +
1.71 + <p>
1.72 + <input type="submit" value="Add question" name="add-question" /> to make
1.73 + the questionnaire longer.</p>
1.74 +
1.75 + <p>
1.76 + <input type="submit" value="Finish" name="finish" /> when all the questions
1.77 + and responses are ready.</p>
1.78 +</form>
1.79 +</body>
1.80 +</html>