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




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




----------------------------------------------------------------
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]