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

Re: ANN: XML Schema: DOs and DON'Ts

  • From: Martin Gudgin <marting@d...>
  • To: Kohsuke KAWAGUCHI <kohsukekawaguchi@y...>,Jeff Lowery <jlowery@s...>, Eddie Robertsson <eddie@a...>,xml-dev@l...
  • Date: Thu, 17 May 2001 21:37:19 +0100

schema dos

----- Original Message -----
From: "Kohsuke KAWAGUCHI" <kohsukekawaguchi@y...>
To: "Jeff Lowery" <jlowery@s...>; "Eddie Robertsson"
<eddie@a...>; <xml-dev@l...>
Sent: Thursday, May 17, 2001 9:17 PM
Subject: Re: ANN: XML Schema: DOs and DON'Ts


>
> > > I understand that you can't believe what I said. But the fact is, the
> > > spec explicitly prohibits this. If you have some time and plenty
> > > of patience, see the spec:
> > > http://www.w3.org/TR/xmlschema-1/#rcase-Recurse
> >
> > Looking at this, I see rules for model groups, not enumeration facets. I
> > don't believe enumerations facets are order-dependent, if that's your
point.
> > Restriction of enumerations is allowed, and such appears in the Schema
for
> > Schemas (Normative) section of the Recommendation.
>
> Maybe I'm missing something big, but when did we talk about restriction
> of simple type by enumerations?
>
> I think we are talking about restriction of <all> particle.

We are. The example given is;
Base type:
<xs:all>
  <xs:element name="a" />
  <xs:element name="b" />
  <xs:element name="c" />
</xs:all>

New type derived by restriction:
<xs:all>
  <xs:element name="b" />
  <xs:element name="a" />
</xs:all>

and you are correct, it's *not* a valid restriction because in restriction
you *must* list the particles in the same order in the derived type as they
were in the base type. Reversing the order of the element decls for a and b
in this case is what causes the problem.

I still don't really get the thrust of the document though... I think that
rather than saying 'use model groups instead of complex types' ( which is,
in fact, impossible ) you want to say 'use anonymous complex types instead
of named complex types' and possibly 'do not use type inheritance'. As
stated earlier I don't agree with either of these positions but I think they
more accurately capture the direction you are taking.

Talking about model groups the way you do is as confusing as the way you
talk about attribute groups, to me, at least because you can only use model
groups as part of complex types.

Martin


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.