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

Fix IWXXM 3.0 schematron rules for METAR/SPECI, AIRMET and SIGMET products. #317

Open mgoberfield opened 1 year ago

mgoberfield commented 1 year ago

Describe the bug Two bugs were discovered with IWXXM 3.0 business rules which caused properly constructed IWXXM 3.0 XML METAR, SIGMET and AIRMET documents to fail schematron validation. This will cause consumers performing XML validations to erroneously flag, and worse, possibly reject the data.

Refer to issues #197 and #208 for more detailed write-ups on these two schematron bugs which were fixed in later releases of IWXXM.

To Reproduce Steps to reproduce the behavior: XML documents which trigger the false errors are attached, along with error messages from the OxygenXML application.

1) Import the XML document into an application, such as OxygenXML, or against a command-line application such as CRUX that can perform schema and schematron validation.

2) Be sure that the application or tool uses the IWXXM 3.0 schema and schematron files when performing schema and business-rules validation.

3) For METARs, the schematron validation step erroneously flags every report in the as exceeding extension block content length (5000 characters). Clearly by visual inspection, each METAR report has much less than that.

4) For LSCA31 SIGMET the timeIndicator is "OBSERVATION", and the validPeriod beginning time is later than the phenomenonTime consistent with schematron rules in later releases of IWXXM.

Expected behavior All XML documents to pass IWXXM 3.0 schematron validation step. If you need more examples of SIGMETs and AIRMETs, I can provide them.

IWXXM 30 Schematron.zip

blchoy commented 1 year ago

Looking back these known bugs had been fixed in IWXXM 3.0-dev but this version has never been published after a debate. In order not to re-invent the wheel I have revived this branch and renamed it as v3.0.1RC1. I confirmed that both examples passed the schematron tests in iwxxm.sch. The remaining question is how to deal with this; are we going to leave it as a branch of the GitHub repository as unofficial materials? @amilan17 we need Secretariat's advise.

Note that even though I renamed the branch to v3.0.1RC1, the schema version is still indicated as 3.0-dev. If we decided to leave the branch there we will need to decide the version number the schemas should carry and make necessary adjustments.

amilan17 commented 1 year ago

https://github.com/wmo-im/iwxxm/wiki/TT-AvData-Teleconference-2023-Jul-6 notes:

@mgoberfield will test branch.

@amilan17 will work on publication options for the MoC vI.2, schematron and notifications needed. The ONLY change is the schematron.