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: Re: [regrep] [XML Schema issue] Replace choice with type substitution

Now I see (I was thinking of something else).  

SQLQuery and FilterQuery elements would be substitutionGroup'ed to the
Query element. So in the schema we would have:

<xsd:element name="Query" type="tns:AdHocQueryType" abstract="true"/>

<xsd:element name="SQLQuery" substitutionGroup="Query"

<xsd:element name="FilterQuery" substitutionGroup="Query"

And in the instance documents (as you mentioned):

<Query xsi:type="SQLQuery">


<Query xsi:type="FilterQuery">

Either way is fine with me.


Farrukh Najmi wrote:
> Chiusano Joseph wrote:
> ><Quote1>
> >Where AdhocQueryType is the base type for both SQLQueryType and
> >FilterQueryType.
> ></Quote1>
> >
> >AND
> >
> ><Quote2>
> >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.
> ></Quote2>
> >
> >Just to clarify - I think you're saying that AdhocQueryType is an
> >abstract type, and SQLQueryType and FilterQueryType are derived from it?
> >
> Above is correct understanding of the proposal.
> >If so, the following is not permitted:
> >
> ><element name="Query" type="tns:AdhocQueryType" minOccurs="1">
> >
> >because an element cannot be declared as an abstract type in W3C Schema
> >only as a type that is derived from an abstract type.
> >
> I believe that is not true. As far as I know, type substitution allows
> an abstract base type to be used as the type for element definition. It
> is like declaring a variable of base class type in Java to hold derived
> class instances.
> When you do an instance you specify (substitute) the precise type as
> follows:
> <Query xsi:type="SQLQuery">
> ....
> </Query>
> Am I missing something?
> --
> Regards,
> Farrukh
tel;work:(703) 902-6923
org:Booz | Allen | Hamilton;IT Digital Strategies Team
adr:;;8283 Greensboro Drive;McLean;VA;22012;
title:Senior Consultant
fn:Joseph M. Chiusano

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