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

Re: Why Are Schemas Hard? (WAS RE: "Uh, what do I need this for" (wasRE:

  • From: Peter Piatko <piatko@r...>
  • To: Jeff Lowery <jlowery@s...>,'Michael Brennan' <Michael_Brennan@a...>,"'Bullard, Claude L (Len)'" <clbullar@i...>,'Nicolas LEHUEN' <nicolas.lehuen@u...>
  • Date: Fri, 24 Aug 2001 11:23:55 -0400

Re: Why Are Schemas Hard? (WAS RE: "Uh
Jeff, et al,

----- Original Message -----
From: "Jeff Lowery" <jlowery@s...>
To: "'Michael Brennan'" <Michael_Brennan@a...>; "'Bullard, Claude L
(Len)'" <clbullar@i...>; "'Nicolas LEHUEN'" <nicolas.lehuen@u...>
Cc: "'xml-dev'" <xml-dev@l...>
Sent: Thursday, August 23, 2001 8:14 PM
Subject: RE: Why Are Schemas Hard? (WAS RE: "Uh, what do I need this for"
(was RE: XML.COM: How I Learne d t o Love daBomb))


> > > 1.  What about Schemas is hard?
>
> To me, it boils down to whether they're conceptually hard or syntactically
> hard. If it's the later, then tools will mask the syntax difficulties. It
> seems the WG went beyond well-formedness and strived to remove any
implicit
> assumptions, for example:
>
> <element name="foo">
> <complexType>
> <sequence>
> <element name="bar" type="string"/>
> <element name="baz" type="integer"/>
> </sequence>
> <attribute name="qux" type="decimal"/>
> </complexType>
> </element>
>

At the risk of sounding like a broken record about this, I find that it is
too easy to declare local elements without really meaning to (did you really
intend for <bar> and <baz> to be locally scoped?).  One can argue about the
various merits/demerits of local scoping, but the concept should be made
clear to the schema author.  I'd almost be happy with a <local-element>
element.

<snip/>

> If Schemas are conceptually hard, that's a different matter. certainly the
> rules for namespaces, <all> model groups, and seemingly odd inheritance
> restrictions certainly are difficult to master. Here, tools may help by
> enforcing these rules through edit controls and choice presentation, but
> that's not sufficient for understanding by the schema author. To
understand,
> he needs not only to know the spec (which is no easy task), but the
> decisions and compromises that were made in the writing of the
> Recommendation.

Neglecting local elements for a moment, I didn't find the rules for
namespaces overly difficult.  Then again, maybe there are some esoteric
rules that I just don't know about.  I couldn't figure out the reason behind
the elementFormDefault attribute until I started reading this list---I
vaguely understood the rules, but not the purpose behind it.  I think this
is an area where the Part 0 tutorial could be enhanced.  I can't say that I
totally understand model groups, substitution groups and all of the
inheritance rules.

OTOH, I believe I can write simple schemas w/o ever using these features.  I
am a firm believer that simple tasks should be easy to do.  Sometimes
complex tasks are hard to do and there is no getting around it, so perhaps
some of the complexities of XML Schema are necessary.  As long as they don't
get in the way of the simple tasks I'd be happy.

<snip/>

Thanks,

Peter


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.