W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2002

Query in schema

From: Seema Kumar <seema_kumar@datamatics.com>
Date: Fri, 12 Jul 2002 18:04:19 +0530
Message-ID: <00ed01c229a0$716d9b70$ef717441@datamatics.com>
To: <xmlschema-dev@w3.org>

Hi Everyone,
I am new to XML schema and have run into a problem while defining a schema
for one of our project.
The requirement is that any of the elements defined in the complex type
below is not mandatory,
but atleast one of them is required.


<xsd:complexType name="HorizontalDetail">
<xsd:sequence>
<xsd:element name="FirstName" type="StrWithMaxLen200" minOccurs="0"/>
<xsd:element name="LastName" type="StrWithMaxLen200" minOccurs="0"/>
<xsd:element name="EmailId" type="StrWithMaxLen50" minOccurs="0"/>
<xsd:element name="Telephone" type="StrWithMaxLen40" minOccurs="0"/>
<xsd:element name="UnitNo" type="StrWithMaxLen200" minOccurs="0"/>
<xsd:element name="StreetNo" type="StrWithMaxLen200" minOccurs="0"/>
<xsd:element name="StreetName" type="StrWithMaxLen200" minOccurs="0"/>
<xsd:element name="Location" type="LocationType" minOccurs="0"/>
<xsd:element name="ShortDescription" type="StrWithMaxLen200" minOccurs="0"/>
<xsd:element name="LongDescription" type="StrWithMaxLen2000" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>


Pls help.
Thanks in advance...


Thanks
Seema
Received on Friday, 12 July 2002 08:27:12 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:04 UTC