RE: complexType's typedef

---------------------- 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 UTC