ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> xml-dev
xml-dev
[xml-dev] Complex or Simple content usage
by Danny Vint other posts by this author
Aug 11 2002 5:06PM messages near this date
[xml-dev] how would one define credible linking? | [xml-dev] Re: Complex or Simple content usage
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


-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org> , an
initiative of OASIS <http://www.oasis-open.org> 

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl> 
Thread:
Danny Vint
Jeni Tennison

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved