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 fails Annex 3 abbreviated TEST messages #220

Closed mgoberfield closed 3 years ago

mgoberfield commented 4 years ago

For TEST SIGMET/AIRMET, and Advisories, the message can

end immediately after the word "TEST"

For advisories, it is immediately after the ADVISORY line. Volcanic Ash Advisory is representative:

Annotation 2020-05-05 103910

However, the schematron rules fault such messages:

Annotation 2020-05-05 103911

Severity: error Description: VolcanicAshAdvisory.VolcanicAshAdvisory-2: An ordinary report should have appropriately filled elements including Iwxxm:issueTime, iwxxm:issuingVolcanicAshAdvisoryCentre, iwxxm:volcano, iwxxm:stateOrRegion, iwxxm:summitElevation, iwxxm:advisoryNumber, iwxxm:informationSource, iwxxm:eruptionDetails, iwxxm:observation, iwxxm:forecast, iwxxm:remarks and iwxxm:nextAdvisoryTime Similarily for the Tropical Cyclone and Space Weather advisories as well.

Similar rules exist for SIGMETs and AIRMETs

Severity: error Description: SIGMET.SIGMET-4: An ordinary report should have appropriately filled elements including Iwxxm:issueTime, iwxxm:issuingAirTrafficServicesUnit, iwxxm:originatingMeteorologicalWatchOffice, iwxxm:issuingAirTrafficServicesRegion, iwxxm:sequenceNumber, iwxxm:validPeriod, iwxxm:phenomenon and iwxxm:analysis. Elements iwxxm:cancelledReportSequenceNumber and iwxxm:cancelledReportValidPeriod shall be absent

mgoberfield commented 4 years ago

Please see #221 for one possible resolution.

blchoy commented 4 years ago

Thanks @mgoberfield. I agree that in the tests for ordinary reports there is a missing check on attribute permissibleUsage="OPERATIONAL". Personally I will not check NON-OPERATIONAL reports no matter it is TEST or EXERCISE as no one will know the sort of TEST or EXERCISE that is going to be conducted; giving them the greatest flexibility could be the best way to go.

If you may recall, OPERATIONAL status was first introduced in IWXXM (to let people send TEST/EXERCISE reports irrespective of the strict XML format) and back-ported to TAC. Therefore I would also like to extend the above change to cover METAR/SPECI and TAF.

mgoberfield commented 4 years ago

Thanks for the opinion. You are free to decline the pull request.

On Sun, May 17, 2020 at 9:27 AM BL Choy notifications@github.com wrote:

Thanks @mgoberfield https://github.com/mgoberfield. I agree that in the tests for ordinary reports there is a missing check on attribute permissibleUsage="OPERATIONAL". Personally I will not check NON-OPERATIONAL reports no matter it is TEST or EXERCISE as no one will know the sort of TEST or EXERCISE that is going to be conducted.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/wmo-im/iwxxm/issues/220#issuecomment-629798602, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB35ETKJW3ODE2QM53ZMS7DRR7Q4DANCNFSM4MZUOUYQ .

blchoy commented 4 years ago

Thanks for the opinion. You are free to decline the pull request.

Don't do it yet. As I will have to implement the change in the model (remember the rules are stored in EA), your suggested changes are essential to double check my work.

blchoy commented 3 years ago

Fixed in Version 3.0-dev.

The intention is to have more comprehensive integrity check only for OPERATIONAL reports; for NON-OPERATIONAL reports and reports failing translation only minimum amount of elements are expected. For SIGMET and AIRMET, the mandatory elements for NON-OPERATIONAL reports are less that those indicated in the Annex 3 template to allow for more flexibility in preparing TEST/EXER reports in IWXXM which should be safe as these reports should not be used operationally.

For record purpose, the following rules have been amended:

  1. METAR_SPECI.MeteorologicalAerodromeObservationReport-2
  2. METAR_SPECI.MeteorologicalAerodromeObservationReport-3
  3. METAR_SPECI.MeteorologicalAerodromeObservationReport-4
  4. TAF.TAF-2
  5. TAF.TAF-3
  6. TAF.TAF-4
  7. TAF.TAF-5
  8. SIGMET.SIGMET-2
  9. SIGMET.SIGMET-3
  10. SIGMET.SIGMET-4
  11. SIGMET.SIGMET-5a (after #208)
  12. SIGMET.SIGMET-5b (after #208)
  13. SIGMET.SIGMET-6
  14. SIGMET.SIGMET-7
  15. AIRMET.AIRMET-2
  16. AIRMET.AIRMET-3
  17. AIRMET.AIRMET-4
  18. AIRMET.AIRMET-5a (after #208)
  19. AIRMET.AIRMET-5b (after #208)
  20. TropicalCycloneAdvisory.TropicalCycloneAdvisory-1
  21. TropicalCycloneAdvisory.TropicalCycloneAdvisory-2
  22. VolcanicAshAdvisory.VolcanicAshAdvisory-1
  23. VolcanicAshAdvisory.VolcanicAshAdvisory-2
  24. SpaceWeatherAdvisory.SpaceWeatherAdvisory-1
  25. SpaceWeatherAdvisory.SpaceWeatherAdvisory-2