Closed blchoy closed 4 years ago
The IWXXM/AIXM Profiles uses the same XML Namespace identifier as the AIXM XML Namespace. This creates errors when trying to validate (full) AIXM and IWXXM in the same system environment. An XML Namespace should be unique to a specific XSD - as it is its normative identifier.
I think there is an easy “fix” for this. And this is to use the XML Schema
I tried to test this out (see attached xsd) but I could not do a final validation as I get consistent (and many) errors from the recursive import of the GML schemas. (Has any else reported that?)
If this works, then all you need to do is
..but I think the better strategy is to adopt the full AIXM Schema!
IWXXM schemas imports the full AIXM Schema starting from Version 3.0-dev.
Scott Wilson of EUROCONTROL reported an issue involving the validity of an XSD importing multiple XMs including IWXXM (see this page for details).
The following is a sample XSD file to showcase the issue:
Validating this XSD with OxygenXML Editor and option "honour all schema locations" disabled will result an error indicating that "aixm:SurveillanceGroundStationType" has not been defined.
If AIXM is imported before IWXXM, however, there will be no validation error.
Of course if "honour all schema locations" is enabled it will return errors indicating that some features have been defined twice, irrespective of the order of the imports.
The reason is that Xerces-based XML Schema validator acknowledges only the first import for the same namespace by default. Of course the root cause is the use of the same namespace for both AIXM and AIXM WX Profile, the latter of which is imported in IWXXM's common.xsd:
As mentioned by Scott, we can resolve this by either (i) importing the full AIXM in common.xsd or (ii) changing the namespace referencing the AIXM WX Profile.
Option (i) is probably the simplest solution as it involves a patch to common.xsd and WMO No.306. The only drawback is the need to import all AIXM features which may be a burden to the parsers/validators. This also defeats the original intention of having the AIXM WX Profile.
Option (ii) involves changes to common.xsd, WMO No.306, examples and more. We will also have to remind users to define namespace for the AIXM WX Profile in their IWXXM instances which is a huge amount of work.
Personally I don't think we need an urgent fix right now as this deficiency only affects SWIM services under development and could be get around with the choice of parser/validator and/or configuration options.
Views please.