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 name="{template:multi-field-name('value')}" onchange="requestUpdate('{$application-url}cpu', '{template:multi-field-name('value')}', '{template:other-field-names(../cpu)}', '{template:other-multi-field-names('value', ../cpu)}', '/configuration/details/cpu'); requestUpdate('{$application-url}memory', '{template:multi-field-name('value')}', '{template:other-field-names(../../memory)}', '{template:other-multi-field-names('value', ../../memory/memory-unit)}', '/configuration/memory'); requestUpdate('{$application-url}hard-disks', '{template:multi-field-name('value')}', '{template:other-field-names(../../hard-disks)}', '{template:other-multi-field-names('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">CPU 32 <select template:id="cpu-node" id="{template:this-position()}" name="{template:multi-field-name('value')}"> 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 template:element="memory" class="memory"> 40 <h2>Memory</h2> 41 42 <div template:id="memory-node" id="{template:this-position()}"> 43 <p template:element="memory-unit">Memory unit 44 <select name="{template:multi-field-name('value')}"> 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-position()}" /></p> 51 52 <p> 53 <input type="submit" value="Add memory" 54 name="add-memory-unit={template:this-position()}" /></p> 55 </div> 56 </div> 57 </div> 58 <div id="right"> 59 <div template:element="hard-disks" class="hard-disks"> 60 <h2>Hard Disks</h2> 61 62 <div template:id="hard-disks-node" id="{template:this-position()}"> 63 <p template:element="hard-disk">Hard disk drive 64 <select name="{template:multi-field-name('value')}"> 65 <option template:element="hard-disk-enum" template:expr="@value-is-set" template:expr-attr="selected" template:value="@value" 66 value="{@value}"></option> 67 </select> 68 69 <input type="submit" value="Remove" 70 name="remove-hard-disk={template:this-position()}" /></p> 71 72 <p> 73 <input type="submit" value="Add hard disk" 74 name="add-hard-disk={template:this-position()}" /></p> 75 </div> 76 </div> 77 78 <div template:element="storage" class="storage"> 79 <h2>Additional Storage</h2> 80 81 <p template:element="storage-unit">Storage unit 82 <select name="{template:multi-field-name('value')}"> 83 <option template:element="storage-unit-enum" template:expr="@value-is-set" template:expr-attr="selected" template:value="@value" 84 value="{@value}"></option> 85 </select> 86 87 <input type="submit" value="Remove" 88 name="remove-storage-unit={template:this-position()}" /></p> 89 90 <p> 91 <input type="submit" value="Add storage" 92 name="add-storage-unit={template:this-position()}" /></p> 93 </div> 94 </div> 95 <div id="bottom"> 96 <div template:element="peripherals" class="peripherals"> 97 <h2>Input Devices</h2> 98 99 <p template:element="keyboard">Keyboard 100 <select name="{template:multi-field-name('value')}"> 101 <option template:element="keyboard-enum" template:expr="@value-is-set" template:expr-attr="selected" template:value="@value" 102 value="{@value}"></option> 103 </select> 104 </p> 105 106 <p template:element="mouse">Mouse 107 <select name="{template:multi-field-name('value')}"> 108 <option template:element="mouse-enum" template:expr="@value-is-set" template:expr-attr="selected" template:value="@value" 109 value="{@value}"></option> 110 </select> 111 </p> 112 113 <h2>Display</h2> 114 115 <p template:element="screen">Screen 116 <select name="{template:multi-field-name('value')}"> 117 <option template:element="screen-enum" template:expr="@value-is-set" template:expr-attr="selected" template:value="@value" 118 value="{@value}"></option> 119 </select> 120 </p> 121 </div> 122 123 <div class="price"> 124 <h2>Price</h2> 125 126 <p>Total for this configuration: 127 <span template:value="sum(/configuration//*/@price)"></span></p> 128 129 <p> 130 <input type="submit" value="Update!" name="update" /> 131 <input type="submit" value="Export!" name="export" /></p> 132 </div> 133 </div> 134 </form> 135 </body> 136 </html>