You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
I want generate C# classes from several xsd downloaded to one local directory.
All XSD files are in https://datex2.eu/schema/3/
I think the problem is because each XSD file have several references to other XSD files and the error is 'complexType' which is not defined.
Example reference to
<xs:import namespace="http://datex2.eu/schema/3/trafficRegulation" schemaLocation="DATEXII_3_TrafficRegulation.xsd"/>
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?
The text was updated successfully, but these errors were encountered: