using xsd.exe to generate c# files with the standar UBL 2.0, getting error and waings
I have the files
This is the command i'm ruing:
E:Invoicemaindoc>xsd.exe /c UBL-Invoice-2.0.xsd UBL-CommonAggregat eComponents-2.0.xsd UBL-CommonBasicComponents-2.0.xsd UnqualifiedDataTypeSchemaModule-2.0.xsd UBL-CommonExtensionComponents-2.0.xsd UBL-QualifiedDatatypes-2.0.xsd
These are the errors i'm getting:
Microsoft (R) Xml Schemas/DataTypes support utility
[Microsoft (R) .NET Framework, Version 4.0.30319.17929]
Copyright (C) Microsoft Corporation. All rights reserved.
Schema validation waing: Type u:un:unece:uncefact:codelist:specification:54 217:2001:CurrencyCodeContentType' is not declared, or is not a simple type. Line 72, position 14.
Schema validation waing: Type 'u:un:unece:uncefact:codelist:specification:66 411:2001:UnitCodeContentType' is not declared, or is not a simple type. Line 1050, position 14.
Schema validation waing: Type 'u:un:unece:uncefact:codelist:specification:66 411:2001:UnitCodeContentType' is not declared, or is not a simple type. Line 946, position 14.
Schema validation waing: Type u:un:unece:uncefact:codelist:specification:IANAMIMEMediaType:2003:BinaryObjec MimeCodeContentType' is not declared, or is not a simple type. Line 122, position 14.
Schema validation waing: Type 'u:un:unece:uncefact:codelist:specification:IANAMIMEMediaType:2003:BinaryObjectMimeCodeContentType' is not declared, or is not a simple type. Line 232, position 14.
Schema validation waing: Type 'u:un:unece:uncefact:codelist:specification:IANAMIMEMediaType:2003:BinaryObjectMimeCodeContentType' is not declared, or is not a simple type. Line 327, position 14.
Schema validation waing: Type 'u:un:unece:uncefact:codelist:specification:IANAMIMEMediaType:2003:BinaryObjectMimeCodeContentType' is not declared, or is not a simple type. Line 422, position 14.
Schema validation waing: Type 'u:un:unece:uncefact:codelist:specification:IANAMIMEMediaType:2003:BinaryObjectMimeCodeContentType' is not declared, or is not a simple type. Line 517, position 14.
Waing: Schema could not be validated. Class generation may fail or may produce incorrect results.
Error: Error generating classes for schema 'UBL-Invoice-2_0_UBL-CommonAggregateComponents-2_0_UBL-CommonBasicComponents-2_0_UnqualifiedDataTypeSchemaModule-2_0_UBL-CommonExtensionComponents-2_0_UBL-QualifiedDatatypes-2_0'. - The datatype 'u:un:unece:uncefact:codelist:specification:66411:2001:UnitCodeContentType' is missing.
If you would like more help, please type "xsd /?".
My code imports in file UBL-Invoice-2.0.xsd:
<!-- ===== xsd:schema Element With Namespaces Declarations ===== -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="u:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns="u:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cac="u:oasis:names:specification:ubl:schema:xsd:
CommonAggregateComponents-2"
xmlns:cbc="u:oasis:names:specification:ubl:schema:xsd:
CommonBasicComponents-2"
xmlns:udt="u:un:unece:uncefact:data:specification:
UnqualifiedDataTypesSchemaModule:2"
xmlns:ccts="u:un:unece:uncefact:documentation:2"
xmlns:ext="u:oasis:names:specification:ubl:schema:xsd:
CommonExtensionComponents-2"
xmlns:qdt="u:oasis:names:specification:ubl:schema:xsd:QualifiedDatatypes-2" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.0">
<!-- ===== Imports ===== -->
<xsd:import namespace="u:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" schemaLocation="UBL-CommonAggregateComponents-2.0.xsd"/>
<xsd:import namespace="u:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" schemaLocation="UBL-CommonBasicComponents-2.0.xsd"/>
<xsd:import namespace="u:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2" schemaLocation="UnqualifiedDataTypeSchemaModule-2.0.xsd"/>
<xsd:import namespace="u:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" schemaLocation="UBL-CommonExtensionComponents-2.0.xsd"/>
<xsd:import namespace="u:oasis:names:specification:ubl:schema:xsd:QualifiedDatatypes-2" schemaLocation="UBL-QualifiedDatatypes-2.0.xsd"/>
<!-- ===== Root Element ===== -->
What am I doing wrong? Any help would be greatly appreciated.

