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

RE: redefinition errors

From: <MarkH@i2.co.uk>
Date: Wed, 10 Jan 2001 15:30:37 -0000
Message-ID: <1E73B637CFC3D411A12F00B0D0795DDD09149C@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 15:05

> MarkH@i2.co.uk writes:
> > 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?
> No, we're still on different pages -- the scope is determined in the
> _schema_, specifically in the complex type definition, not in the
> instance.  The elements explicitly, indirectly or implicitly 
> appearing 
> in the content model are the potential conflict set, _not_ extending
> to element which may appear inside them as a result of 
> _their_ content 
> models.

I don't understand this. At least I realise that this time :-)

Can you illustrate the second sentence - particularly the chunk after the
final comma.

Examples of cases where elements of the same name can have different type
would be useful.  Particularly anything related to what I'm trying to
achieve which is to define a standard form of property such as

 <element name='property'>
  <attribute name='name' type='CDATA'/>
  <attribute name='value' type='string'/>

...for use within an entity elements which can contain zero or more
properties. Different element types will be defined to represent different
kinds of entity (person, document etc.). Some of the entity element types
will have mandatory properties. All will allow arbitrary additional

You may remember me trying to do this a while back using a fixed name
attribute to mandate that <property name='displayName' value=''/> was
present, but couldn't then allow additional properties "because attributes
are not part of the content model".

I'm still not sure that this can't be done (although it seemed to have been
ruled out) and am beginning to feel I'm going round in circles because the
above is starting to sound like it may allow me to achieve what I need (or
something close enough to it to do the job).

I now wonder I can define a sequence with mandatory properties and have this
followed by another sequence containing an unrestricted number of

Something like
 <element name='person' xsi:type='entity'>

  <element name='mandatoryProperties'
    <element name=property minOccurs='1'/>
     <attribute name='name' type='CDATA' use=fixed value='displayName'/>
     <attribute name='value' type='string/> 

  <element name='miscellaneousProperties'
    <element name=property minOccurs='0' maxOccurs='unbounded'>
     <attribute name='name' type='CDATA'/>
     <attribute name='value' type='string/> 


Is this or something like it ok?

If not, any ideas for something that meets this requirement?


Mark Hughes
  Agile HTML Editor
Received on Wednesday, 10 January 2001 10:37:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:49 UTC