RE: Semantics of elementFormDefault / Form

Hi,

> > Similarly, if I say:
> >
> > <schema . . . elementFormDefault="qualified">
> > <element name="X" type="typeA"/>
> > <complexType name="Y">
> >         <sequence>
> >                 <element name="Z" type="typeB"/>
> >                 <any namespace="##other"/>
> >         </sequence>
> > </complexType>
> > </schema>
> >
> > There is no error, but if I change elementFormDefault to
> > "unqualified", I get an ambiguous content model error.
>
> I think you should only get this error if it's not predictable how
> many times the Z element should occur - otherwise it's clear that the
> first N elements should be Z elements and anything after these Z
> elements are elements matching the wildcard.

With namespace="##other", you should _never_ get an ambiguous content model
error, because ##other means that the elements matching the wildcard _must_
be in a namespace.  Since unqualified local elements must _not_ be in a
namespace, there is no ambiguity.

If it were namespace="##local", I agree with Jeni that it still should not
be ambiguous in this case because there is always one occurrence of Z,
followed by whatever elements match the wildcard.

Hope that helps,
Priscilla
------------------------------------------------------
Priscilla Walmsley              priscilla@walmsley.com
Vitria Technology                http://www.vitria.com
Author, Definitive XML Schema      (Prentice Hall PTR)
------------------------------------------------------

Received on Tuesday, 18 December 2001 13:39:30 UTC