Skip to content
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

Sequence in sequence is not converted #135

Open
nettnikl opened this issue Aug 23, 2024 · 0 comments
Open

Sequence in sequence is not converted #135

nettnikl opened this issue Aug 23, 2024 · 0 comments

Comments

@nettnikl
Copy link

nettnikl commented Aug 23, 2024

Hey, the following:

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
			elementFormDefault="qualified" attributeFormDefault="qualified"
			version="1.0">
	<xsd:complexType name="AAA">
		<xsd:sequence>
			<xsd:element name="BBB" minOccurs="1" maxOccurs="1">
				<xsd:simpleType>
					<xsd:restriction base="xsd:string"/>
				</xsd:simpleType>
			</xsd:element>
			<xsd:sequence>
				<xsd:element name="CCC" minOccurs="1" maxOccurs="unbounded">
					<xsd:simpleType>
						<xsd:restriction base="xsd:string"/>
					</xsd:simpleType>
				</xsd:element>
			</xsd:sequence>
		</xsd:sequence>
	</xsd:complexType>
</xsd:schema>

converts to:

// Code generated by https://github.com/gocomply/xsd2go; DO NOT EDIT.
// Models for
package test

import (
	"encoding/xml"
)

// XSD ComplexType declarations

type Aaa struct {
	XMLName xml.Name

	Bbb string `xml:",any"`
}

// XSD SimpleType declarations

While i would expect:

// Code generated by https://github.com/gocomply/xsd2go; DO NOT EDIT.
// Models for
package test

import (
	"encoding/xml"
)

// XSD ComplexType declarations

type Aaa struct {
	XMLName xml.Name

	Bbb string `xml:"BBB"`
	Ccc []string `xml:"CCC"`
}

// XSD SimpleType declarations
nettnikl pushed a commit to nettnikl/xsd2go that referenced this issue Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant