OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

regrep message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: [regrep] [XML Schema issue] Replace choice with type substitution


In new V3 schema we have consistently used type substitution instead of 
choice construct when defining XMl schema. Choice in the pinion of many 
is not very object oriented and implementation experience has shown that 
it complicates design.

I would like to ask if any one has objections if we replace occurrences 
of <choice> in the schema with type substitution. Here is an example of 
how teh proposal effects the schema:

Old Way
In query.xsd the definition of AdhocQueryRequest looks like:

   <element ref = "tns:ResponseOption" minOccurs="1" maxOccurs="1" />
   <choice minOccurs="1" maxOccurs="1">
     <element ref = "tns:FilterQuery"/>
     <element ref = "tns:SQLQuery"/>

New Way
Above Old Way would look like this under the proposal:

   <element ref = "tns:ResponseOption" minOccurs="1" maxOccurs="1" />
   <element name="Query" type="tns:AdhocQueryType" minOccurs="1" </sequence>

Where AdhocQueryType is the base type for both SQLQueryType and 

Now code can be written using Object oriented principals so that there 
is a AdhocQueryType class that is extended by SQLQueryType and 
FilterQueryType classes. Either type of query may be abstractly 
represented as a AdhocQueryType.

Thanks for your input on this issue.

To subscribe or unsubscribe from this elist use the subscription
manager: <http://lists.oasis-open.org/ob/adm.pl>

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]