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

RE: redefinition errors

From: <MarkH@i2.co.uk>
Date: Tue, 9 Jan 2001 12:45:37 -0000
Message-ID: <1E73B637CFC3D411A12F00B0D0795DDD09148F@uknts40exh01.i2.co.uk>
To: ht@cogsci.ed.ac.uk, xmlschema-dev@w3.org


> -----Original Message-----
> From: ht@cogsci.ed.ac.uk [mailto:ht@cogsci.ed.ac.uk]
> Sent: 08 January 2001 18:07
> To: MarkH@i2.co.uk
> Cc: xmlschema-dev@w3.org
> Subject: Re: redefinition errors
> 
> 
> MarkH@i2.co.uk writes:
> 
> > I have an element <representation> with attribute "format" 
> and want to force
> > inclusion of <representaion format='VLVF'> followed by zero 
> or more further
> > <represenation> elements.
> 
> Not possible, sorry.  Attributes just aren't part of content 
> models in 
> v1.0
> 
> > To do this I defined a general
> > "anyRepresenationType" and use it to define a restricted
> > "vlvfRepresentationType" which has "format" with use='fixed' and
> > value='VLVF'.
> 
> Defining such types is of course fine, you just can't use 
> them both as 
> the type of elements with the same name in the same content model.
Does this apply wherever the elements appear (ie globally) or is there any
kind of "scope" which I could use to avoid the clash between the types
(within different <sequence></sequence> pairs for example?)

> I suspect you actually have:
> 
>   <complexType>
>    <sequence>
>     <element name='representation' type='vlvfRepresentationType'/>
>     <element name='representation' 
> type='anyRepresentationType' minOccurs='0'/>
>    </sequence>
>   <complexType>
> 

Indeed :#)

Thanks

Mark
--
Mark Hughes
  Agile HTML Editor
    http://www.agilic.com
Received on Tuesday, 9 January 2001 07:52:45 GMT

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