Skip to content

XSD2 code generation failed #11

Description

@R0l1I3S

The execution of the command

"<PATH_TO_XSD2.exe>\Xsd2.exe" ^
INSPIRE_LU_PLANNED\BaseTypes.xsd ^
INSPIRE_LU_PLANNED\BaseTypes2.xsd ^
INSPIRE_LU_PLANNED\LandUseNomenclature.xsd ^
INSPIRE_LU_PLANNED\xlink\1.0.0\xlinks.xsd ^
INSPIRE_LU_PLANNED\gml\3.2.1\gml.xsd ^
INSPIRE_LU_PLANNED\gml\3.3\extdEncRule.xsd ^
INSPIRE_LU_PLANNED\iso\19139\20070417\gmd\gmd.xsd ^
INSPIRE_LU_PLANNED\iso\19139\20070417\gco\gco.xsd ^
INSPIRE_LU_PLANNED\iso\19139\20070417\gmx\gmx.xsd ^
INSPIRE_LU_PLANNED\iso\19139\20070417\gss\gss.xsd ^
INSPIRE_LU_PLANNED\iso\19139\20070417\gts\gts.xsd ^
INSPIRE_LU_PLANNED\iso\19139\20070417\gsr\gsr.xsd ^
INSPIRE_LU_PLANNED\Sonstiges\Addresses.xsd ^
INSPIRE_LU_PLANNED\Sonstiges\GeographicalNames.xsd ^
INSPIRE_LU_PLANNED\PlannedLandUse.xsd ^
@Pause

within a batch file leads to the following error message:

C:\Daten\xxx\INSPIRE_LU_PLANNED\BaseTypes.xsd
C:\Daten\xxx\INSPIRE_LU_PLANNED\BaseTypes.cs
XSD2 code generation failed.
System.Xml.Schema.XmlSchemaException: Nicht definiertes 'complexType' 'http://www.opengis.net/gml/3.2:AbstractFeatureType' wird als Basis für die Erweiterung des komplexen Typs verwendet.
bei System.Xml.Schema.XmlSchemaSet.InternalValidationCallback(Object sender, ValidationEventArgs e)
bei System.Xml.Schema.BaseProcessor.SendValidationEvent(XmlSchemaException e, XmlSeverityType severity)
bei System.Xml.Schema.Compiler.CompileComplexContentExtension(XmlSchemaComplexType complexType, XmlSchemaComplexContent complexContent, XmlSchemaComplexContentExtension complexExtension)
bei System.Xml.Schema.Compiler.CompileComplexType(XmlSchemaComplexType complexType)
bei System.Xml.Schema.Compiler.Compile()
bei System.Xml.Schema.Compiler.Execute(XmlSchemaSet schemaSet, SchemaInfo schemaCompiledInfo)
bei System.Xml.Schema.XmlSchemaSet.Compile()
bei System.Xml.Serialization.XmlSchemas.Compile(ValidationEventHandler handler, Boolean fullCompile)
bei Xsd2.XsdCodeGenerator.Generate(IList`1 schemas, TextWriter output) in C:\Users\xxx\Downloads\xsd2-master\Xsd2\XsdCodeGenerator.cs:Zeile 79.
bei Xsd2.Program.Main(String[] args) in C:\Users\xxx\Downloads\xsd2-master\Xsd2\Program.cs:Zeile 131.

That means there is a 'complexType' which is not defined and which is used as a base for the extension of the complex type.

The files I used above can be found here:

INSPIRE_LU_PLANNED.zip

Is this behaviour a bug or do I have to use other options of xsd2.exe to successfully generate C# or VB .NET classes from the xsd files?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions