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

RE: complexType's typedef

From: <wu.liu@verizon.com>
Date: Fri, 25 Jan 2002 13:46:14 -0500 (EST)
To: xmlschema-dev@w3.org, jeni@jenitennison.com
Cc: wu.liu@verizon.com
Message-ID: <OFB676DC40.A71DBC81-ON85256B4C.0066E7A6@bell-atl.com>

---------------------- Forwarded by WU LIU/EMPL/VA/Bell-Atl on 01/25/2002
01:48 PM ---------------------------


WU LIU
01/25/2002 01:42 PM

To:    Mark Feblowitz <mfeblowitz@frictionless.com>
cc:    cevans26@csc.com
Subject:    RE: complexType's typedef  (Document link: WU LIU)

Hi Mark,

Here is what we made it to work. Let us know if this correct or there is a
better way. Thanks!!!
============================================================================
<complexType name="MyTypedefType">
      <complexContent>
            <extension base="MyStructType "/>
      </complexContent>
</complexType>
============================================================================




Mark Feblowitz <mfeblowitz@frictionless.com> on 01/25/2002 01:34:09 PM

To:    WU LIU/EMPL/VA/Bell-Atl@VZNotes
cc:
Subject:    RE: complexType's typedef


Let's see if I can get this one right:




----------------------------------------------------------------------------

----

Mark Feblowitz                                   [t] 617.715.7231
Frictionless Commerce Incorporated     [f] 617.495.0188
XML Architect                                     [e]
mfeblowitz@frictionless.com
400 Technology Square, 9th Floor
Cambridge, MA 02139
www.frictionless.com


 -----Original Message-----
From:       wu.liu@verizon.com [mailto:wu.liu@verizon.com]
Sent: Thursday, January 24, 2002 5:49 PM
To:   xmlschema-dev@w3.org
Subject:    complexType's typedef

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 Saturday, 26 January 2002 15:29:58 GMT

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