Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Schema issue Schema issueTo: NULL Date: 3/20/2009 12:46:00 PM Hi, I have to define a schema as below but this is not valid according to schema rules. It violates the followign rule because I have element B as minOccurs = 0. It is fine if I make B as MinOccurs = 1. http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/#cos-nonambig How can I have define the schema in this situation so as to not violate the above rule. <?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://test.xsd" targetNamespace="http://test.xsd" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xsd:element name="X" type="X"/> <xsd:complexType name="X"> <xsd:sequence> <xsd:element name="A" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/> <xsd:element name="B" type="xsd:string" minOccurs="0" maxOccurs="1"/> <xsd:element name="A" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:schema> Thanks Rahul | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
