[Home] [By Thread] [By Date] [Recent Entries]
Title: RE: Complex type inheritance is evil! Yep, I'd played around with that and it solved the problem. However, as I posted on the W3C list to HT's answer, it leaves a very clear inconsistency: If I try restricting the following: <xsd:complexType name="Items">
the restriction of the anonymous simple type for the element "quantity" is acceptable, but the restriction of the anonymous simple type for the attribute "shipBy" is not. Maybe this is just a misinterpretation in Xerces, but if it is intended to be allowed then what is the rationale for treating anonymous types of elements differently from anonymous types of attributes? In any case, I can't help agree somewhat. If we all agree not to use them, perhaps restrictions will just go away (although I have to say, if you can manage it intelligently, both extension and restriction have some application in design in combination with the use of abstract types) John -----Original Message-----
> My question:
I think the latter is the case. I believe the problem is the anonymous simple type definition. You are using an anonymous type: <xsd:simpleType>
Although the spec is unclear about this, but in practice two
It is very hard for validators to consider them as equal. Imagine a
Things like this is just the tip of iceberg. So I'd suggest not to use
http://www.geocities.com/kohsukekawaguchi/XMLSchemaDOsAndDONTs.html Or if you really need to use restriction, then I think you can avoid the
<xsd:simpleType name="upto100integer">
regards,
|

Cart



