Sanity rule to check ProcurementDetails structure in case of CVD
The below XML is wrongly structured, but the error messages occuring do not give correct hints on why it is wrong. Hence it would be good to have a sanity rule that checks that all three required StrategicProcurementStatistics
are within a single ProcurementDetails
element instead of separated in different ones.
<efac:StrategicProcurement>
<efbc:ApplicableLegalBasis listName="cvd-scope">true</efbc:ApplicableLegalBasis>
<efac:StrategicProcurementInformation>
<efbc:ProcurementCategoryCode listName="cvd-contract-type">pass-tran-serv</efbc:ProcurementCategoryCode>
<efac:ProcurementDetails>
<efbc:AssetCategoryCode listName="vehicle-category">m3</efbc:AssetCategoryCode>
<efac:StrategicProcurementStatistics>
<efbc:StatisticsCode listName="vehicles">vehicles</efbc:StatisticsCode>
<efbc:StatisticsNumeric>6</efbc:StatisticsNumeric> </efac:StrategicProcurementStatistics>
</efac:ProcurementDetails>
<efac:ProcurementDetails>
<efbc:AssetCategoryCode listName="vehicle-category">m3</efbc:AssetCategoryCode>
<efac:StrategicProcurementStatistics>
<efbc:StatisticsCode listName="vehicles">vehicles-clean</efbc:StatisticsCode>
<efbc:StatisticsNumeric>5</efbc:
</efac:StrategicProcurementStatistics>
</efac:ProcurementDetails>
<efac:ProcurementDetails>
<efbc:AssetCategoryCode listName="vehicle-category">m3</efbc:AssetCategoryCode>
<efac:StrategicProcurementStatistics>
<efbc:StatisticsCode listName="vehicles">vehicles-zero-emission</efbc:StatisticsCode>
<efbc:StatisticsNumeric>0</efbc:StatisticsNumeric>
</efac:StrategicProcurementStatistics>
</efac:ProcurementDetails>
Edited by Renzo Kottmann