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

RDF files exported from the WMO Codes Registry have changed over time #247

Closed blchoy closed 3 years ago

blchoy commented 3 years ago

I haven't download RDF files from the Codes Registry for some time. Just noticed that the latest ones are different from those obtained before. The following fragments contrasts the difference between the two:

Previous:

    xmlns:foaf="http://xmlns.com/foaf/0.1/"
    xmlns:grib2-core="http://codes.wmo.int/grib2/schema/core/">
  <ldp:Container rdf:about="http://codes.wmo.int/bufr4/codeflag/0-20-086">
    <skos:member>
      <skos:Concept rdf:about="http://codes.wmo.int/bufr4/codeflag/0-20-086/7">
        <rdfs:label xml:lang="en">Ice</rdfs:label>
        <skos:notation rdf:datatype="http://www.w3.org/2001/XMLSchema#integer"
        >7</skos:notation>
        <j.0:fxy>020086</j.0:fxy>
      </skos:Concept>
    </skos:member>

Latest:

    xmlns:foaf="http://xmlns.com/foaf/0.1/"
    xmlns:grib2-core="http://codes.wmo.int/grib2/schema/core/">
  <reg:RegisterItem rdf:about="http://codes.wmo.int/bufr4/codeflag/0-08-011/_5">
    <dct:dateSubmitted rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime"
    >2014-09-03T09:54:08.744Z</dct:dateSubmitted>
    <reg:register>
      <ldp:Container rdf:about="http://codes.wmo.int/bufr4/codeflag/0-08-011">
        <skos:member>
          <skos:Concept rdf:about="http://codes.wmo.int/bufr4/codeflag/0-08-011/24">
            <rdfs:label xml:lang="en">Duststorm</rdfs:label>
            <skos:notation rdf:datatype="http://www.w3.org/2001/XMLSchema#integer"
            >24</skos:notation>
            <j.0:fxy>008011</j.0:fxy>
          </skos:Concept>
        </skos:member>
        <skos:member>

The interesting thing is because of the way the schematron rules are written, those using the recently downloaded RDF files will always get a complaint from the validator. However we received no complaint so far.

Anyway I will revised the rules to make them more flexible in the xpath search. May be @marqh could also confirm our suspicion on a code registry export change?

mgoberfield commented 3 years ago

Hmm. The validation script I use is very similar to the one used here on GitHub. I just downloaded the RDF formatted files from the WMO code registry. I didn't see any changes from Dec 15 2020 set to today's: they have identical file sizes and content.

Are you using the GUI interface to get the RDF files? The python routine is here

mgoberfield commented 3 years ago

If you are downloading the RDF files from the GUI/browser, don't select 'with metadata' option, just plain.

blchoy commented 3 years ago

If you are downloading the RDF files from the GUI/browser, don't select 'with metadata' option, just plain.

That's right, it must be too late when I compared the files previously. :)

In any case, I have made a slight change to the XPath in the schematron rule and now it should be independent on the ancestors.