Re: conditional schemas

Eric van der Vlist <vdv@dyomedea.com> writes:

> Hi,
> 
> Erik Beijnoff wrote:
> 
> >  >In this case, wouldn't I have to duplicate everything that is
> > inside the "actions" element? 'Cause that's quite a lot...
> 
> >  >Regards, Lieve
> 
> > Ok, here goes...
> 
> > <xs:complexType name="outer">
> 
> >   <xs:choice>
> >     <xs:element name="action" type="actionsWithAccess"/>
> >     <xs:element name="action" type="actionsWithSettings"/>
> >   </xs:choice>
> > </xs:complexType>
> 
> 
> No, you can't do this (having two elements with the same name under a
> choice compositor) with W3C XML Schema since it would be breaking the
> famous Unique Particle Attribution rule:

It also breaks the Consistent Declaration rule, which forbids two
elements of the same name but different types.

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/

Received on Thursday, 29 November 2001 12:02:29 UTC