common.xsd does not pass validation by itself
Complex types defined in common.xsd make use of types defined in measure.xsd but the file is not included.
- Attempt to perform schema validation on common.xsd
- Types "iwxxm:LengthWithNilReasonType" and "iwxxm:DistanceWithNilReasonType" are undefined
- These missing types are defined in "measure.xsd"
Schema files are expected to pass schema validation.
Adding an <include schemaLocation="measures.xsd"/> directive near the top of common.xsd file resolves the errors.
If implemented, this makes the include directives of "measure.xsd" and "common.xsd" in iwxxm.xsd unnecessary as individual product schemas all include common.xsd again. This may be due to EA production. However, repeated calls to include schemas do not seem to have harmful effects.
@blchoy
Adding an <include schemaLocation="measures.xsd"/> directive near the top of common.xsd file resolves the errors. If implemented, this makes the include directives of "measure.xsd" and "common.xsd" in iwxxm.xsd unnecessary as individual product schemas all include common.xsd again. This may be due to EA production. However, repeated calls to include schemas do not seem to have harmful effects.
True and agreed with the suggested changes.
A more drastic change is to incorporate them into common.xsd, just like StringWithNilReasonType. @mgoberfield any views on this?
https://github.com/wmo-im/iwxxm/wiki/TT-AvData-Discussion-2025-Jan-22 notes:
- the team discussed the option of removing measures.xsd instead
- team decided to import measures into common.xsd.
https://github.com/wmo-im/iwxxm/wiki/TT-AvData-Discussion-2025-Jun-13 notes: the team discussed and think that individual XSD files do not need to validate independently
To @wmo-im/tt-avdata :
The reversal is confusing but I acknowledge there are far wiser and smarter folks than myself on the team so please enlighten me if you wish to.
As currently implemented, every IWXXM XML message has to include iwxxm.xsd in order to successfully resolve everything and validate since it is the only file that has the <include schemaLocation="measure.xsd"> line. None of the other XSD files has this.
Please see the product XML examples. Every root element has the
xsi:schemaLocation="http://icao.int/iwxxm/2025-2 http://schemas.wmo.int/iwxxm/2025-2RC2/iwxxm.xsd"
line in order to resolve and successfully validate the document. By including iwxxm.xsd, every product XSD file is included as well, which is unnecessary in my very humble opinion.
My proposal--to have this line in common.xsd instead--if it was accepted, would mean that, for example, a METAR XML document would only need to include the metarSpeci.xsd file, like so,
xsi:schemaLocation="http://icao.int/iwxxm/2025-2 http://schemas.wmo.int/iwxxm/2025-2RC2/metarSpeci.xsd"
in order to resolve and validate. Similarly for the other Annex 3 messages: only the product XSD file would be needed in the root element.
As the IWXXM product suite grows in the future, I was striving for efficiency when consumers have to parse, resolve and validate the XML messages.
That was my rationale for raising this issue. I apologize as I didn't explain this very well initially.
Very respectfully submitted,
mark
Thanks Mark. On the other hand, I don't see why we cannot merged the 5 features in measure.xsd into common.xsd:
and permanently delete measure.xsd to simplify the schemas. Any views?
Hi Choy,
Your suggestion has the same effect as my proposal. If it doesn't introduce heartburn for the maintainer of the UML model and not excessive work to generate the subsequent schema package without measures.xsd, then fine.
V/R,
mark
https://github.com/wmo-im/iwxxm/wiki/TT-AvData-Discussion-2025-Jun-25 notes: the team decided to merge the 5 features in measure.xsd into common.xsd and delete measure.xsd
Done.