#3171 closed defect (fixed)
BouncingBall modelDescription.xml is not valid for trivial reasons
Reported by: | Owned by: | Adeel Asghar | |
---|---|---|---|
Priority: | low | Milestone: | 1.9.4 |
Component: | FMI | Version: | trunk |
Keywords: | Cc: |
Description
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.
Change History (3)
comment:1 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 9 years ago
Milestone: | Future → pre1.9.4 |
---|
It doesn't make sense to keep closed ticket in the "Future" milestone that were simply forgotten to assign to the correct milestone in the past.
comment:3 by , 7 years ago
Milestone: | pre1.9.4 → 1.9.4 |
---|
Removing the pre1.9.4 milestone in favor of 1.9.4.
Fixed in r24963.