1.1 --- a/docs/structure.html Tue Jul 19 23:40:05 2005 +0000
1.2 +++ b/docs/structure.html Wed Jul 20 12:53:04 2005 +0000
1.3 @@ -39,11 +39,11 @@
1.4 style="font-weight: bold;">template:element="structure"</span>><br /><br /> <item <div <span
1.5 style="font-weight: bold;">template:element="item"</span>><br /> <p><br /> value="some value"> Some item: <input <span
1.6 style="font-weight: bold;">template:attribute="value"</span> name="<span
1.7 - style="font-weight: bold;">{template:field-name()}</span>" type="text" value="<span
1.8 + style="font-weight: bold;">{template:this-attribute()}</span>" type="text" value="<span
1.9 style="font-weight: bold;">{$this-value}</span>" /><br /> <input name="remove" type="submit" value="Remove" /><br /> </p><br /> <p><br /> Itself containing more items:<br /> </p><br /> <subitem <p <span
1.10 style="font-weight: bold;">template:element="subitem"</span>><br /> subvalue="some other value"/> Sub-item: <input <span
1.11 style="font-weight: bold;">template:attribute="subvalue"</span> name="<span
1.12 - style="font-weight: bold;">{template:field-name()}</span>" type="text" value="<span
1.13 + style="font-weight: bold;">{template:this-attribute()}</span>" type="text" value="<span
1.14 style="font-weight: bold;">{$this-value}</span>" /><br /> <input name="remove2" type="submit" value="Remove" /><br /> </p><br /> <p><br /> <input name="add2" type="submit" value="Add subitem" /><br /> </p><br /> </item> </div><br /> <p><br /> <input name="add" type="submit" value="Add item" /><br /> </p><br /><br /></structure> </body></pre>
1.15 <p style="">
1.16 The following annotations have been added:</p>
1.17 @@ -59,7 +59,7 @@
1.18 been changed:</p>
1.19 <ul>
1.20 <li>The <code>input</code> elements' <code>name</code>
1.21 -attributes have been redefined to use the special <code>{template:field-name()}</code>
1.22 +attributes have been redefined to use the special <code>{template:this-attribute()}</code>
1.23 value.</li>
1.24 <li>The <code>input</code> elements' <code>value</code>
1.25 attributes have been redefined to use the special <code>{$this-value}</code>
1.26 @@ -72,7 +72,7 @@
1.27 <h2>Completing the Template</h2>
1.28 <p>The template in full should now look something like this:</p>
1.29 <pre><?xml version="1.0"?><br /><html xmlns="http://www.w3.org/1999/xhtml"<br /> <span
1.30 - style="font-weight: bold;">xmlns:template="http://www.boddie.org.uk/ns/xmltools/template"</span>><br /><head><br /> <title>Example</title><br /></head><br /><body template:element="structure"><br /><form action="" method="POST"><br /><br /><!-- Template text between the start and the interesting part. --><br /><br /><div template:element="item"><br /> <p><br /> Some item: <input template:attribute="value" name="{template:field-name()}" type="text" value="{$this-value}" /><br /> <input name="remove" type="submit" value="Remove" /><br /> </p><br /> <p><br /> Itself containing more items:<br /> </p><br /> <p template:element="subitem"><br /> Sub-item: <input template:attribute="subvalue" name="{template:field-name()}" type="text" value="{$this-value}" /><br /> <input name="remove2" type="submit" value="Remove" /><br /> </p><br /> <p><br /> <input name="add2" type="submit" value="Add subitem" /><br /> </p><br /></div><br /><p><br /> <input name="add" type="submit" value="Add item" /><br /></p><br /><br /><!-- Template text between the interesting part and the end. --><br /><br /></form><br /></body><br /></html></pre>
1.31 + style="font-weight: bold;">xmlns:template="http://www.boddie.org.uk/ns/xmltools/template"</span>><br /><head><br /> <title>Example</title><br /></head><br /><body template:element="structure"><br /><form action="" method="POST"><br /><br /><!-- Template text between the start and the interesting part. --><br /><br /><div template:element="item"><br /> <p><br /> Some item: <input template:attribute="value" name="{template:this-attribute()}" type="text" value="{$this-value}" /><br /> <input name="remove" type="submit" value="Remove" /><br /> </p><br /> <p><br /> Itself containing more items:<br /> </p><br /> <p template:element="subitem"><br /> Sub-item: <input template:attribute="subvalue" name="{template:this-attribute()}" type="text" value="{$this-value}" /><br /> <input name="remove2" type="submit" value="Remove" /><br /> </p><br /> <p><br /> <input name="add2" type="submit" value="Add subitem" /><br /> </p><br /></div><br /><p><br /> <input name="add" type="submit" value="Add item" /><br /></p><br /><br /><!-- Template text between the interesting part and the end. --><br /><br /></form><br /></body><br /></html></pre>
1.32 <p>Note also that a namespace declaration is required for the <code>template</code>
1.33 attributes, and it is usually best to put this declaration on the
1.34 top-level <code>html</code> element in the template, as shown in