Attached is the changes to rim.xsd if we went ahead with the proposed
change. The lines starting with '-' are being removed. The line starting
with '+' are being added. Other lines are shown for visual context.
Notice how much cleaner the schema gets.
Farrukh Najmi wrote:
>
> Team,
>
> 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:
>
> <sequence>
> <element ref = "tns:ResponseOption" minOccurs="1" maxOccurs="1" />
> <choice minOccurs="1" maxOccurs="1">
> <element ref = "tns:FilterQuery"/>
> <element ref = "tns:SQLQuery"/>
> </choice>
> </sequence>
>
> New Way
> -------
> Above Old Way would look like this under the proposal:
>
> <sequence>
> <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
> FilterQueryType.
>
> Benefits
> ---------
> 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>
--
Regards,
Farrukh