Closed blchoy closed 4 years ago
@marqh, CI failed because codeListsToSchematron.py cannot create RDF file codes.wmo.int-common-nil.rdf as the Python script checks the XSDs for codelist names but "nil" is not enlisted in IWXXM; we will have to add this manually into the Python script. Could you help?
A second thought is that we can add the "nil" codelist (and others in which the XML element/attribute are defined outside of IWXXM, like @nilReason) we use in common.xsd. This can be done in the next version of IWXXM.
Hi @blchoy
the code in
https://github.com/wmo-im/iwxxm/blob/master/bin/codeListsToSchematron.py#L45
looks through the .xsd files and
https://github.com/wmo-im/iwxxm/blob/master/bin/codeListsToSchematron.py#L50
find all types with a vocabulary/codelist
There is no instance of
http://codes.wmo.int/common/nil
within the xsd files:
grep 'http://codes.wmo.int/common/nil' *.xsd
returns None
So, I think that the xsd files would need to specify that there is a controlled vocabulary published at http://codes.wmo.int/common/nil
in a similar way to the specification:
grep 'http://codes.wmo.int/49-2/CloudAmountReportedAtAerodrome' *.xsd
common.xsd: <vocabulary>http://codes.wmo.int/49-2/CloudAmountReportedAtAerodrome</vocabulary>
This is part of a complexType definition (in this example <complexType name="CloudLayerType" with type="iwxxm:CloudAmountReportedAtAerodromeType"), and the complexType
does this help?
There is no instance of
http://codes.wmo.int/common/nil
within the xsd files:
Yes, this is exactly the issue right now, and I have raised #193 to follow up in the next version. The only thing we could do now (without changing common.xsd, in fact there is no pressing need to) is to update codeListsToSchematron.py to download and create codes.wmo.int-common-nil.rdf directly. You know I am not a Python programmer and I need some help from the expert. ;)
@blchoy understood
Do I interpret from #193 that adding the nilReason to the xsd is not a simple change, of the form used in other element definitions? Is it hard to just 'fix this now'?
I note from the examples that most nilReason instances use the registry as expected, but there are two examples that don't:
IWXXM/examples$ grep nil *
airmet-A6-1a-TS.xml: <iwxxm:phenomenonTime nilReason="http://codes.wmo.int/common/nil/missing"/>
airmet-A6-1a-TS.xml: <aixm:maximumLimit xsi:nil="true" nilReason="unknown"/>
metar-A3-1.xml: <iwxxm:weather nilReason="http://codes.wmo.int/common/nil/nothingOfOperationalSignificance"/>
metar-EDDF-runwaystate.xml: <iwxxm:verticalVisibility uom="N/A" xsi:nil="true" nilReason="http://codes.wmo.int/common/nil/notObservable"/>
metar-EDDF-runwaystate.xml: <iwxxm:phenomenonTime nilReason="unknown"/>
metar-EDDF-runwaystate.xml: <iwxxm:weather nilReason="http://codes.wmo.int/common/nil/nothingOfOperationalSignificance"/>
metar-NIL-collect.xml: <iwxxm:observation nilReason="http://codes.wmo.int/common/nil/missing"/>
sigmet-A6-1a-TS.xml: <iwxxm:phenomenonTime nilReason="http://codes.wmo.int/common/nil/missing"/>
sigmet-A6-2-TC.xml: <iwxxm:geometry nilReason="http://codes.wmo.int/common/nil/inapplicable"/>
spacewx-A2-3.xml: <iwxxm:region nilReason="http://codes.wmo.int/common/nil/nothingOfOperationalSignificance"/>
spacewx-A2-3.xml: <iwxxm:nextAdvisoryTime nilReason="http://codes.wmo.int/common/nil/inapplicable"/>
spacewx-A2-4.xml: <aixm:maximumLimit xsi:nil="true" nilReason="unknown"/>
spacewx-A2-4.xml: <aixm:maximumLimit xsi:nil="true" nilReason="unknown"/>
spacewx-A2-4.xml: <iwxxm:region nilReason="http://codes.wmo.int/common/nil/nothingOfOperationalSignificance"/>
spacewx-A2-4.xml: <iwxxm:nextAdvisoryTime nilReason="http://codes.wmo.ont/common/nil/inapplicable"/>
speci-A3-2.xml: <iwxxm:weather nilReason="http://codes.wmo.int/common/nil/nothingOfOperationalSignificance"/>
speci-A3-2.xml: <iwxxm:cloud nilReason="http://codes.wmo.int/common/nil/nothingOfOperationalSignificance"/>
taf-NIL-collect.xml: <iwxxm:baseForecast nilReason="http://codes.wmo.int/common/nil/missing"/>
tc-advisory-A2-2.xml: <iwxxm:remarks nilReason="http://codes.wmo.int/common/nil/inappropriate"/>
va-advisory-A2-1.xml: <iwxxm:ashCloudExtent nilReason="unknown">
Do the two instances on the plain string nilReason="unknown"
also need fixing?
If the path of least resistance is to patch the download to include the nilReason vocabulary, then I can provide a code change to fix this
Do the two instances on the plain string
nilReason="unknown"
also need fixing?
I did in this PR.
@blchoy I have PRd your PR with a code change: https://github.com/blchoy/iwxxm/pull/1
i hope this helps
I have PRd your PR with a code change
That's wonderful! All checks have passed now. Please confirm again.
If the path of least resistance is to patch the download to include the nilReason vocabulary, then I can provide a code change to fix this
I am afraid so.
This PR implements Steps 2-4 in #184 to advance IWXXM to version 3.0.0RC4. This is supposed to be the last release candidate before the release of 3.0.0.