Skip to content

complexType gives error: could not find type _anon148 in namespace #65

@arjanvaneersel

Description

@arjanvaneersel

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:

package schemas

//go:generate xsdgen -ns http://www.w3.org/2000/09/xmldsig# -pkg schemas -o xmldsig-core-schema.go xmldsig-core-schema.xsd
//go:generate xsdgen -ns http://www.registryagency.bg/schemas/deedv2/Fields -pkg schemas -o FieldsSchema.go FieldsSchema.xsd
//go:generate xsdgen -ns http://www.registryagency.bg/schemas/deedv2 -pkg schemas -o DeedV2.go DeedV2.xsd FieldsSchema.xsd
//go:generate xsdgen -ns http://www.registryagency.bg/schemas/envelopev2 -pkg schemas -o Envelopev2.go FieldsSchema.xsd DeedV2.xsd Envelopev2.xsd

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions