OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XML Schema: DOs and DON'Ts



Hi, I've read your document and have a few questions/observations ( and, in
the interests of full disclosure, I *am* a member of the XML Schema Working
Group );


1.    I'm curious as to how you would validate an element that had either
attributes and/or element descendants without using complex types. I may
have missed a major point here but I can't see how to validate;

    <person>
      <name>Martin</name>
      <age>33</age>
    </person>

without defining a complex type to describe the content of person. So, are
you saying "don't use complex types" or are you saying "don't use named
complex types"?


2.    Restriction gives you more that just error checking. You also get a
type relationship between the base type and the derived type. Such a
relationship allows polymorphism which for *some* people is a very useful
feature.

3.    At the end of the day model groups only actually get used when they
are referenced as part of a complex type definition.

4.    Regarding your comment about attribute groups, why not just use a
local attribute declaration? That *is* what you get anyway despite the
syntactic sugar that, it would seem, makes you think otherwise.

5.    Regarding local declarations. I have to take issue with your assertion
that;

<foo:person xmlns:foo="http://best.practice.com">
  <familyName> KAWAGUCHI </familyName>
  <lastName> Kohsuke </lastName>
</foo:person>
is 'bad use of XML namespaces'. I have lots and lots of places where I use
*exactly* that approach and it works very nicely for what I do. I don't
think you can call this one way or the other. Neither approach is *wrong*,
they're just different
6.    I wait with bated breath your comments on substitution groups. To my
mind they are one of the most useful features in XML Schema because they
allow me to avoid using xsi:type ( a cast ) in my instance documents. This
ties in with the polymorphism issue refered to in 1.

7.    Chameleon schemas. I don't feel strongly about this but another way of
looking at the problem is this; use local declarations instead if global
declarations.

Just some thoughts off the top of my head. I'll try and post some more
coherent comments around May 28th ( I just got of a long-haul flight and
won't have time for more comments before then )

Regards

Martin Gudgin
DevelopMentor

P.S. All your namespace URIs for schema have a type they should be
http://www.w3.org/2001/XMLSchema *not* http://www.w3.org/2001/XMSchema (
note missing 'L' character )



----- Original Message -----
From: "Kohsuke KAWAGUCHI" <kohsukekawaguchi@yahoo.com>
To: <xml-dev@lists.xml.org>
Sent: Wednesday, May 16, 2001 6:37 PM
Subject: ANN: XML Schema: DOs and DON'Ts


>
> Hi,
>
> For those who are struggling to learn XML Schema, I wrote an article.
>
> http://www.geocities.com/kohsukekawaguchi/XMLSchemaDOsAndDONTs.html
>
> Comments are welcome. Enjoy!
>
>
> regards,
> ----------------------
> K.Kawaguchi
> E-Mail: kohsukekawaguchi@yahoo.com
>
>
> ------------------------------------------------------------------
> The xml-dev list is sponsored by XML.org, an initiative of OASIS
> <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To unsubscribe from this elist send a message with the single word
> "unsubscribe" in the body to: xml-dev-request@lists.xml.org