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@150 | 26 | <p> |
paulb@150 | 27 | Itself containing more items: |
paulb@150 | 28 | </p> |
paulb@150 | 29 | <p template:element="subitem"> |
paulb@150 | 30 | Sub-item: <input template:attribute="subvalue" name="{template:this-attribute()}" type="text" value="{$this-value}" /> |
paulb@150 | 31 | <input name="remove2={template:this-element()}" type="submit" value="Remove" /> |
paulb@150 | 32 | </p> |
paulb@150 | 33 | <p> |
paulb@150 | 34 | <input name="add2={template:this-element()}" type="submit" value="Add subitem" /> |
paulb@150 | 35 | </p> |
paulb@150 | 36 | </div> |
paulb@150 | 37 | <p> |
paulb@150 | 38 | <input name="add={template:this-element()}" type="submit" value="Add item" /> |
paulb@150 | 39 | </p> |
paulb@150 | 40 | |
paulb@150 | 41 | <!-- Template text between the interesting part and the end. --> |
paulb@150 | 42 | |
paulb@150 | 43 | </form> |
paulb@150 | 44 | </body> |
paulb@150 | 45 | </html> |