Re: Three equivalent ways to specify an unconstrained data type ... are there others?
Mukul Gandhi <[email protected]> Sun, 21 Oct 2012 09:48:35 +0530
| Newsgroups | gmane.text.xml.schema.devel |
|---|---|
| Message-ID | <CABuuzNPLmgqaUBnASVDorT108QbyQpZfjMNMQnC8ZxpS6LdoKw@mail.gmail.com> |
This is possibly one more way,
<xs:simpleType name="t-unconstrained-string">
<xs:union memberTypes="xs:string"/>
</xs:simpleType>
On Sat, Oct 20, 2012 at 5:34 PM, Costello, Roger L. <[email protected]> wrote:
> Hi Folks,
>
> Below are declarations of three elements, E1, E2, and E3. All three elements have the same data type: an unconstrained string. All other data types (boolean, integer, etc.) can be similarly specified. Thus there are 3 ways to specify the same thing for every built-in data type.
>
> Can you think of any other ways to specify an unconstrained data type?
>
> <xs:element name="E1" type="xs:string" />
>
> <xs:element name="E2" type="string-equivalent-1" />
>
> <xs:element name="E3" type="string-equivalent-2" />
>
> <xs:complexType name="string-equivalent-1">
> <xs:simpleContent>
> <xs:extension base="xs:string" />
> </xs:simpleContent>
> </xs:complexType>
>
> <xs:simpleType name="string-equivalent-2">
> <xs:restriction base="xs:string" />
> </xs:simpleType>
>
> /Roger
--
Regards,
Mukul Gandhi