I am trying to generate java code from an xsd for FHIR.
I downloaded the code generation schema from here and then I ran:
xjc patient.xsd
But I've got the following exception:
parsing a schema...
[ERROR] src-resolve: Cannot resolve the name 'Account' to a(n) 'type definition' component.
line 332 of file:/Users/gerard/Downloads/fhir-codegen-xsd/fhir-base.xsd
[ERROR] src-resolve: Cannot resolve the name 'DetectedIssue' to a(n) 'type definition' component.
line 354 of file:/Users/gerard/Downloads/fhir-codegen-xsd/fhir-base.xsd
[ERROR] src-resolve: Cannot resolve the name 'ImplementationGuide' to a(n) 'type definition' component.
line 380 of file:/Users/gerard/Downloads/fhir-codegen-xsd/fhir-base.xsd
[ERROR] src-resolve: Cannot resolve the name 'MedicationOrder' to a(n) 'type definition' component.
line 387 of file:/Users/gerard/Downloads/fhir-codegen-xsd/fhir-base.xsd
[ERROR] src-resolve: Cannot resolve the name 'QuestionnaireResponse' to a(n) 'type definition' component.
line 409 of file:/Users/gerard/Downloads/fhir-codegen-xsd/fhir-base.xsd
[ERROR] src-resolve: Cannot resolve the name 'Parameters' to a(n) 'type definition' component.
line 425 of file:/Users/gerard/Downloads/fhir-codegen-xsd/fhir-base.xsd
[ERROR] src-resolve: Cannot resolve the name 'MeasuredQuantity' to a(n) 'type definition' component.
line 225 of file:/Users/gerard/Downloads/fhir-codegen-xsd/questionnaireanswers.xsd
I've imported to eclipse all the xsd and I see the same errors in fhir-base.xsd. Not sure how to solve it because for example the account.xsd is in the same directory.