[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Enumerated complex types

From: Guillaume Lebleu <gl@brixlogic.com>
Date: Wed, 19 Dec 2007 18:02:04 -0800
Message-ID: <4769CD1C.5080201@brixlogic.com>
To: Michael Kay <mike@saxonica.com>
CC: xmlschema-dev@w3.org
Re: Enumerated complex types

What I like about the external file is that in the context of my example 
(code lists), and in particular in the context of ACORD XML reinsurance 
specification, code lists can be exchanged in the form of an XML 
document similar to the one you described. Assuming this document is 
persisted as a file, allowing the XML Schema to refer to this file could 
be useful.

That said, what I don't like with the assert co-constraint approach, is 
that I don't see how an XML editor would leverage it for code assist. 
Perhaps you could expand on how you see the assert approach with 
external XML file as you described could work for code assist.

My idea was something like:

<xs:complexType name="GenericStatus_Type">
   <xs:sequence>
      <xs:element name="StatusCode" type="xs:string"/>
      <xs:element name="Severity" type="xs:string" minOccurs="0"/>
      <xs:element name="Desc" type="xs:string" minOccurs="0"/>
   </xs:sequence>
</xs:complexType>

<xs:complexType name="Status_Type">
    <xs:restriction base="GenericStatus_Type">
       <xs:enumeration>
          <ifx:StatusCode>100</ifx:StatusCode>
          <ifx:Status>Error</ifx:Status>
          <ifx:Desc>General Error</ifx:Desc>
       </xs:enumeration>
    </xs:restriction>
</xs:complexType>

The Status_Type could be also part of a separate xs:include xsd file 
that can be easily updated dynamically given an XML document containing 
the code list. Code assist would be quite easy too.

Guillaume
Received on Thursday, 20 December 2007 02:02:22 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.