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:

>Where AdhocQueryType is the base type for both SQLQueryType and 
>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.
>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 

<Query xsi:type="SQLQuery">

Am I missing something?


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]