<ElementDecl Name="foo" ns="http://myfoo.org" prefix="myfoo">
      ...
   </ElementDecl>
   <ElementDecl Name="foo" ns="http://yourfoo.org" prefix="yourfoo">
      ...
   </ElementDecl>
   <ElementDecl Name="refersToFoo">
      <Model>
         <Ref Element="foo"/>
      </Model>
   </ElementDecl>
Which foo does the Element attribute in the content model of refersToFoo refer 
to?  I see two solutions to this:
1) Refer to elements by ID.  I don't like this from a usability standpoint -- it 
is far more natural to refer to elements by name.
2) Add nsElement and (possibly) prefixElement attributes to Ref, AttDef, and 
AttGroup.  This matches our namespace implementation, which uses a two-part 
naming system (Name + ns).
Note 1: We cannot name these attributes ns and prefix, as those already exist on 
AttDef and AttGroup and apply to the value of the Name attribute.
Note 2: prefixElement is not strictly necessary -- you could get the prefix from 
the ElementDecl, AttGroup, or AttDef.  Although it makes it possible for the 
user to introduce conflicting prefixes, it also makes conversion to a DTD much 
easier.  Because references can occur before declarations, you can't guarantee a 
successful prefix lookup when you need it.  Thus, you must either make two 
passes over the XSchema or build an in-memory tree before outputting anything.  
I would rather add prefixElement and have the checker check that it matches the 
relevant prefix.
Note 3: Can nsElement inherit from ns and prefixElement inherit from prefix?  In 
many (most?) cases, the content model of elements will refer to elements in the 
same namespace as the element being defined and attributes will belong to the 
same namespace as the element to which they apply.  Thus, it would be nice to 
omit nsElement and just apply ns from the enclosing ElementDecl, AttGroup, or 
AttDef.  However, inheriting from one attribute to another is definitely not in 
the spirit of XML and makes me a bit queasy.
-- Ron Bourret