|
The article and the approach is interesting, but I think there's something that doesn't work. I explain my idea:
One of the examples define the complexType USAddress as an extension of Address.
Both address and USAddress complexType uses the <all> model group, and I'm not sure if this is possible. As far as I understand the W3C "XML Schema: Structures" Recommendation doesn't permit an "all" to be extended: the "all" group should be the "top-most" thing in the content model.
I tested the sample schema with Xerces-J 1.4.3: when I try to validate an XML against such schema Xerces gives the following error:
Schema error: ComplexType 'USAddress': cos-all-limited.1.2: An "all" model group that is part of a complex type definition must constitute the entire {content type} of the definition..
Is this a Schema error or some Xerces limitations?
Regards
Marco S.
|