W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2002

complexType's typedef

From: <wu.liu@verizon.com>
Date: Thu, 24 Jan 2002 17:49:26 -0500 (EST)
To: xmlschema-dev@w3.org
Message-ID: <OF926E6C1E.24C53AE5-ON85256B4B.007C1855@bell-atl.com>
Hi,

I have 2 data structures:
===============================================
struct MyStructType
{
      string      first;
      string      second;
};

typedef  MyStructType  MyTypedefType;
===============================================

The corresponding datatype for MyStructType in schema is:
=====================================================================
<complexType name="MyStructType">
      <sequence>
            <element name="first" type=string"/>
            <element name="second" type="string"/>
      </sequence>
</complexType>
=====================================================================

But how to treat typedef? The following definition gives me error:
=====================================================================
<complexType name="MyTypedefType">
      <restriction base="MyStructType "/>
</complexType>
=====================================================================

Please advise.

Thanks,
Wu
Received on Friday, 25 January 2002 13:21:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:26 GMT