Open nettnikl opened 3 weeks ago
Is this the same issue?
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://example.com/schemas"
xmlns:ak="http://example.com/schemas"
elementFormDefault="qualified">
<xsd:simpleType name="CCC">
<xsd:restriction base="ak:GGG">
<xsd:minLength value = "4" fixed = "true" />
</xsd:restriction>
</xsd:simpleType>
<!-- This seems wrong, it should be GGG, not string -->
<!-- // CCC ...-->
<!-- type CCC string-->
<xsd:simpleType name="GGG">
<xsd:annotation><xsd:documentation>FFF</xsd:documentation></xsd:annotation>
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<!-- // GGG is FFF-->
<!-- type GGG string-->
</xsd:schema>
Or this?
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://example.com/schemas"
xmlns:ak="http://example.com/schemas"
elementFormDefault="qualified">
<xsd:element name="CCC">
<xsd:simpleType>
<xsd:restriction base="ak:GGG">
</xsd:restriction>
</xsd:simpleType>
<!-- This seems wrong, it should be GGG, not string -->
<!-- // AkGGG ...-->
<!-- type AkGGG string-->
</xsd:element>
<!-- This seems very wrong, it should be a struct -->
<!-- // CCC is FFF-->
<!-- type CCC *CCC-->
<xsd:simpleType name="GGG">
<xsd:annotation><xsd:documentation>FFF</xsd:documentation></xsd:annotation>
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<!-- // GGG ...-->
<!-- type GGG string-->
</xsd:schema>
Description
Some simple types are not generated under given circumstances. The original XSD is not created by me, but is i understand, is old and widely used.
I have no clue of XML, but i managed to dumb the issue down to this short code.
Steps to reproduce the issue:
Describe the results you received: AAA has a struct in go code created.
Describe the results you expected: GGG and DDD has types in go code created as well.
Output of
go version
:xgen version or commit ID:
Environment details (OS, physical, etc.):