Skip to content

Commit

Permalink
fields: Put codelist constraint on the correct field BT-812-LotResult
Browse files Browse the repository at this point in the history
Update corresponding schematron rules.
Also update affected validation report, removing an incorrect failure.
  • Loading branch information
bertrand-lorentz committed Sep 16, 2024
1 parent 89c150a commit ea2f977
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 22 deletions.
7 changes: 0 additions & 7 deletions examples/reports/can_24_maximal.svrl
Original file line number Diff line number Diff line change
Expand Up @@ -689,13 +689,6 @@
<svrl:fired-rule context="/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:LotResult/efac:SettledContract/cbc:ID"/>
<svrl:fired-rule context="/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:LotResult/efac:SettledContract/cbc:ID"/>
<svrl:fired-rule context="/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:LotResult/efac:StrategicProcurement[efac:StrategicProcurementInformation/efac:ProcurementDetails/efbc:AssetCategoryCode/@listName='energy-efficiency-item']/efac:StrategicProcurementInformation/efac:ProcurementDetails/efac:AssetLabel/efbc:LabelCode"/>
<svrl:fired-rule context="/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:LotResult/efac:StrategicProcurement[efac:StrategicProcurementInformation/efac:ProcurementDetails/efbc:AssetCategoryCode/@listName='energy-efficiency-item']/efac:StrategicProcurementInformation/efac:ProcurementDetails/efac:AssetLabel/efbc:LabelCode/@listName"/>
<svrl:failed-assert id="BR-BT-00812-0066"
location="/can:ContractAwardNotice/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:LotResult[1]/efac:StrategicProcurement[2]/efac:StrategicProcurementInformation/efac:ProcurementDetails[2]/efac:AssetLabel/efbc:LabelCode/@listName"
role="ERROR"
test="normalize-space(.) = ('ENERA', 'ENERA1', 'ENERA2', 'ENERA3', 'ENERB', 'ENERC', 'ENERD', 'ENERE', 'ENERF', 'ENERG')">
<svrl:text>rule|text|BR-BT-00812-0066</svrl:text>
</svrl:failed-assert>
<svrl:fired-rule context="/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:LotResult/efac:StrategicProcurement[efac:StrategicProcurementInformation/efac:ProcurementDetails/efbc:AssetCategoryCode/@listName='energy-efficiency-item']/efac:StrategicProcurementInformation/efac:ProcurementDetails/efac:AssetMetric[efbc:AssetMetricCode='nrg-con-yr']/efbc:AssetMetricCode"/>
<svrl:fired-rule context="/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:LotResult/efac:StrategicProcurement[efac:StrategicProcurementInformation/efac:ProcurementDetails/efbc:AssetCategoryCode/@listName='energy-efficiency-item']/efac:StrategicProcurementInformation/efac:ProcurementDetails/efac:AssetMetric[efbc:AssetMetricCode='nrg-sav-yr']/efbc:AssetMetricCode"/>
<svrl:fired-rule context="/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:LotResult/efac:StrategicProcurement[efac:StrategicProcurementInformation/efac:ProcurementDetails/efbc:AssetCategoryCode/@listName='energy-efficiency-item']/efac:StrategicProcurementInformation/efac:ProcurementDetails/efbc:AssetCategoryCode"/>
Expand Down
18 changes: 9 additions & 9 deletions fields/fields.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"ublVersion" : "2.3",
"sdkVersion" : "eforms-sdk-1.13.0-SNAPSHOT",
"metadataDatabase" : {
"version" : "1.12.260",
"createdOn" : "2024-09-12T16:05:22"
"version" : "1.12.301",
"createdOn" : "2024-09-16T15:41:03"
},
"businessEntities" : [ {
"id" : "buyer",
Expand Down Expand Up @@ -37226,6 +37226,13 @@
"value" : true,
"severity" : "ERROR"
} ]
},
"codeList" : {
"value" : {
"id" : "energy-efficiency-label",
"type" : "flat"
},
"severity" : "ERROR"
}
}, {
"id" : "BT-812-LotResult-List",
Expand All @@ -37244,13 +37251,6 @@
"repeatable" : {
"value" : false,
"severity" : "ERROR"
},
"codeList" : {
"value" : {
"id" : "energy-efficiency-label",
"type" : "flat"
},
"severity" : "ERROR"
}
}, {
"id" : "BT-813-LotResult",
Expand Down
4 changes: 1 addition & 3 deletions schematrons/dynamic/validation-stage-3b.sch
Original file line number Diff line number Diff line change
Expand Up @@ -2601,12 +2601,10 @@
<assert id="BT-685-LotResult_WS" role="ERROR" test="normalize-space(.) eq .">rule|text|BT-685-LotResult_WS</assert>
</rule>
<rule context="/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:LotResult/efac:StrategicProcurement[efac:StrategicProcurementInformation/efac:ProcurementDetails/efbc:AssetCategoryCode/@listName='energy-efficiency-item']/efac:StrategicProcurementInformation/efac:ProcurementDetails/efac:AssetLabel/efbc:LabelCode">
<assert id="BR-BT-00812-0066" role="ERROR" test="normalize-space(.) = ('ENERA', 'ENERA1', 'ENERA2', 'ENERA3', 'ENERB', 'ENERC', 'ENERD', 'ENERE', 'ENERF', 'ENERG')">rule|text|BR-BT-00812-0066</assert>
<assert id="BT-812-LotResult-List_MA" role="ERROR" test="count(@listName) > 0">rule|text|BT-812-LotResult-List_MA</assert>
<assert id="BT-812-LotResult_WS" role="ERROR" test="normalize-space(.) eq .">rule|text|BT-812-LotResult_WS</assert>
</rule>
<rule context="/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:LotResult/efac:StrategicProcurement[efac:StrategicProcurementInformation/efac:ProcurementDetails/efbc:AssetCategoryCode/@listName='energy-efficiency-item']/efac:StrategicProcurementInformation/efac:ProcurementDetails/efac:AssetLabel/efbc:LabelCode/@listName">
<assert id="BR-BT-00812-0066" role="ERROR" test="normalize-space(.) = ('ENERA', 'ENERA1', 'ENERA2', 'ENERA3', 'ENERB', 'ENERC', 'ENERD', 'ENERE', 'ENERF', 'ENERG')">rule|text|BR-BT-00812-0066</assert>
</rule>
<rule context="/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:LotResult/efac:StrategicProcurement[efac:StrategicProcurementInformation/efac:ProcurementDetails/efbc:AssetCategoryCode/@listName='energy-efficiency-item']/efac:StrategicProcurementInformation/efac:ProcurementDetails/efac:AssetMetric[efbc:AssetMetricCode='nrg-con-yr']/efbc:AssetMetricCode">
<assert id="BR-OPT-00080-0066" role="ERROR" test="normalize-space(.) = ('nrg-con-yr', 'nrg-sav-yr')">rule|text|BR-OPT-00080-0066</assert>
<assert id="OPT-080-LotResult-List_MA" role="ERROR" test="count(@listName) > 0">rule|text|OPT-080-LotResult-List_MA</assert>
Expand Down
4 changes: 1 addition & 3 deletions schematrons/static/validation-stage-3b.sch
Original file line number Diff line number Diff line change
Expand Up @@ -2601,12 +2601,10 @@
<assert id="BT-685-LotResult_WS" role="ERROR" test="normalize-space(.) eq .">rule|text|BT-685-LotResult_WS</assert>
</rule>
<rule context="/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:LotResult/efac:StrategicProcurement[efac:StrategicProcurementInformation/efac:ProcurementDetails/efbc:AssetCategoryCode/@listName='energy-efficiency-item']/efac:StrategicProcurementInformation/efac:ProcurementDetails/efac:AssetLabel/efbc:LabelCode">
<assert id="BR-BT-00812-0066" role="ERROR" test="normalize-space(.) = ('ENERA', 'ENERA1', 'ENERA2', 'ENERA3', 'ENERB', 'ENERC', 'ENERD', 'ENERE', 'ENERF', 'ENERG')">rule|text|BR-BT-00812-0066</assert>
<assert id="BT-812-LotResult-List_MA" role="ERROR" test="count(@listName) > 0">rule|text|BT-812-LotResult-List_MA</assert>
<assert id="BT-812-LotResult_WS" role="ERROR" test="normalize-space(.) eq .">rule|text|BT-812-LotResult_WS</assert>
</rule>
<rule context="/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:LotResult/efac:StrategicProcurement[efac:StrategicProcurementInformation/efac:ProcurementDetails/efbc:AssetCategoryCode/@listName='energy-efficiency-item']/efac:StrategicProcurementInformation/efac:ProcurementDetails/efac:AssetLabel/efbc:LabelCode/@listName">
<assert id="BR-BT-00812-0066" role="ERROR" test="normalize-space(.) = ('ENERA', 'ENERA1', 'ENERA2', 'ENERA3', 'ENERB', 'ENERC', 'ENERD', 'ENERE', 'ENERF', 'ENERG')">rule|text|BR-BT-00812-0066</assert>
</rule>
<rule context="/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:LotResult/efac:StrategicProcurement[efac:StrategicProcurementInformation/efac:ProcurementDetails/efbc:AssetCategoryCode/@listName='energy-efficiency-item']/efac:StrategicProcurementInformation/efac:ProcurementDetails/efac:AssetMetric[efbc:AssetMetricCode='nrg-con-yr']/efbc:AssetMetricCode">
<assert id="BR-OPT-00080-0066" role="ERROR" test="normalize-space(.) = ('nrg-con-yr', 'nrg-sav-yr')">rule|text|BR-OPT-00080-0066</assert>
<assert id="OPT-080-LotResult-List_MA" role="ERROR" test="count(@listName) > 0">rule|text|OPT-080-LotResult-List_MA</assert>
Expand Down

0 comments on commit ea2f977

Please sign in to comment.