1.1 --- a/docs/advice.html Thu Jul 21 23:54:49 2005 +0000
1.2 +++ b/docs/advice.html Fri Jul 22 00:05:16 2005 +0000
1.3 @@ -22,9 +22,26 @@
1.4 at a different position depending on how many such values have been
1.5 inserted. Whilst this might not affect some applications, at least not
1.6 to begin with, the usage of more advanced features (<a
1.7 - href="selectors.html">selectors</a>, for example) will probably expose
1.8 + href="in-page-updates.html">in-page updates</a>, for example) will
1.9 +probably expose
1.10 problems due to the way XSLForms reconstructs the XML document data
1.11 from the input form data.</p>
1.12 +<h2>Beware of Adding Elements into Mixtures of Elements</h2>
1.13 +<p>Although we ignore this rule with the example in this documentation,
1.14 +it is necessary to be aware of problems with adding and removing
1.15 +elements where other elements may reside. Consider part of our form
1.16 +data structure:</p>
1.17 +<pre><item value="a"><br /> <type><br /> <type-enum value="1"/><br /> </type><br /> <subitem value="x"/><br /></item></pre>
1.18 +<p>Provided that we control the process of adding and removing the
1.19 +elements, making sure that they always reside at the end of the element
1.20 +collection inside the <code>item</code> element, and that they
1.21 +always follow a known number of elements, we can avoid issues with more
1.22 +advanced features (<a href="in-page-updates.html">in-page updates</a>,
1.23 +for example), although using such features on the <code>subitem</code>
1.24 +elements themselves may cause problems that may only be resolved by
1.25 +moving the <code>subitem</code> elements into a container element
1.26 +of their own:</p>
1.27 +<pre><item value="a"><br /> <type><br /> <type-enum value="1"/><br /> </type><br /> <subitems><br /> <subitem value="x"/><br /> </subitems><br /></item></pre>
1.28 <h2>Make Sure the Output Structure Agrees with the Template</h2>
1.29 <ol>
1.30 </ol>