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

Re: xml schema

  • To: Dare Obasanjo <dareo@m...>, xml-dev@l...
  • Subject: Re: xml schema
  • From: Paul Prescod <paul@p...>
  • Date: Sun, 01 Sep 2002 11:22:41 -0700
  • References: <8BD7226E07DDFF49AF5EF4030ACE0B7E07A971C9@r...>

Re:  xml schema
Dare Obasanjo wrote:
> 
> In my personal opinion, an article that advises against using complex
> types in W3C XML Schema cannot claim to be without bias. 

*In context* the admonisment seems quite reasonable to me. Essentially
he is saying: "XML Schema allows you to make a distinction between types
and elements but most people can get away without such a distinction and
arguably the distinction is not useful anyhow. So use a subset of XML
Schema that re-unifies elements and types and get on with life."

Note that he never said: "don't type <xs:complexType>" because then XML
Schema would really be useless. He said don't treat the element as a
first-class concept. Treat it as boilerplate syntax.

"Furthermore, you won't lose anything by not using complex types: if a
schema can be written by using complex types, then you can always write
it without complex types. To be precise, you can always write it without
understanding complex types, but unfortunately you have to type
<complexType> elements."

 * http://www.xml.com/pub/a/2001/06/06/schemasimple.html#avoid_complex

"In short, a complex type is a model group, plus inheritance, minus ease
of use. A complex type and a model group are similar in the sense that
they are used to define content models. A complex type lacks ease of use
because you can't use it from other complex types or model groups. On
the other hand, model groups can be used without such restriction."

"... None of these problems occur if you use model groups instead of
complex types. When it comes to derivation by restriction, a general
understanding isn't enough; you need a very detailed understanding of
how it works."

So whether he is right or wrong, he argues clearly and IMO, without any
discernable bias. The article does seem a bit "rushed" and the points
could have been stated more clearly. For instance he could have said:
"Do not use complex types outside of element declarations."
-- 
 Paul Prescod

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.