W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2001

How to use list?

From: Kerry Coffin <kcoffin@mediaone.net>
Date: Thu, 04 Jan 2001 10:09:20 -0500
Message-ID: <3A549220.E4B57964@mediaone.net>
To: www-xml-schema-comments@w3.org
Hi,
I have a question about lists:

My schema:  testList.xsd
----------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
elementFormDefault="qualified">
 <xsd:simpleType name="IntegerListType">
  <xsd:list itemType="xsd:positiveInteger"/>
 </xsd:simpleType>
 <xsd:element name="IntList" type="IntegerListType"/>
</xsd:schema>




My xml file: XML SPY V3.5B3 does NOT validate
-------------------
<?xml version="1.0" encoding="UTF-8"?>
<IntList xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="C:\ArcIMS\AXL\testList.xsd">5 5</IntList>

XML Spy says:
Invalid value for datatype positiveInteger in element 'Text'


My xml file: This one validates fine (only one in the list)
------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<IntList xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="C:\ArcIMS\AXL\testList.xsd">5</IntList>



Is it a problem with my xsd or XML Spy?


Regards

Kerry Coffin
Sr. Systems Engineer, ESRI
Henniker, NH
Received on Thursday, 4 January 2001 10:11:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:49 GMT