schema validation : choice with min/maxOccurs in group not allow ? 2003-05-26 - By Sandy Gao
> I have a problem of XML schema validation with Xerces 2.4.0. it seems > that the inclusion of an element 'choice' with the attributs minOccurs > and/or maxOccurs into a element 'group' was not allow by xerces.
If you look at section 3.7.2 of the structure spec [1], you'll find the following (right before 3.7.3)
"Also note that in the first (named) case above no reference is made to minOccurs or maxOccurs: this is because the schema for schemas does not allow them on the child of <group> when it is named. This in turn is because the {min occurs} and {max occurs} of the particles which refer to the definition are what count."
This is clear that min/maxOccurs attributes are not allowed on <all/sequence/choice> that's a direct child of a named group.
> Whereas it validates with XMLSpy
Maybe you should complain about XMLSpy. :-)
> and some exemples are built this way > in specifications.
Could you be more specific? If there are such examples, the spec is in error.
[1] http://www.w3.org/TR/xmlschema-1/#declare-namedModelGroup
Hope this helps, Sandy Gao Software Developer, IBM Canada (1-905) 413-3255 sandygao@(protected)
--------------------------------------------------------------------- To unsubscribe, e-mail: xerces-j-user-unsubscribe@(protected) For additional commands, e-mail: xerces-j-user-help@(protected)
|
|