xuri / xgen

XSD (XML Schema Definition) parser and Go/C/Java/Rust/TypeScript code generator
BSD 3-Clause "New" or "Revised" License
313 stars 74 forks source link

Parsing the svg 1.1 xsd produces no code #45

Closed jimidle closed 2 years ago

jimidle commented 2 years ago

Description

Using the official SVG specification, xgen produces a go file with just the package statement and the generated comment, but shows no errors.

Steps to reproduce the issue:

  1. Download the svg XSD file from: https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd
  2. Use xgen command installed via go install (go get is no longer the correct procedure with newer versions of go
  3. Command: xgen -i xsd/ -o svg -p svg -l Go or xgen -i xsd/svg.xsd -o jim -p svg -l Go (various combinations)
  4. Inspect empty output file

Describe the results you received:

// Code generated by xgen. DO NOT EDIT.

package svg

Describe the results you expected:

Generated types as gleaned from the XSD, or some errors

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

Darwin jimi 21.4.0 Darwin Kernel Version 21.4.0: Mon Feb 21 20:34:37 PST 2022; root:xnu-8020.101.4~2/RELEASE_X86_64 x86_64
jimidle commented 2 years ago

Sorry for noise, that is the dtd not a xsd. It is too early in the morning ;)