Create C# class from reqif.xsd

454 Views Asked by At

I am trying to generate a C# class from the following ReqIF XSD file.

I have tried with xsd.exe which failed and now also with xsd2code which fails with the following error message (translation: reference to undeclared attribute group):

Xsd2Code Version 3.4.0.32990
Code generation utility from XML schema files.

Error: Verweis auf nicht deklarierte Attributgruppe http://www.w3.org/1999/xhtml:xhtml.style.attrib.
    SubType: Unspecified

    Rule:

I suppose the xsd file is not 100% correct. I tried to get some information about the xsd format, but with my limited knowledge I was not able to solve the issue. Does somebody have an idea what could be wrong here or how I could proceed?

Thanks!

1

There are 1 best solutions below

0
Jeremy Mangas On

I was able to generate java code with the linked files and the following command line on Windows (make sure the files are all in the same directory to make your life easier):

NOTE: It took my PC about 15 minutes to get past the parsing stage. I had thought it was locked up, but grabbed some coffee and was pleasantly surprised when I returned.

"<path_to_xjc.exe>" "<path_to_reqif.xsd>" -b "<path_to_linked_xjb_file>" -extension -p <the.package.name.you.want.to.generate.to>

Link to files I used to generate