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" 24 name="..." multiple="multiple" 25 onchange="requestUpdate( 26 'comments', 27 '{template:list-attribute('type-enum', 'value')}', 28 '{template:other-elements(../options)}', 29 '{template:child-attribute('value', template:child-element('comment', 1, template:other-elements(../options)))}', 30 '/structure/item')"> 31 <option template:multiple-choice-list-value="type-enum,value,selected,template:i18n(text())" 32 template:sort="template:i18n(text())" value="..." /> 33 </select> 34 </p> 35 <p template:element="options" template:section="comment-node" id="{template:this-element()}"> 36 <span template:element="comment">Comment: 37 <textarea template:attribute-area="value,insert" name="..." cols="40" rows="3"> 38 Some comment 39 </textarea> 40 </span> 41 </p> 42 <p> 43 Itself containing more items: 44 </p> 45 <p template:element="subitem"> 46 Sub-item: <input template:attribute-field="subvalue" name="..." type="text" value="..." /> 47 <input template:selector-field="remove2" name="..." type="submit" value="Remove" /> 48 </p> 49 <p> 50 <input template:selector-field="add2,subitem" name="..." type="submit" value="Add subitem" /> 51 </p> 52 </div> 53 <p> 54 <input template:selector-field="add,item" name="..." type="submit" value="Add item" /> 55 </p> 56 <p> 57 <input name="update" type="submit" value="Update" /> 58 </p> 59 60 <!-- Template text between the interesting part and the end. --> 61 62 </form> 63 </body> 64 </html>