-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xsdgen: duplicated fields for nested complexType #41
Comments
The bug is here: Line 368 in a7f8c78
Ironically I had the comment "It's OK to modify ref", but I neglected to say "It's not OK to modify real" :) |
Sorry, the above case is still failed. Could you please take a double check? |
OK, I pushed the I can see what's happening now; we give the anonymous I think a sensible approach would be to move any nested type declarations up to the top-level if/when they get a name. Need to be a little careful when "un-nesting" anonymous types that themselves contain anonymous types. That said, the current behavior shouldn't do any harm; the duplicated anonymous type is simply ignored. PR #43 fixed the harmful error where the source element was renamed. |
Ah, I can see the other problem; the type name is copied, so now you have two types named |
This avoids unnecessary copying when dereferencing links in XSD, which can introduce duplicate type names (see #41). One caveat to this change is that elements that contain chardata alongside anonymous types, that chardata will be removed. I'm fine with this.
Ok, this should be fixed. Give it a try and let me know if you have any trouble. |
Confirmed, and thanks! |
This avoids unnecessary copying when dereferencing links in XSD, which can introduce duplicate type names (see droyo#41). One caveat to this change is that elements that contain chardata alongside anonymous types, that chardata will be removed. I'm fine with this.
Such as the following diff:
The text was updated successfully, but these errors were encountered: