[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: XML Schema: DOs and DON'Ts
- From: "Arnold, Curt" <Curt.Arnold@hyprotech.com>
- To: "'email@example.com'" <firstname.lastname@example.org>
- Date: Wed, 23 May 2001 12:43:53 -0600
> Kohsuke KAWAGUCHI wrote:
> So if you have the general concept only and doesn't have any specific
> details of the derivation-by-restriction, then you would
> probably think
> this is a valid restriction, which was my intention.
> My reasoning was
> - when it comes to the derivation-by-restriction, the general
> understanding is not enough. You need to learn many specific details
> of the derivation by restriction.
> - so compared to its merit, it doesn't worth learning.
My feeling was that other than trivial cases, it was so complex
that interoperability of implementations should not be expected.
I guess we/they will find that out in the development of
the Schema conformance suite. I would suggest avoiding it for
general use and use named content and attribute groups.
Substitution groups are also problematic for complex schemas.
I recently wrote a fairly complex schema for defining DOM
conformance tests and my original approach was to use a
"statement" substitution group to represent all the statements
in the language, trying to define all the complex types in
use as a derivation of the base "statement" complex type was
extremely cumbersome and difficult.
I eventually bailed and used an named group though I
would have liked to have had the implicit membership
of substitution groups. I was also having serious
difficulty defining a substitution
group that contained both elements with simple content
and elements with complex content. Maybe it is possible,
but I couldn't make it work and I'm not a novice.