wmo-im / iwxxm

XML schema and Schematron for aviation weather data exchange
https://old.wmo.int/wiswiki/tiki-index.php%3Fpage=TT-AvXML
48 stars 22 forks source link

Schematron rule VolcanicAshSIGMET.VolcanicAshSIGMET-6 cannot handle double volcanoes #213

Closed blchoy closed 4 years ago

blchoy commented 4 years ago

Alexandru Cosma reported (cbs-tt-avxml:1164) that schematron rule VolcanicAshSIGMET.VolcanicAshSIGMET-6 cannot handle the case with two volcanoes. This is true as the rule is not expected to match more than one path at a time. After some tests, the assertion is proposed to be changed to:

<sch:assert test="( if( exists(iwxxm:eruptingVolcano//metce:position) ) then( empty(for $i in iwxxm:eruptingVolcano//metce:position//gml:pos/(ancestor-or-self::*[exists(@srsName)])[last()] return $i[not(@srsDimension='2') or @axisLabels='']) ) else( true() ) )">VolcanicAshSIGMET.VolcanicAshSIGMET-6: If a geometry is defined for iwxxm:eruptingVolcano//metce:position by providing @srsName, @srsDimension must equal to 2 and @aixsLabels must be non-empty</sch:assert>

It is noticed that similar rules will have to be modified too for safety reason.

blchoy commented 4 years ago

Fixed in Version 3.0-dev.

blchoy commented 4 years ago

There is another issue when I played with Alexandru Cosma's example: The OBS time of the second volcano is later than the begin time of the valid period which, in accordance to the discussion in #208, should not happen. Even though it is permitted in Annex 3, I think the best practice is to always have one phenomenon per SIGMET message in order to avoid complication. Unless there are requests we will stick to the decision in #208 with regard to the relationship of phenomenonTime and validPeriod.