1 <?xml version="1.0" encoding="iso-8859-1"?> 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 3 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 4 <html xmlns="http://www.w3.org/1999/xhtml" 5 xmlns:template="http://www.boddie.org.uk/ns/xmltools/template"> 6 <head> 7 <title>System Configurator</title> 8 <meta name="generator" content="amaya 8.1a, see http://www.w3.org/Amaya/" /> 9 <link xmlns:xlink="http://www.w3.org/1999/xlink" href="styles/styles.css" rel="stylesheet" type="text/css" /> 10 <script type="text/javascript" src="scripts/sarissa.js"> </script> 11 <script type="text/javascript" src="scripts/XSLForms.js"> </script> 12 </head> 13 14 <body> 15 <h1>System Configurator</h1> 16 17 <form method="post" action="" template:element="configuration"> 18 <div id="left"> 19 <div template:element="details" class="details"> 20 <h2>Base System</h2> 21 22 <p template:element="base-system">Model 23 <select template:attribute="value" name="{template:this-attribute()}" onchange="requestUpdate('{$application-url}cpu', '{template:this-attribute()}', '{template:other-elements(../cpu)}', '{template:other-attributes('value', ../cpu)}', '/configuration/details/cpu'); requestUpdate('{$application-url}memory', '{template:this-attribute()}', '{template:other-elements(../../memory)}', '{template:other-attributes('value', ../../memory/memory-unit)}', '/configuration/memory'); requestUpdate('{$application-url}hard-disks', '{template:this-attribute()}', '{template:other-elements(../../hard-disks)}', '{template:other-attributes('value', ../../hard-disks/hard-disk)}', '/configuration/hard-disks')"> 24 <option template:element="base-system-enum" template:expr="@value-is-set" template:expr-attr="selected" template:value="@value" 25 value="{@value}"></option> 26 </select> 27 </p> 28 29 <h2>Processor</h2> 30 31 <p template:element="cpu" template:id="cpu-node" id="{template:this-element()}">CPU 32 <select template:attribute="value" name="{template:this-attribute()}"> 33 <option template:element="cpu-enum" template:expr="@value-is-set" template:expr-attr="selected" template:value="@value" 34 value="{@value}"></option> 35 </select> 36 </p> 37 </div> 38 39 <div class="memory" template:element="memory"> 40 <h2>Memory</h2> 41 42 <div template:id="memory-node" id="{template:this-element()}"> 43 <p template:element="memory-unit">Memory unit 44 <select template:attribute="value" name="{template:this-attribute()}"> 45 <option template:element="memory-unit-enum" template:expr="@value-is-set" template:expr-attr="selected" template:value="@value" 46 value="{@value}"></option> 47 </select> 48 49 <input type="submit" value="Remove" 50 name="remove-memory-unit={template:this-element()}" /> 51 </p> 52 53 <p> 54 <input type="submit" value="Add memory" 55 name="add-memory-unit={template:this-element()}" /> 56 </p> 57 </div> 58 </div> 59 </div> 60 <div id="right"> 61 <div class="hard-disks" template:element="hard-disks"> 62 <h2>Hard Disks</h2> 63 64 <div template:id="hard-disks-node" id="{template:this-element()}"> 65 <p template:element="hard-disk">Hard disk drive 66 <select template:attribute="value" name="{template:this-attribute()}"> 67 <option template:element="hard-disk-enum" template:expr="@value-is-set" template:expr-attr="selected" template:value="@value" 68 value="{@value}"></option> 69 </select> 70 71 <input type="submit" value="Remove" 72 name="remove-hard-disk={template:this-element()}" /> 73 </p> 74 75 <p> 76 <input type="submit" value="Add hard disk" 77 name="add-hard-disk={template:this-element()}" /> 78 </p> 79 </div> 80 </div> 81 82 <div template:element="storage" class="storage"> 83 <h2>Additional Storage</h2> 84 85 <p template:element="storage-unit">Storage unit 86 <select template:attribute="value" name="{template:this-attribute()}"> 87 <option template:element="storage-unit-enum" template:expr="@value-is-set" template:expr-attr="selected" template:value="@value" 88 value="{@value}"></option> 89 </select> 90 91 <input type="submit" value="Remove" 92 name="remove-storage-unit={template:this-element()}" /> 93 </p> 94 95 <p> 96 <input type="submit" value="Add storage" 97 name="add-storage-unit={template:this-element()}" /></p> 98 </div> 99 </div> 100 <div id="bottom"> 101 <div template:element="peripherals" class="peripherals"> 102 <h2>Input Devices</h2> 103 104 <p template:element="keyboard">Keyboard 105 <select template:attribute="value" name="{template:this-attribute()}"> 106 <option template:element="keyboard-enum" template:expr="@value-is-set" template:expr-attr="selected" template:value="@value" 107 value="{@value}"></option> 108 </select> 109 </p> 110 111 <p template:element="mouse">Mouse 112 <select template:attribute="value" name="{template:this-attribute()}"> 113 <option template:element="mouse-enum" template:expr="@value-is-set" template:expr-attr="selected" template:value="@value" 114 value="{@value}"></option> 115 </select> 116 </p> 117 118 <h2>Display</h2> 119 120 <p template:element="screen">Screen 121 <select template:attribute="value" name="{template:this-attribute()}"> 122 <option template:element="screen-enum" template:expr="@value-is-set" template:expr-attr="selected" template:value="@value" 123 value="{@value}"></option> 124 </select> 125 </p> 126 </div> 127 128 <div class="price"> 129 <h2>Price</h2> 130 131 <p>Total for this configuration: 132 <span template:value="sum(/configuration//*[@value-is-set]/@price)"></span></p> 133 134 <p> 135 <input type="submit" value="Update!" name="update" /> 136 <input type="submit" value="Export!" name="export" /></p> 137 </div> 138 </div> 139 </form> 140 </body> 141 </html>