David A. Arroyo
David A. Arroyo
This is tricky, because the original struct is embedded in the layout struct: var layout struct{ *T {{- range .Overrides}} {{.FieldName}} *{{.ToType}}`+"`{{.Tag}}`"+` {{end -}} } The most straightforward way I...
My concern with this is creating an explosion in the amount of generated code and even the number of types. One feature of the xsd package is that it tries...
I opened #23 for that
That's pretty clever, using the whole document as an identifier. If you want to reduce the memory usage you could use a checksum of the document as a key. Here's...
This is a good idea. I'm happy to accept a PR. You might want to take a look at GenAST: https://github.com/droyo/go-xml/blob/73105c9af91535f13c9f89e0d72d81ea3dbce725/xsdgen/xsdgen.go#L229-L230 . You'll want to fish a tags argument from...
It's a bug. This piece of code in [marshal.go](https://github.com/droyo/go-xml/blob/c3f085bce04e82413a84176c415610cc76c0491b/xmltree/marshal.go#L83) if len(el.Children) == 0 { if len(el.Content) > 0 { e.w.Write(el.Content) } else { return nil } } The `Marshal` function...
The current handling of imports is a bit of a hack. The xsdgen tool requires that you provide paths to *all* required files on the command line, including files imported...
This is expected to work. Looking at your example I see "id-type" defined in [gexf.xsd](https://github.com/gephi/gexf/blob/81ba4e7ccdc25631f836fc5caa4ed64ba5300379/specs/1.2draft/gexf.xsd#L70), under targetNamespace "http://www.gexf.net/1.2draft", defined [here](https://github.com/gephi/gexf/blob/81ba4e7ccdc25631f836fc5caa4ed64ba5300379/specs/1.2draft/gexf.xsd#L2). It's then used in [data.xsd](https://github.com/gephi/gexf/blob/81ba4e7ccdc25631f836fc5caa4ed64ba5300379/specs/1.2draft/data.xsd#L46). I believe what is happening...
I merged #131 but I am doing some research and apparently it is valid to have import cycles. Or, at least, it is not explicitly invalid. I have not worked...
Thanks for the report. The `StructuredTextType` type from your schema has the `mixed=true` attribute, so `xsdgen` should be generating a struct with a `,chardata` field instead of what you got....