iwxxm icon indicating copy to clipboard operation
iwxxm copied to clipboard

MeteorologicalFeature.MeteorologicalFeature-2 rule has hardwired IWXXM IRI prefix

Open mgoberfield opened this issue 9 months ago • 4 comments

Schematron rules should not assume the use of a particular IRI prefix in assertion tests.

With IWXXM IRI prefix set to 'ns1', I expect the following XML to pass validation

Image

However, with MeteorologicalFeature.MeteorologicalFeature-2 rule's assertion written like this:

https://github.com/wmo-im/iwxxm/blob/a037374e4d67d699e09d51a9469c9826f2552fc5/IWXXM/rule/iwxxm.sch#L695

the rule fires because of the quoted 'iwxxm:feature'.

My suggested fix is to change the assertion test to

Image

`

mgoberfield avatar Mar 18 '25 16:03 mgoberfield

See associated pull request on iwxxm-modelling which fixes the rule in the UML model MeteorologicalFeatureType. Post-processing the project file, via SCHFromXMI.xslt should generate the revised rule. I am unable to verify updated MeteorologicalFeature-2 rule since I do not have the required software to do so.

mgoberfield avatar Mar 19 '25 11:03 mgoberfield

Quite right. The use of quotes in 'iwxxm:feature' actually make the conditional a string comparison and is obviously wrong. I remember I fixed this kind of errors some time ago. Let me check them once again.

blchoy avatar May 14 '25 11:05 blchoy

Thanks Mark. I have fixed this leftover mistake in 2025-2RC2.

blchoy avatar Jun 04 '25 08:06 blchoy

@blchoy can we delete this branch: https://github.com/wmo-im/iwxxm/tree/issue_347 ?

amilan17 avatar Aug 08 '25 11:08 amilan17

Implemented in IWXXM 2025-2.

blchoy avatar Nov 21 '25 16:11 blchoy