Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - Beginner's Question - Schema Validation Problem [Thread Next] RE: Beginner's Question - Schema Validation ProblemTo: <xmlschema-dev@--.---> Date: 4/11/2004 1:10:00 PM Hi: I think you forgot the <xsd:sequence> so try this please ========================== ========================== ========================== === <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="qos" maxOccurs="1" > <xsd:complexType> <xsd:sequence> <------------------------------------------ <xsd:element ref="performance" minOccurs="0" maxOccurs="1"/> <xsd:element ref="information" minOccurs="0" maxOccurs="1"/> <xsd:element ref="configuration" minOccurs="0" maxOccurs="1"/> <xsd:element ref="security" minOccurs="0" maxOccurs="1"/> </xsd:sequence> <--------------------------- </xsd:complexType> <xsd:attribute ref="service_key" use="required"/> </xsd:element> </xsd:schema> ========================== ========================== ========================== = Firas Darweesh -----Original Message----- From: xmlschema-dev-request@w... [mailto:xmlschema-dev-request@w...] = On Behalf Of Ayman El-Geneidy Sent: Wednesday, April 07, 2004 6:16 PM To: xmlschema-dev@w... Subject: Beginner's Question - Schema Validation Problem I am trying to validate a schema and getting the error "Element 'qos' is = used but not declared in DTD/Schema". 'qos' is my root element. I have = looked at several books and at similar messages on this list with no = luck. This is how I am declaring it in my XML file: <qos xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="qos.xsd" service_key="d5921160-3e16-11d5-98bf-002035229c64"> ............... </qos> And this is how it is declared in the schema file ('qos.xsd' located at = the same directory as the XML file): <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> ............................. <xsd:element name="qos" maxOccurs="1"> <xsd:complexType> <xsd:element ref="performance" minOccurs="0" = maxOccurs="1"/> <xsd:element ref="information" minOccurs="0" = maxOccurs="1"/> <xsd:element ref="configuration" minOccurs="0" = maxOccurs="1"/> <xsd:element ref="security" minOccurs="0" = maxOccurs="1"/> </xsd:complexType> <xsd:attribute ref="service_key" use="required"/> </xsd:element> </xsd:schema> I have tried qualifying the path of the xsd file as it was explained in = a previous message and got the same result. I am using the XRay editor = from Architag. I would appreciate any help and guidance. Thank you. Ayman From xan.gregg@j... Mon Apr 12 08:25:38 2004 Return-Path: <xan.gregg@j...> X-Original-To: xmlschema-dev@l... | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
