- From: Darrell Gamble <dgambl00@yahoo.com>
- Date: Wed, 19 Feb 2003 17:58:36 -0800 (PST)
- To: xmlschema-dev@w3.org
- Message-ID: <20030220015836.50726.qmail@web11402.mail.yahoo.com>
The following is my xml: <?xml version="1.0"?> <employees xmlns="http://www.harrisbank.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.harrisbank.com russianDollEmployees.xsd"> <employee> <name> <fname>Michael</fname> <middle/> <lname>Jackson</lname> </name> <address> <address1>2300 Jackson Street</address1> <address2></address2> <city>Los Angelas</city> <state>CA</state> <zip>90210</zip> </address> </employee> </employees> And this is the schema: <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:hb="http://www.harrisbank.com" xmlns="http://www.harrisbank.com" targetNamespace="http://www.harrisbank.com"> <xsd:element name="employees"> <xsd:complexType> <xsd:sequence> <xsd:element name="employee" type="hb:personType" minOccurs="1" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:complexType name="nameType"> <xsd:sequence> <xsd:element name="fname" type="xsd:string" minOccurs="1" maxOccurs="1" /> <xsd:element name="middle" type="xsd:string" minOccurs="1" maxOccurs="1" /> <xsd:element name="lname" type="xsd:string" minOccurs="1" maxOccurs="1" /> </xsd:sequence> </xsd:complexType> <xsd:complexType name="addressType"> <xsd:sequence> <xsd:element name="address1" type="xsd:string" minOccurs="1" maxOccurs="1" /> <xsd:element name="address2" type="xsd:string" minOccurs="0" maxOccurs="1" /> <xsd:element name="city" type="xsd:string" minOccurs="1" maxOccurs="1" /> <xsd:element name="state" type="hb:usStateType" minOccurs="1" maxOccurs="1"/> <xsd:element name="zip" type="hb:zipType" minOccurs="1" maxOccurs="1" /> </xsd:sequence> </xsd:complexType> <xsd:complexType name="personType"> <xsd:sequence> <xsd:element name="name" type="hb:nameType" /> <xsd:element name="address" type="hb:addressType" /> </xsd:sequence> </xsd:complexType> <xsd:complexType name="zipType"> <xsd:choice> <xsd:element name="zip5" type="hb:ZipType5" /> <xsd:element name="zip9" type="hb:ZipType9" /> </xsd:choice> </xsd:complexType> <xsd:simpleType name="ZipType5"> <xsd:restriction base="xsd:string"> <xsd:pattern value="\d{5}" /> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="ZipType9"> <xsd:restriction base="xsd:string"> <xsd:pattern value="\d{5}-\d{4}" /> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="usStateType"> <xsd:restriction base="xsd:string"> <xsd:pattern value="[A-Z]{2}" /> <xsd:enumeration value="IL" /> <xsd:enumeration value="NY" /> <xsd:enumeration value="CA" /> <xsd:enumeration value="GA" /> <xsd:enumeration value="TX" /> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="cityType"> <xsd:restriction base="xsd:string"> <xsd:enumeration value="Chicago" /> <xsd:enumeration value="Little Rock" /> <xsd:enumeration value="New York" /> <xsd:enumeration value="Los Angelas" /> <xsd:enumeration value="Manhatten" /> <xsd:enumeration value="Atlanta" /> <xsd:enumeration value="Houston" /> <xsd:enumeration value="Dallas" /> </xsd:restriction> </xsd:simpleType> </xsd:schema> This is the error: -1072898028 Element content is invalid according to the DTD/Schema. Expecting employee. Appreciate the help! -Darrell(dgambl00@yahoo.com) --------------------------------- Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day
Received on Friday, 21 February 2003 11:32:38 UTC