paulb@150 | 1 | <?xml version="1.0" encoding="iso-8859-1"?> |
paulb@150 | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" |
paulb@150 | 3 | "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
paulb@150 | 4 | <html xmlns="http://www.w3.org/1999/xhtml" |
paulb@150 | 5 | xmlns:template="http://www.boddie.org.uk/ns/xmltools/template"> |
paulb@150 | 6 | <head> |
paulb@150 | 7 | <title>Example</title> |
paulb@150 | 8 | </head> |
paulb@150 | 9 | <body template:element="structure"> |
paulb@150 | 10 | <form action="" method="POST"> |
paulb@150 | 11 | |
paulb@150 | 12 | <!-- Template text between the start and the interesting part. --> |
paulb@150 | 13 | |
paulb@150 | 14 | <div template:element="item"> |
paulb@150 | 15 | <p> |
paulb@150 | 16 | Some item: <input template:attribute="value" name="{template:this-attribute()}" type="text" value="{$this-value}" /> |
paulb@150 | 17 | <input name="remove={template:this-element()}" type="submit" value="Remove" /> |
paulb@150 | 18 | </p> |
paulb@160 | 19 | <p> |
paulb@150 | 20 | Item type: |
paulb@160 | 21 | <select template:element="type" name="{template:list-attribute('type-enum', 'value')}" multiple="multiple"> |
paulb@150 | 22 | <option template:element="type-enum" template:expr="@value-is-set" template:expr-attr="selected" |
paulb@150 | 23 | template:value="@value" value="{@value}" /> |
paulb@150 | 24 | </select> |
paulb@150 | 25 | </p> |
paulb@169 | 26 | <p template:element="comment" template:id="comment-node" id="{template:this-element()}"> |
paulb@169 | 27 | Comment: |
paulb@169 | 28 | <textarea template:attribute="value" name="{template:this-attribute()}" cols="40" rows="3"> |
paulb@169 | 29 | <span template:value="$this-value" template:effect="replace">Some comment</span> |
paulb@169 | 30 | </textarea> |
paulb@169 | 31 | </p> |
paulb@150 | 32 | <p> |
paulb@150 | 33 | Itself containing more items: |
paulb@150 | 34 | </p> |
paulb@150 | 35 | <p template:element="subitem"> |
paulb@150 | 36 | Sub-item: <input template:attribute="subvalue" name="{template:this-attribute()}" type="text" value="{$this-value}" /> |
paulb@150 | 37 | <input name="remove2={template:this-element()}" type="submit" value="Remove" /> |
paulb@150 | 38 | </p> |
paulb@150 | 39 | <p> |
paulb@150 | 40 | <input name="add2={template:this-element()}" type="submit" value="Add subitem" /> |
paulb@150 | 41 | </p> |
paulb@150 | 42 | </div> |
paulb@150 | 43 | <p> |
paulb@150 | 44 | <input name="add={template:this-element()}" type="submit" value="Add item" /> |
paulb@150 | 45 | </p> |
paulb@169 | 46 | <p> |
paulb@169 | 47 | <input name="update" type="submit" value="Update" /> |
paulb@169 | 48 | </p> |
paulb@150 | 49 | |
paulb@150 | 50 | <!-- Template text between the interesting part and the end. --> |
paulb@150 | 51 | |
paulb@150 | 52 | </form> |
paulb@150 | 53 | </body> |
paulb@150 | 54 | </html> |