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>Example</title> 8 <script type="text/javascript" src="scripts/sarissa.js"> </script> 9 <script type="text/javascript" src="scripts/XSLForms.js"> </script> 10 </head> 11 <body template:element="structure"> 12 <form action="" method="POST"> 13 14 <!-- Template text between the start and the interesting part. --> 15 16 <div template:element="item"> 17 <p> 18 Some item: <input template:attribute-field="value" name="..." type="text" value="..." /> 19 <input template:selector-field="remove" name="..." type="submit" value="Remove" /> 20 </p> 21 <p> 22 Item type: 23 <select template:multiple-choice-list-field="type,type-enum,value" name="..." multiple="multiple" 24 onchange="requestUpdate( 25 'comments', 26 '{template:list-attribute('type-enum', 'value')}', 27 '{template:other-elements(../options)}', 28 '{template:child-attribute('value', template:child-element('comment', 1, template:other-elements(../options)))}', 29 '/structure/item')"> 30 <option template:multiple-choice-list-value="type-enum,value,selected" value="..." /> 31 </select> 32 </p> 33 <p template:element="options" template:id="comment-node" id="{template:this-element()}"> 34 <span template:element="comment">Comment: 35 <textarea template:attribute-area="value,insert" name="..." cols="40" rows="3"> 36 Some comment 37 </textarea> 38 </span> 39 </p> 40 <p> 41 Itself containing more items: 42 </p> 43 <p template:element="subitem"> 44 Sub-item: <input template:attribute-field="subvalue" name="..." type="text" value="..." /> 45 <input template:selector-field="remove2" name="..." type="submit" value="Remove" /> 46 </p> 47 <p> 48 <input template:selector-field="add2,subitem" name="..." type="submit" value="Add subitem" /> 49 </p> 50 </div> 51 <p> 52 <input template:selector-field="add,item" name="..." type="submit" value="Add item" /> 53 </p> 54 <p> 55 <input name="update" type="submit" value="Update" /> 56 </p> 57 58 <!-- Template text between the interesting part and the end. --> 59 60 </form> 61 </body> 62 </html>