Skip to content

Issues when generating from multi-file schema #106

@sachaw

Description

@sachaw

Description

I'm trying ot generate code from several XSD files and have hit a few issues outlined below:

  • multiple XSD's referencing a type of the same name (seperate definitions) appear as duplicate types.

    • Might there be some way to label/namespace these based on the xmlns tag?
  • When generating code for a folder of XSD's, it appears that some files are duplicately created in a nested folder with the name of input folder.
    This only seems to appear for files that have been referenced via a xsd:import tag in multiple files.
    for example:

.
├── gen
│   ├── diagnostics.xsd.go
│   ├── EnterpriseSecurity_1_4.xsd.go
│   ├── envelope.xsd.go
│   ├── internal.xsd.go
│   ├── markings.xsd.go
│   ├── master.xsd.go
│   ├── network.xsd.go
│   ├── NSInternal.xsd.go
│   ├── schema
│   │   ├── EnterpriseSecurity_1_4.xsd.go
│   │   ├── markings.xsd.go
│   │   └── network.xsd.go
│   ├── security.xsd.go
│   ├── topic.xsd.go
│   └── x509pki.xsd.go
├── go.mod
└── schema
    ├── diagnostics.xsd
    ├── EnterpriseSecurity_1_4.xsd
    ├── envelope.xsd
    ├── internal.xsd
    ├── markings.xsd
    ├── master.xsd
    ├── network.xsd
    ├── NSInternal.xsd
    ├── security.xsd
    ├── topic.xsd
    └── x509pki.xsd

Output of go version:

go version go1.24.7 linux/amd64

xgen version or commit ID:

xgen version: 0.1.0

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