- From: Kishore Kumar <kishoremv@huawei.com>
- Date: 07 Mar 2006 17:23:50 -0700
- To: www-xml-schema-comments@w3.org
- Message-id: <000001c6216a$d1201af0$c608120a@china.huawei.com>
Hi, Please check the schema file given below <?xml version="1.0" encoding="UTF-8"?> <!-- edited with XML Spy v4.0 NT beta 1 build Jun 13 2001 (http://www.xmlspy.com) by Alexander Falk (Altova, Inc.) --> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ipo="http://www.altova.com/IPO" targetNamespace="http://www.altova.com/IPO" elementFormDefault="unqualified" attributeFormDefault="unqualified"> <annotation> <documentation> International Purchase order schema for Example.com Copyright 2000 Example.com. All rights reserved. </documentation> </annotation> <!-- include address constructs --> <element name="purchaseOrder" type="ipo:PurchaseOrderType"/> <element name="comment"> <complexType> <sequence> <element ref="ipo:comment" maxOccurs="5"/> </sequence> </complexType> </element> <complexType name="PurchaseOrderType"> <sequence> <element ref="ipo:comment"/> <element name="Items" type="ipo:Items"/> </sequence> <attribute name="orderDate" type="date"/> </complexType> <attribute name="xxx" type="string" fixed="ccc"/> <complexType name="Items"> <sequence> <element name="item" minOccurs="0" maxOccurs="unbounded"> <complexType> <sequence> <element name="productName" type="string"/> <element name="quantity"> <simpleType> <restriction base="positiveInteger"> <maxExclusive value="100"/> </restriction> </simpleType> </element> <element name="price" type="decimal"/> <element ref="ipo:comment" minOccurs="0"/> <element name="shipDate" type="date" minOccurs="0"/> </sequence> </complexType> </element> </sequence> </complexType> </schema> In the above schema file global element "comment" having the child which referring to itself. If Schema standards allow this type of definition it is impossible to validate the document. I have checked this schema with standard editors like Altova xml spy editor and styllus tool. They showed this schema as valid schema definition but they are not able to generate valid xml document according to this Schema According to this schema. I have checked in the w3c standards also, I didn't find any restriction in the standards on This type of definitions.. So please let me know where is the problem.. Thanks & Regards, Kishore Kumar
Attachments
- text/xml attachment: ipo.xsd
Received on Wednesday, 8 March 2006 00:24:10 UTC