Nothing Special   »   [go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schematron rule(s) expect validPeriod for NON-OPERATIONAL and CANCEL report #323

Open
henrychv opened this issue Jul 11, 2023 · 2 comments

Comments

@henrychv
Copy link

Describe the bug
Schematron rules like TAF.TAF2 are in 2021-2 version applied not just to translationFailedTAC but also for NON-OPERATIONAL reports, and this fails when isCancelReport="true" as schematron rule expects iwxxm:validPeriod to be present, but in this case there is iwxxm:cancelledReportValidPeriod

To Reproduce
Run schematron on iwxxm 2021-2 TAF document which is permissibleUsage="NON-OPERATIONAL", permissibleUsageReason="TEST", isCancelReport="true"

Expected behavior
Schematron will not complain.

Screenshots
Schematron now fails with error:
TAF.TAF-2: A non-operational report or a report that failed translation should have as a minimum appropriately filled elements including iwxxm:issueTime, iwxxm:aerodrome and iwxxm:validPeriod

Additional context
We used the TAC below to generate the iwxxm report with set permissibleUsage="NON-OPERATIONAL"

FTXX99 XXXX 131400
TAF LKKV 131400Z 1309/1321 CNL=

I attached example xml file which reproduces the problem. Please ignore the extensive namespaces in xml header which are probably not necessary there.

bug_taf_schematron.txt

@mgoberfield
Copy link
Contributor
mgoberfield commented Jul 12, 2023

Hello @henrychv,

The permissableUsageReason attribute is used for non-operational test or exercise advisories. There is no requirement that products such as the TAF (or SIGMETs/AIRMETs) need this also.

V/R,

mark

@henrychv
Copy link
Author

Hi Mark,
my point was that if we use in our test permissableUsageReason NON-OPERATIONAL for cancel products, the changed schematron rule fails:

<sch:pattern id="TAF.TAF-2">
      <sch:rule context="//iwxxm:TAF">
         <sch:assert test="( if( (string-length(@translationFailedTAC) gt 0) or (@permissibleUsage = 'NON-OPERATIONAL') ) then( exists(iwxxm:issueTime) and exists(iwxxm:aerodrome) and exists(iwxxm:validPeriod) ) else( true() ) )">TAF.TAF-2: A non-operational report or a report that failed translation should have as a minimum appropriately filled elements including iwxxm:issueTime, iwxxm:aerodrome and iwxxm:validPeriod</sch:assert>
      </sch:rule>
   </sch:pattern>

The part or (@permissibleUsage = 'NON-OPERATIONAL') was added recently and breaks this rule for cancel non-operational reports.

Is it possible to have non-operational cancel test reports? If yes, then schematron rule should work with them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants