Stephane Mottelet wrote:
> 
> Why, in 2.6, is it no possible to choose another behavior than
> the "heuristic choice" which inserts arbitrary sub-elements when
> inserting a new element ?

---
* If you are writing a custom DTD or Schema, you could write it in a way 
where the most useful child element is the one which is referenced first 
in the content model:

Example, you would write:

---
<!ELEMENT blockquote (p|pre)+>
---

and *not*

---
<!ELEMENT blockquote (pre|p)+>
---

In such case, suffice to specify:

---
<newElementContent addChildElements="firstChoice" />
---

in the corresponding XXE configuration file. All this is explained in 
http://www.xmlmind.com/xmleditor/_distrib/docs/configure/ch06s15.html




---
* If you do not control the DTD or Schema you are using, the default 
"simplestChoice" heuristic should work fine most of the time.

When this is not the case, specify in the proper XXE configuration file, 
a number of named element templates having attribute selectable="override".

Example:

---
   <elementTemplate name="glossdef" selectable="override">
     <glossentry xmlns="">
       <glossterm></glossterm>
       <glossdef>
         <para></para>
       </glossdef>
     </glossentry>
   </elementTemplate>
---

This is explained in 
http://www.xmlmind.com/xmleditor/_distrib/docs/configure/ch06s09.html


Reply via email to