W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2001

RE: Semantics of elementFormDefault / Form

From: Priscilla Walmsley <priscilla@walmsley.com>
Date: Tue, 18 Dec 2001 13:37:55 -0500
To: "'Jeni Tennison'" <jeni@jenitennison.com>, "'Slein, Judith A'" <JSlein@crt.xerox.com>
Cc: <xmlschema-dev@w3.org>, "'Kurian, Binil'" <BKurian@crt.xerox.com>, "'Sembower, Neil R'" <NSembower@crt.xerox.com>, "'Graham Mann'" <gmann@adobe.com>
Message-ID: <005601c187f3$36828290$522a6420@vitria.ad.vitriacorp.com>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:25 GMT