W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2005

using the maxOccurs contruct with sequences.

From: <Ken_Gross@Countrywide.Com>
Date: Mon, 14 Mar 2005 08:55:53 -0800
To: xmlschema-dev@w3.org
Message-ID: <OF9242F738.46F4C4FC-ON88256FC4.005CAA5D-88256FC4.005D01E5@countrywide.com>
In the following example, there are two representations of an unbounded 
sequence of elements in  "ReportOptionsModel".   Is the first 
representation ever justified?  If it is, when should it be used?

----------------------------------------- 

<?xml version="1.0" encoding="UTF-8"?>
<w3cSchema:schema 
xmlns:StandardType="http://www.countrywide.com/SMTG/XMLSchema/StandardType" 
xmlns:TransactionClass="http://www.countrywide.com/SMTG/XMLSchema/TransactionClass" 
xmlns:w3cSchema="http://www.w3.org/2001/XMLSchema" 
xmlns:AIRulesServiceRunModel="http://www.countrywide.com/SMTG/XMLSchema/AIRulesServiceRunModel" 
targetNamespace="http://www.countrywide.com/SMTG/XMLSchema/AIRulesServiceRunModel" 
elementFormDefault="unqualified" attributeFormDefault="unqualified">
        <w3cSchema:complexType name="ReportOptionsModel1">
                <w3cSchema:sequence maxOccurs="unbounded">
                        <w3cSchema:element name="Filter"/>
                </w3cSchema:sequence>
        </w3cSchema:complexType>
        <w3cSchema:complexType name="ReportOptionsModel2">
                <w3cSchema:sequence>
                        <w3cSchema:element name="Filter" 
maxOccurs="unbounded"/>
                </w3cSchema:sequence>
        </w3cSchema:complexType>
</w3cSchema:schema>
Received on Monday, 14 March 2005 16:56:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:49 GMT