Generating a binding for an XML Schema containing xsd:integer will result in int. This is an error since xsd:integer is unbounded while the Go type int is a 32-bit signed integer
Steps to reproduce the issue:
Create an XML schema containing an element of type xsd:integer (assuming xmlns:xsd="http://www.w3.org/2001/XMLSchema")
Execute xgen -i myschema.xsd -o myoutput -l Go
Look at the generated myoutput/myschema.xsd.go
Describe the results you received:
type MyType struct {
Id int `xml:"id"`
}
Describe the results you expected:
type MyType struct {
Id Int `xml:"id"`
}
I'm not a Go expert, but I would have expected a type which can represent arbitrary integer values. Maybe big.Int?
Description
Generating a binding for an XML Schema containing
xsd:integer
will result inint
. This is an error sincexsd:integer
is unbounded while the Go typeint
is a 32-bit signed integerSteps to reproduce the issue:
xsd:integer
(assumingxmlns:xsd="http://www.w3.org/2001/XMLSchema"
)xgen -i myschema.xsd -o myoutput -l Go
myoutput/myschema.xsd.go
Describe the results you received:
Describe the results you expected:
I'm not a Go expert, but I would have expected a type which can represent arbitrary integer values. Maybe
big.Int
?Output of
go version
:Aurora version or commit ID:
Sorry, I don't know aurora
Environment details (OS, physical, etc.):