Skip to content
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

Only flatten a type once #88

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

boekkooi-fresh
Copy link

This should resolve issue #86

This should resolve issue droyo#86
@droyo
Copy link
Owner

droyo commented Jun 14, 2019

Thank you for opening this. Are you sure this resolves #86 ? #86 happens during parsing within the xsd package, but your change is to the xsdgen package. I have a unit test reproduction in the recursive-types branch.

Instead this looks more like a performance optimization. Does this change the xsdgen output at all?

@t0rr3sp3dr0
Copy link

It solved an infinity loop problem that had when running xsdgen!

@t0rr3sp3dr0
Copy link

But… it generated invalid recursive types

@boekkooi-fresh
Copy link
Author

@droyo Sorry in my haste to go to have a holiday I miss read the 86 ticket I will fix this once I figure out the error @t0rr3sp3dr0 is having.

@t0rr3sp3dr0 Could you maybe provided me with the xsd that you used where you noticed the invalid types that are generated? Thanks in advance

@t0rr3sp3dr0
Copy link

t0rr3sp3dr0 commented Jul 6, 2019

Sure @boekkooi-fresh! I was trying to generate models for SAML. They are all packed together at https://docs.oasis-open.org/security/saml/v2.0/saml-2.0-os-xsd.zip. I’ve solved the problem by converting all fields that had omitempty tag to pointers.

PS: I also had to change encoding for one document, it was US-ASCII and it just worked when changed it to UTF-8. I don’t know if it is a known problem of the tool, but I can assure you the files are well-formed as I’ve generated Java classes for it using xjc.

PS2: To make it simpler for you, disconsider all saml-schema-authn-* files. Unfortunately you’ll still have to download some dependencies such as xmlenc.

vraut-pdgc added a commit to vraut-pdgc/go-xml that referenced this pull request Dec 6, 2021
m29h pushed a commit to m29h/go-xml that referenced this pull request Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants