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

Complex or Simple content usage

  • To: xmlschema-dev@w...,xml-dev@l...
  • Subject: Complex or Simple content usage
  • From: Danny Vint <dvint@m...>
  • Date: Sun, 11 Aug 2002 10:06:19 -0700
  • In-reply-to: <158308031816.20020811173806@j...>
  • References: <0489A7888F080B4BA73B53F7E145F29A1B0B01@L...><0489A7888F080B4BA73B53F7E145F29A1B0B01@L...>

xsd simple content
I have a schema that validates with just about everything (XML Spy, Xerces) 
but not MS-XML.

The problem seems to be around the use of simpleContent or complexContent 
and these types:

Here are my base definitions of the types that I use:

    <xsd:complexType name="C-255">
       <xsd:simpleContent>
          <xsd:extension base="C-255_NoID">
             <xsd:attribute ref="id"/>
          </xsd:extension>
       </xsd:simpleContent>
    </xsd:complexType>
    <xsd:simpleType name="C-255_NoID">
       <xsd:restriction base="xsd:string">
          <xsd:maxLength value="255"/>
          <xsd:minLength value="1"/>
       </xsd:restriction>
    </xsd:simpleType>

I then have the following:

    <xsd:element name="HelpText">
       <xsd:complexType>
          <xsd:complexContent>
             <xsd:extension base="C-255">
                <xsd:attribute ref="xml:lang"/>
             </xsd:extension>
          </xsd:complexContent>
       </xsd:complexType>
    </xsd:element>

MS-XML indicates that instead of complexContent, the definition of HelpText 
should use simpleContent. Is this correct? Is this a real error or a 
preferred way to define this element?

If MS-XML is correct, could we have made the Schema process any more 
difficult? Why can't I use complexContent, with a type defined as a 
complexType and simpleContent with a type defined as simpleType?

..dan


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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-2013 All Rights Reserved.