Re: questions about element declarations

> From: Michael Sperberg-McQueen <U35395@UICVM.CC.UIC.EDU>

> * Should XML prohibit the use of inclusion and exclusion exceptions
> in element declarations? (11.2.4, 11.2.5)?

While we can prohibit exceptions in XML declarations, when a document
instance contains an element for which there is no declaration, it
seems to me that the obvious "default declarations" for an XML tool to
assume (Michael's Waterloo-like ideas) are an ANY sort of declaration
for the element *and* the equivalent of an inclusion of this element on
the document element's declaration.  I'm not sure if this has a bearing
on a decision of what we allow in XML, but I want to be sure.

For example, if I'm given an XML document and partial declarations
equivalent to the following:

<!DOCTYPE doc [
  <!ELEMENT doc (title, section*)>
  <!ELEMENT section (para*)>
  <!ELEMENT title (#PCDATA)>
  <!ELEMENT para (#PCDATA)>
<title>The Title</title>
<title>Chapter Title</title>

then my XML editor would probably intuit and use the following DTD:

  <!ENTITY % undeclared_elements "chapter, emphasis">

  <!ELEMENT doc (title, section*)      +(%undeclared_elements)>
  <!ELEMENT section (para*)>
  <!ELEMENT title (#PCDATA)>
  <!ELEMENT para (#PCDATA)>

  <!ELEMENT (%undeclared_elements) ANY>

1.  Am I right that the logical equivalent of what I describe is what's
    expected by an XML editing tool?

2.  Does this have any implications on whether we allow exceptions in
    XML, or is the use of inclusions in my example restricted to SGML
    systems and implementation issues?