Closed GoogleCodeExporter closed 8 years ago
The element type was set incorrectly for the following two use cases:
1. The declaration for element A lacks a type attribute and is in subgroup of
element b; the declaration for element b also lacks a type attribute and is in
subgroup of c; the element declaration for element c does have a type
attribute. In this case elements a and b should have the same type as element
c; instead, they are set to xs:anyType.
2. The declaration for element A lacks a type attribute and is in the subgroup
of element b; element b is from an imported document and that document has
already been parsed, placing element b in the SchemaComponentCache for already
parsed documents. Element A's type is improperly set to xs:anyType.
Original comment by joe.bays...@gmail.com
on 10 Nov 2014 at 4:12
(r519)
To address use case #1 from previous comment, we modified the
XMLSchemaCache.computeSubstitutionGroup method to be recursive, so that
elements w/o typeRefs but w/substitution groups can have their type properly
set.
To address use case #2, we modified the XMLSchemaConverter.convertElement
method. Now, if an element's typeRef is the complexUrType (indicating the lack
of a type attribute in the element declaration) and the element is a member of
a substitutionGroup, we use the substitutionGroupHead's type as the element
type.
Original comment by joe.bays...@gmail.com
on 10 Nov 2014 at 4:19
Original issue reported on code.google.com by
joe.bays...@gmail.com
on 3 Nov 2014 at 6:08