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

RE: redefinition errors

From: <MarkH@i2.co.uk>
Date: Wed, 10 Jan 2001 14:19:00 -0000
Message-ID: <1E73B637CFC3D411A12F00B0D0795DDD09149A@uknts40exh01.i2.co.uk>
To: ht@cogsci.ed.ac.uk
Cc: xmlschema-dev@w3.org


> -----Original Message-----
> From: ht@cogsci.ed.ac.uk [mailto:ht@cogsci.ed.ac.uk]
> Sent: 10 January 2001 14:03
> To: MarkH@i2.co.uk
> Cc: xmlschema-dev@w3.org
> Subject: Re: redefinition errors
> 
> 
> > Yes, thanks. And that appears to rule it out throughout a 
> document since all
> > elements in a document will always share a common model 
> group at the top of
> > the hierarchy?
> 
> No, there is no (or not necessarilty or normally) any common model
> group at the top of the hierarchy.

Not sure I understand this as it seems to imply that I could have a root tag
(== document) which is a complex type (ie has complex content) without an
enclosing <sequence>, <choice> or <group>.

Or is it that you are saying that the scope does not go outside a single
root tag, which would be consistent with what you've shown below (ie bibItem
and person are root tags)?

> 
[...]
> the following is just fine:
> 
> <xs:schema ...>
>  <xs:complexType name="bibItem">
>   <xs:sequence>                                                *1*
>     ...
>     <xs:element name="title" type="xs:string"/>                *2*
>     ...
>   </xs:sequence>
>  </xs:complexType>
> 
>  ...
> 
>  <xs:complexType name="person">
>   <xs:sequence>                                                *1*
>    . . .
>    <xs:element name="title" type="xs:NMTOKEN"/>                *2*
>    . . .
>   </xs:sequence>
>  </xs:complexType>
> </xs:schema>
> 
> The two particles (= content models, given where they occur) marked
> *1* are distinct contexts, so the two element declarations marked *2*
> are just fine, even though they share a name and target namespace,
> but their types are manifestly not the same.
> 

So just to confirm that I've got it now... am I right to conclude that once
we've reached a <sequence> I'm stuffed? That is, once I've got something
like

<items>
 <sequence>
  <elements>
  ...
 </sequence>
</items>

Then there is nowhere within the children of that sequence that it will be
possible to have same name elements of different type?

Thanks

Mark
--
Mark Hughes
  Agile HTML Editor
    http://www.agilic.com
Received on Wednesday, 10 January 2001 09:26:01 GMT

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