xsd-2-go icon indicating copy to clipboard operation
xsd-2-go copied to clipboard

Problem with XSD files

Open fwachs opened this issue 11 years ago • 3 comments

Hi, I'm trying to use this library to generate go structs and I'm getting multiple errors. I've tried modifying the java source code and generating a new Jar file to deal with the problems i'm getting. But so far I had no luck in generating all of the go expected structs. Would it be too much to ask for you to check this out? Thanks!

https://s3.amazonaws.com/cda-xsd/CDA.xsd ( this is the parent ) https://s3.amazonaws.com/cda-xsd/NarrativeBlock.xsd https://s3.amazonaws.com/cda-xsd/POCD_MT000040.xsd https://s3.amazonaws.com/cda-xsd/datatypes-base.xsd https://s3.amazonaws.com/cda-xsd/datatypes.xsd https://s3.amazonaws.com/cda-xsd/infrastructureRoot.xsd https://s3.amazonaws.com/cda-xsd/voc.xsd

fwachs avatar Sep 15 '14 15:09 fwachs

Hi, I check your xsd file. This project now can only parse limited set of Jaxb annotation. After generating java class by using xjc, your class contains following annotations which are not supported now:

  • @XmlMixed
  • @XmlSchemaType

I will work on this issue.

csimplestring avatar Sep 15 '14 20:09 csimplestring

Really? Thanks a lot, is there anything I could do to help you with it? I'm not quite sure what it's needed to be done but i'm willing to help all I can :) Great work with the library.

fwachs avatar Sep 15 '14 20:09 fwachs

Besides what you say, about those two annotations not being supported, there is also a problem with translating Enums. I see, on the code, that they are being filtered for some reason, but this leads to structs pointing to non-existing structs afterwards. How is this supposed to work later?

Also, i've made some modifications on my branch that can help out with the translation tool. Should I send a pull request?

And last but not least, i'm using https://raw.githubusercontent.com/chb/sample_ccdas/master/HL7%20Samples/CCD.sample.xml to test if the structs are working fine but i'm getting: panic: reflect.Value.SetBytes of non-byte slice. Any ideas?

I really appreciate your help on this one. Please let me know how I can be of any help :)

fwachs avatar Sep 18 '14 20:09 fwachs