XML.com: XML From the Inside Out

XML.comWebServices.XML.comO'Reilly Networkoreilly.com
  Articles | Weblogs | Newsletter | Safari Bookshelf
advertisement

Article:
 Understanding W3C Schema Complex Types
Subject: Not that simple
Date: 2001-09-07 09:24:22
From: Vitaliy Zavesov Zavesov

I agree that schemas are understandable, as any programming language is, but they are by no means simple. Consider the following example,


<complexType name="SomeName">
<complexContent>
<extension base="SomeBase">
<sequence>
elements
</sequence>
attributes
</extension>
</complexContent>
</complexType>


1) Why do we need to specify that SomeName is a complex type? It was my experience that one barely ever uses the simple type. Why does W3C not make the complex type a default?


2) The same applies to complex content. W3C can make it a default.


3) Wy not make the sequence model group a default since it is used most often?


If all of these suggestions were implemented, the above example would be changed to


<type name="SomeName">
<extension base="SomeBase">
elements
attributes
</extension>
</type>


This would make more sense and save 6 (!) lines of code. Or whould it be too difficult to make software that would validate it correctly?


Previous Message Previous Message   Next Message Next Message


Titles Only Titles Only Newest First
  • Not that simple
    2003-07-14 10:53:13 Eric Hsu [Reply]

    I to am wondering about having that <sequence> element all over the place. Even for complex types that contain only one other element.


    Is there a way around this?


    It wasn't necesary in schema 2000/10 i think

  • Not that simple
    2003-07-14 10:53:12 Eric Hsu [Reply]

    I to am wondering about having that <sequence> element all over the place. Even for complex types that contain only one other element.


    Is there a way around this?


    It wasn't necesary in schema 2000/10 i think

Sponsored By:


Contact Us | Our Mission | Privacy Policy | Advertise With Us | | Submissions Guidelines
Copyright © 2008 O'Reilly Media, Inc. | (707) 827-7000 / (800) 998-9938