﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3171	BouncingBall modelDescription.xml is not valid for trivial reasons	Christopher Brooks <cxh@…>	Adeel Asghar	"The modelDescription.xml file produced by generating a FMU for BouncingBall is not valid because some tags are empty.


To reproduce, download the FMI-2.0 xsd files and then run:
{{{
cp ~/src/openmodelica/testsuite/openmodelica/fmi/ModelExchange/2.0/BouncingBall.mos  .
omc BouncingBall.mos
xmllint --valid --schema ~/src/fmi/FMI_for_ModelExchange_and_CoSimulation_v2.0/fmi2ModelDescription.xsd modelDescription.xml
}}}

The output will be
{{{
modelDescription.xml:14: element TypeDefinitions: Schemas validity error : Element 'TypeDefinitions': Missing child element(s). Expected is ( Sim\
pleType ).
modelDescription.xml:111: element Outputs: Schemas validity error : Element 'Outputs': Missing child element(s). Expected is ( Unknown ).
modelDescription.xml:117: element InitialUnknowns: Schemas validity error : Element 'InitialUnknowns': Missing child element(s). Expected is ( Un\
known ).
modelDescription.xml fails to validate
}}}

This occurs because TypeDefinitions has no contents.
{{{
  </ModelExchange>
  <TypeDefinitions>
  </TypeDefinitions>
  <LogCategories>
}}}

FMI_for_ModelExchange_and_CoSimulation_v2.0/fmi2ModelDescription.xsd says
{{{
<xs:element name=""TypeDefinitions"" minOccurs=""0"">
  <xs:complexType>
    <xs:sequence maxOccurs=""unbounded"">
      <xs:element name=""SimpleType"" type=""fmi2SimpleType""/>
    </xs:sequence>
  </xs:complexType>
</xs:element>
}}}


This is trivial, but it could mask other problems.  The xml produce should be valid.

I was looking into this to see if it fixes Ticket #3170, but it does not.
"	defect	closed	low	1.9.4	FMI	trunk	fixed		
