Mark Fletcher wrote:
>  
> I'm seeing weird behavior when I create a new file based on the
> ditabase.dtd: 
>  
> 
>     * I create the file from a template which just contains <dita></dita>
>     * In the pick list to insert elements, I see the four valid choices
>       (concept, reference, task, topic), plus a grayed-out asterisk.
>     * When I insert one of the elements, it is inserted invalidly:
>       required attributes (id) and children (title) are not
>       automatically inserted.  All validation on that element then seems
>       to be broken because can insert all of that element's child
>       elements in any order, any number of times.
>     * If I then insert another child into dita, that child's validation
>       is fine.
> However if, after inserting the first child into dita, I provide that
> child's required child element (a title), XXE starts behaving normally
> again.

You have perfectly described XXE's lenient mode, one of its most
advanced features.



> It appears that there's a problem handling dita's "one or more"
> definition: <!ELEMENT dita (topic|task|reference|concept)+ >
>  

Dear sir, do you really think after all those years, XXE has problems
handling "one or more" content models?

A template which only contains "<dita></dita>" is an *invalid* element
template. In this case, XXE works in lenient mode[*] until the invalid
element is fixed.

In summary, with XXE, garbage in (your template) means garbage out
(XXE's lenient mode).



---
[*] In the node path bar, word "dita" is underlined in orange which
means "I'm in lenient mode".

Plus, the validity icon is "red" and the validity tool says: "the
sequence of child elements is incorrect [cvc-complex-type.2.4]".

Therefore it is hard to not to notice there is something wrong with your
document.

---
PS: Please, please, always use the public support mailing list.

Reply via email to