OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Complex or Simple content usage

[ Lists Home | Date Index | Thread Index ]
  • To: xmlschema-dev@w3.org,xml-dev@lists.xml.org
  • Subject: Complex or Simple content usage
  • From: Danny Vint <dvint@mindspring.com>
  • Date: Sun, 11 Aug 2002 10:06:19 -0700
  • In-reply-to: <158308031816.20020811173806@jenitennison.com>
  • References: <0489A7888F080B4BA73B53F7E145F29A1B0B01@LANMHS20.rd.francetelecom.fr><0489A7888F080B4BA73B53F7E145F29A1B0B01@LANMHS20.rd.francetelecom.fr>

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





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS