I'm trying to understand why Xerces is rejecting what appears to be a simple restriction.
The base type permits either of A,B or A,C,D; the restricting types simply remove the choice: Base = (A,(B|(C,D))) i. Restriction = (A,B) -- OK ii. Restriction = (A,C,D) -- Not OK iii. Restriction = (A,(C,D)) -- Not OK iv. Restriction = (A,((C,D)|)) -- Not OK As the last two examples show, mimicking the structure of the base type with choices and sequences is too easily collapsed this to bluff it. I get the impression that this is related to MapAndSum [1]. From my uneducated reading, it seems like MapAndSum never considered the simple case where the sequence mapped entirely to one of the particles of the choice. XSV [2] accepts all four forms. I can see how this might be viewed as a valid interpretation of the specification, but it's a real nuisance. Should I raise a bug report on this? Cheers, Martin [1] http://www.w3.org/TR/xmlschema-1/#rcase-MapAndSum [2] http://www.w3.org/2001/03/webdata/xsv
