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

Element containing a list of IDs

From: <MarkH@i2.co.uk>
Date: Thu, 21 Dec 2000 16:35:42 -0000
Message-ID: <1E73B637CFC3D411A12F00B0D0795DDD091456@uknts40exh01.i2.co.uk>
To: xmlschema-dev@w3.org
I want to represent something like

<exporteditems>
	<endids>id21 id2 id5 id23</endids>
<exporteditems/>

Where the ids are IDs (or possibly some other type).

What's wrong with this schema...?

    <element name='exporteditems'>
     <complexType>
      <sequence>
       <element minOccurs='0' maxOccurs='1' name='endids'>
         <simpleType>
          <restriction>
           <list itemType='ID'>
           </list>
          </restriction>
         </simpleType>
       </element>
      </sequence>
     </complexType>
    </element>

I've tried a few variations but looking at previous posts the above seems to
be ok, while XSV reports:

Problems with the schema-validity of the target
file:/E:/My Documents/_ Work Current/_VLV/XML/vlxdoc-xed.xsd:64:12: Invalid
cvc-complex-type.1.2.4: element {http://www.w3.org/2000/10/XMLSchema}:list
not allowed here in element
{http://www.w3.org/2000/10/XMLSchema}:restriction:
file:/E:/My Documents/_ Work Current/_VLV/XML/vlxdoc-xed.xsd:64:12: Invalid
src-resolve: undeclared element {http://www.w3.org/2000/10/XMLSchema}:list


Mark
--
Mark Hughes
  Agile HTML Editor
    http://www.agilic.com
Received on Thursday, 21 December 2000 11:42:21 GMT

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