[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Complex type inheritance is evil!
- From: "K.Kawaguchi" <email@example.com>
- To: firstname.lastname@example.org
- Date: Wed, 06 Jun 2001 13:06:35 -0700
> My question:
> Is this an error in the Primer or in the validator? Or am I missing some
> arcane point about restrictions?
I think the latter is the case.
I believe the problem is the anonymous simple type definition.
You are using an anonymous type:
Although the spec is unclear about this, but in practice two
independently derived simple types are considered different, even if
they are derived in exactly the same way.
It is very hard for validators to consider them as equal. Imagine a
simple type who has tons of facets!
Things like this is just the tip of iceberg. So I'd suggest not to use
extension/restriction at all. As I advocate in my "DOs and DON'Ts".
Or if you really need to use restriction, then I think you can avoid the
problem by getting rid of anonymous datatypes.