You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The xml tag for the top type is generated incorrectly, which makes i impossible to unmarshall in to the top structure.
Steps to reproduce the issue:
Start with the svg xsd definition and generate a struct for it
Try to unmarshal an svg string in to an instance
<?xml version="1.0" encoding="UTF-8"?>
<svgxmlns="http://www.w3.org/2000/svg"xmlns:xlink="http://www.w3.org/1999/xlink"width="500pt"height="300pt"viewBox="0 0 500 300"version="1.1">
<defs>
<clipPathid="clip1">
<pathd="M 51 203 L 135 203 L 135 269.839844 L 51 269.839844 Z M 51 203 "/>
</clipPath>
<clipPathid="clip2">
<pathd="M 167 190 L 251 190 L 251 269.839844 L 167 269.839844 Z M 167 190 "/>
</clipPath>
<clipPathid="clip3">
<pathd="M 282 177 L 366 177 L 366 269.839844 L 282 269.839844 Z M 282 177 "/>
</clipPath>
<clipPathid="clip4">
<pathd="M 397 32 L 481 32 L 481 269.839844 L 397 269.839844 Z M 397 32 "/>
</clipPath>
</defs>
<gid="surface1521">
...
You will receive an error: expected element type <svgType> but have <svg>
Describe the results you received:
Unable to parse an svg XML file because the generated tag for xml appends Type to the XML tag:
It does this for all XMLName declarations. Then will declare:
typeSvg*SvgType
Which also will then sometimes generate duplicates because it does not distinguish between things like simpletype and complextype. For instance with SVG you will see:
type Title string
type Title *TitleType
Describe the results you expected:
An unmarshalled svg struct, with the generated tag being xml:"svg"
Output of go version:
go version go1.18 darwin/amd64
xgen version or commit ID:
xgen version: 0.1.0
Environment details (OS, physical, etc.):
OSX version 12.3
The text was updated successfully, but these errors were encountered:
Description
The xml tag for the top type is generated incorrectly, which makes i impossible to unmarshall in to the top structure.
Steps to reproduce the issue:
expected element type <svgType> but have <svg>
Describe the results you received:
Unable to parse an svg XML file because the generated tag for xml appends
Type
to the XML tag:It does this for all XMLName declarations. Then will declare:
Which also will then sometimes generate duplicates because it does not distinguish between things like simpletype and complextype. For instance with SVG you will see:
Describe the results you expected:
An unmarshalled svg struct, with the generated tag being
xml:"svg"
Output of
go version
:xgen version or commit ID:
Environment details (OS, physical, etc.):
OSX version 12.3
The text was updated successfully, but these errors were encountered: