W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2021

Re: union of complex types

From: Michael Kay <mike@saxonica.com>
Date: Fri, 16 Jul 2021 09:41:13 +0100
Cc: xmlschema-dev@w3.org
Message-Id: <3FAF8B59-EDB1-4650-A43B-5A0A3BF1BC15@saxonica.com>
To: Mukul Gandhi <mukulg@softwarebytes.org>
Provide some rationale / justification / use cases.

Most of the use cases that immediately come to mind can be satisfied with xs:choice and/or type alternatives.

Of course you will be aware that there is no active work on XSD - and I would think that further developments are highly unlikely.

Michael Kay
Saxonica

> On 16 Jul 2021, at 04:59, Mukul Gandhi <mukulg@softwarebytes.org> wrote:
> 
> Hi all,
>     XSD language already provides, for union syntax for the simple types as follows,
> 
> <!-- here the XSD language already provides, that Type1 and Type2 can only be simple types -->
> <xs:simpleType name="ST1">
>     <xs:union memberTypes="Type1 Type2" />
> </xs:simpleType>
> 
> I propose, a similar new facility for XSD complex types, as follows,
> 
> <!-- Type3 and Type4 can be any complex types -->
> <xs:element name="X">
>      <xs:complexType>
>          <xs:union memberTypes="Type3 Type4" />
>      </xs:complexType>
> </xs:element>
> 
> Any thoughts shall be interesting to know.
> 
> 
> -- 
> Regards,
> Mukul Gandhi
Received on Friday, 16 July 2021 08:41:30 UTC

This archive was generated by hypermail 2.4.0 : Friday, 16 July 2021 08:41:31 UTC