-
Notifications
You must be signed in to change notification settings - Fork 112
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
complexType gives error: could not find type _anon148 in namespace #65
Comments
This is certainly a bug. Looking at
and the element being referenced is element
The You can see this 'simplification' using the
Can you spot the error?
|
After reviewing the code, the bug is in the flattenRef function; when copying a reference to an object in another namespace, it fails to qualify any names contained within. |
I took a look at the flattenRef function, tried to check where this bug could be, but I couldn't find it. Probably, because even after reading the code, logging things, I still don't get completely what's going on. |
I've added a test that reproduces the issue in a much smaller example, in the import-type-from-otherns branch. |
Thanks for waiting @arjanvaneersel , I ran the command you provided after merging #66 and it produces output now. Please reopen if the issue isn't fixed for you. |
I'm using the package to create structs of some large XSD files. However I keep getting some error which I can't resolve. I'm not sure whether this is a bug or if I'm doing something wrong myself.
gen.go looks like this:
The first two lines go well, it's DeedV2.xsd which creates the error: 2018/01/14 06:27:39 complexType SubDeedType: could not find type "_anon148" in namespace http://www.registryagency.bg/schemas/deedv2 for element UIC
The XSD schemas are quite big, even the, in the error mentioned, SubDeedType is already a couple of hundred lines, so I put the schemas on pastebin instead of pasting them here:
DeedV2.xsd: https://pastebin.com/CSaKzDXn
FieldsSchema.xsd: https://pastebin.com/MuSrR29n
EnvelopeV2.xsd: https://pastebin.com/ipjwzkKN
xmldsig-core-schema.xsd: https://pastebin.com/VG14UTuJ
Any help is highly appreciated.
The text was updated successfully, but these errors were encountered: