<!-- If you are reporting a new issue, make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead. Use the commands below to provide key information from your environment: You do NOT have to include this information if this is a FEATURE REQUEST --> If you have an .xsd with a non-top-level element like this: `<element ref="here:SomeTopLevelElement">` It will not create a usable go struct <!-- Briefly describe the problem you are having in a few paragraphs. --> **Steps to reproduce the issue:** 1. See test cases from this PR: https://github.com/xuri/xgen/pull/100 2. MyType11 will look like this without the fix from the PR: ``` // MyType11 ... type MyType11 struct { HereSubLevel *MyType12 `xml:"here:SubLevel"` } ``` **Describe the results you received:** The MyType11 struct above will not support being unmarshalled into, if the <SubLevel> element does not have an explicit namespace (`here:`) set **Describe the results you expected:** Should work with global namespaces set (`xmlns="http://example.org/"`) not just named namespaces (`xmlns:here="http://www.w3.org/2001/XMLSchema"`) **Output of `go version`:** ```text go version go1.24.2 darwin/arm64 ``` **xgen version or commit ID:** ```text d9d0ba0e21ddfb95ded66c033276c4c066e08a34 ``` **Environment details (OS, physical, etc.):**
If you have an .xsd with a non-top-level element like this:
<element ref="here:SomeTopLevelElement">It will not create a usable go struct
Steps to reproduce the issue:
Describe the results you received:
The MyType11 struct above will not support being unmarshalled into, if the element does not have an explicit namespace (
here:) setDescribe the results you expected:
Should work with global namespaces set (
xmlns="http://example.org/") not just named namespaces (xmlns:here="http://www.w3.org/2001/XMLSchema")Output of
go version:xgen version or commit ID:
Environment details (OS, physical, etc.):