fmidev / fmi-avi-messageconverter-iwxxm

Conversion module for aviation IWXXM messages
MIT License
7 stars 5 forks source link

Schematron warnings in SWX Advisory IWXXM serialization #28

Closed kasarit closed 4 years ago

kasarit commented 4 years ago

Running SpaceWeatherIWXXMSerializerTest prints the following warnings:

Warning 
  XTDE0540: Ambiguous rule match for
  /iwxxm3:SpaceWeatherAdvisory/iwxxm3:issueTime[1]/gml:TimeInstant[1]
Matches both "element()" on line -1 of 
and "( element() | text() | comment() | processing-instruction() )" on line -1 of 
Warning 
  XTDE0540: Ambiguous rule match for
  /iwxxm3:SpaceWeatherAdvisory/iwxxm3:issueTime[1]/gml:TimeInstant[1]/gml:timePosition[1]
Matches both "element()" on line -1 of 
and "( element() | text() | comment() | processing-instruction() )" on line -1 of 
Warning 
  XTDE0540: Ambiguous rule match for
  /iwxxm3:SpaceWeatherAdvisory/iwxxm3:issuingSpaceWeatherCentre[1]/aixm:Unit[1]
Matches both "element()" on line -1 of 
and "( element() | text() | comment() | processing-instruction() )" on line -1 of 
Warning 
  XTDE0540: Ambiguous rule match for
  /iwxxm3:SpaceWeatherAdvisory/iwxxm3:issuingSpaceWeatherCentre[1]/aixm:Unit[1]/aixm:timeSlice[1]
Matches both "element()" on line -1 of 
and "( element() | text() | comment() | processing-instruction() )" on line -1 of 
Warning 
  XTDE0540: Ambiguous rule match for
  /iwxxm3:SpaceWeatherAdvisory/iwxxm3:issuingSpaceWeatherCentre[1]/aixm:Unit[1]/aixm:timeSlice[1]/aixm:UnitTimeSlice[1]
Matches both "element()" on line -1 of 
and "( element() | text() | comment() | processing-instruction() )" on line -1 of 
Warning 
  XTDE0540: Ambiguous rule match for
  /iwxxm3:SpaceWeatherAdvisory/iwxxm3:issuingSpaceWeatherCentre[1]/aixm:Unit[1]/aixm:timeSlice[1]/aixm:UnitTimeSlice[1]/gml:validTime[1]
Matches both "element()" on line -1 of 
and "( element() | text() | comment() | processing-instruction() )" on line -1 of 
Warning 
  XTDE0540: Ambiguous rule match for
  /iwxxm3:SpaceWeatherAdvisory/iwxxm3:issuingSpaceWeatherCentre[1]/aixm:Unit[1]/aixm:timeSlice[1]/aixm:UnitTimeSlice[1]/aixm:interpretation[1]
Matches both "element()" on line -1 of 
and "( element() | text() | comment() | processing-instruction() )" on line -1 of 
Warning 
  XTDE0540: Ambiguous rule match for
  /iwxxm3:SpaceWeatherAdvisory/iwxxm3:issuingSpaceWeatherCentre[1]/aixm:Unit[1]/aixm:timeSlice[1]/aixm:UnitTimeSlice[1]/aixm:name[1]
Matches both "element()" on line -1 of 
and "( element() | text() | comment() | processing-instruction() )" on line -1 of 
Warning 
  XTDE0540: Ambiguous rule match for
  /iwxxm3:SpaceWeatherAdvisory/iwxxm3:issuingSpaceWeatherCentre[1]/aixm:Unit[1]/aixm:timeSlice[1]/aixm:UnitTimeSlice[1]/aixm:type[1]
Matches both "element()" on line -1 of 
and "( element() | text() | comment() | processing-instruction() )" on line -1 of 
Warning 
  XTDE0540: Ambiguous rule match for
  /iwxxm3:SpaceWeatherAdvisory/iwxxm3:issuingSpaceWeatherCentre[1]/aixm:Unit[1]/aixm:timeSlice[1]/aixm:UnitTimeSlice[1]/aixm:designator[1]
Matches both "element()" on line -1 of 
and "( element() | text() | comment() | processing-instruction() )" on line -1 of 
Warning 
  XTDE0540: Ambiguous rule match for
  /iwxxm3:SpaceWeatherAdvisory/iwxxm3:analysis[1]/iwxxm3:SpaceWeatherAnalysis[1]/iwxxm3:phenomenonTime[1]/gml:TimeInstant[1]
Matches both "element()" on line -1 of 
and "( element() | text() | comment() | processing-instruction() )" on line -1 of 
Warning 
  XTDE0540: Ambiguous rule match for
  /iwxxm3:SpaceWeatherAdvisory/iwxxm3:analysis[1]/iwxxm3:SpaceWeatherAnalysis[1]/iwxxm3:phenomenonTime[1]/gml:TimeInstant[1]/gml:timePosition[1]
Matches both "element()" on line -1 of 
and "( element() | text() | comment() | processing-instruction() )" on line -1 of 
Warning 
  XTDE0540: Ambiguous rule match for
  /iwxxm3:SpaceWeatherAdvisory/iwxxm3:analysis[1]/iwxxm3:SpaceWeatherAnalysis[1]/iwxxm3:region[1]/iwxxm3:SpaceWeatherRegion[1]/iwxxm3:location[1]/aixm:AirspaceVolume[1]
Matches both "element()" on line -1 of 
and "( element() | text() | comment() | processing-instruction() )" on line -1 of 
Warning 
  XTDE0540: Ambiguous rule match for
  /iwxxm3:SpaceWeatherAdvisory/iwxxm3:analysis[1]/iwxxm3:SpaceWeatherAnalysis[1]/iwxxm3:region[1]/iwxxm3:SpaceWeatherRegion[1]/iwxxm3:location[1]/aixm:AirspaceVolume[1]/aixm:horizontalProjection[1]
Matches both "element()" on line -1 of 
and "( element() | text() | comment() | processing-instruction() )" on line -1 of 
Warning 
  XTDE0540: Ambiguous rule match for
  /iwxxm3:SpaceWeatherAdvisory/iwxxm3:analysis[1]/iwxxm3:SpaceWeatherAnalysis[1]/iwxxm3:region[1]/iwxxm3:SpaceWeatherRegion[1]/iwxxm3:location[1]/aixm:AirspaceVolume[1]/aixm:horizontalProjection[1]/aixm:Surface[1]
Matches both "element()" on line -1 of 
and "( element() | text() | comment() | processing-instruction() )" on line -1 of 
Warning 
  XTDE0540: Ambiguous rule match for
  /iwxxm3:SpaceWeatherAdvisory/iwxxm3:analysis[1]/iwxxm3:SpaceWeatherAnalysis[1]/iwxxm3:region[1]/iwxxm3:SpaceWeatherRegion[1]/iwxxm3:location[1]/aixm:AirspaceVolume[1]/aixm:horizontalProjection[1]/aixm:Surface[1]/gml:patches[1]
Matches both "element()" on line -1 of 
and "( element() | text() | comment() | processing-instruction() )" on line -1 of 
Warning 
  XTDE0540: Ambiguous rule match for
  /iwxxm3:SpaceWeatherAdvisory/iwxxm3:analysis[1]/iwxxm3:SpaceWeatherAnalysis[1]/iwxxm3:region[1]/iwxxm3:SpaceWeatherRegion[1]/iwxxm3:location[1]/aixm:AirspaceVolume[1]/aixm:horizontalProjection[1]/aixm:Surface[1]/gml:patches[1]/gml:PolygonPatch[1]
Matches both "element()" on line -1 of 
and "( element() | text() | comment() | processing-instruction() )" on line -1 of 
Warning 
  XTDE0540: Ambiguous rule match for
  /iwxxm3:SpaceWeatherAdvisory/iwxxm3:analysis[1]/iwxxm3:SpaceWeatherAnalysis[1]/iwxxm3:region[1]/iwxxm3:SpaceWeatherRegion[1]/iwxxm3:location[1]/aixm:AirspaceVolume[1]/aixm:horizontalProjection[1]/aixm:Surface[1]/gml:patches[1]/gml:PolygonPatch[1]/gml:exterior[1]
Matches both "element()" on line -1 of 
and "( element() | text() | comment() | processing-instruction() )" on line -1 of 
Warning 
  XTDE0540: Ambiguous rule match for
  /iwxxm3:SpaceWeatherAdvisory/iwxxm3:analysis[1]/iwxxm3:SpaceWeatherAnalysis[1]/iwxxm3:region[1]/iwxxm3:SpaceWeatherRegion[1]/iwxxm3:location[1]/aixm:AirspaceVolume[1]/aixm:horizontalProjection[1]/aixm:Surface[1]/gml:patches[1]/gml:PolygonPatch[1]/gml:exterior[1]/gml:LinearRing[1]
Matches both "element()" on line -1 of 
and "( element() | text() | comment() | processing-instruction() )" on line -1 of 
Warning 
  XTDE0540: Ambiguous rule match for
  /iwxxm3:SpaceWeatherAdvisory/iwxxm3:analysis[1]/iwxxm3:SpaceWeatherAnalysis[1]/iwxxm3:region[1]/iwxxm3:SpaceWeatherRegion[1]/iwxxm3:location[1]/aixm:AirspaceVolume[1]/aixm:horizontalProjection[1]/aixm:Surface[1]/gml:patches[1]/gml:PolygonPatch[1]/gml:exterior[1]/gml:LinearRing[1]/gml:posList[1]
Matches both "element()" on line -1 of 
and "( element() | text() | comment() | processing-instruction() )" on line -1 of 
Warning 
  XTDE0540: Ambiguous rule match for
  /iwxxm3:SpaceWeatherAdvisory/iwxxm3:analysis[1]/iwxxm3:SpaceWeatherAnalysis[1]/iwxxm3:region[2]/iwxxm3:SpaceWeatherRegion[1]/iwxxm3:location[1]/aixm:AirspaceVolume[1]
Matches both "element()" on line -1 of 
and "( element() | text() | comment() | processing-instruction() )" on line -1 of 
Warning 
  XTDE0540: Ambiguous rule match for
  /iwxxm3:SpaceWeatherAdvisory/iwxxm3:analysis[1]/iwxxm3:SpaceWeatherAnalysis[1]/iwxxm3:region[2]/iwxxm3:SpaceWeatherRegion[1]/iwxxm3:location[1]/aixm:AirspaceVolume[1]/aixm:horizontalProjection[1]
Matches both "element()" on line -1 of 
and "( element() | text() | comment() | processing-instruction() )" on line -1 of 
Warning 
  XTDE0540: Ambiguous rule match for
  /iwxxm3:SpaceWeatherAdvisory/iwxxm3:analysis[1]/iwxxm3:SpaceWeatherAnalysis[1]/iwxxm3:region[2]/iwxxm3:SpaceWeatherRegion[1]/iwxxm3:location[1]/aixm:AirspaceVolume[1]/aixm:horizontalProjection[1]/aixm:Surface[1]
Matches both "element()" on line -1 of 
and "( element() | text() | comment() | processing-instruction() )" on line -1 of 
Warning 
  XTDE0540: Ambiguous rule match for
  /iwxxm3:SpaceWeatherAdvisory/iwxxm3:analysis[1]/iwxxm3:SpaceWeatherAnalysis[1]/iwxxm3:region[2]/iwxxm3:SpaceWeatherRegion[1]/iwxxm3:location[1]/aixm:AirspaceVolume[1]/aixm:horizontalProjection[1]/aixm:Surface[1]/gml:patches[1]
Matches both "element()" on line -1 of 
and "( element() | text() | comment() | processing-instruction() )" on line -1 of 
Warning 
  XTDE0540: Ambiguous rule match for
  /iwxxm3:SpaceWeatherAdvisory/iwxxm3:analysis[1]/iwxxm3:SpaceWeatherAnalysis[1]/iwxxm3:region[2]/iwxxm3:SpaceWeatherRegion[1]/iwxxm3:location[1]/aixm:AirspaceVolume[1]/aixm:horizontalProjection[1]/aixm:Surface[1]/gml:patches[1]/gml:PolygonPatch[1]
Matches both "element()" on line -1 of 
and "( element() | text() | comment() | processing-instruction() )" on line -1 of 
Warning 
  XTDE0540: Ambiguous rule match for
  /iwxxm3:SpaceWeatherAdvisory/iwxxm3:analysis[1]/iwxxm3:SpaceWeatherAnalysis[1]/iwxxm3:region[2]/iwxxm3:SpaceWeatherRegion[1]/iwxxm3:location[1]/aixm:AirspaceVolume[1]/aixm:horizontalProjection[1]/aixm:Surface[1]/gml:patches[1]/gml:PolygonPatch[1]/gml:exterior[1]
Matches both "element()" on line -1 of 
and "( element() | text() | comment() | processing-instruction() )" on line -1 of 
No more warnings will be displayed
            
ilkkarinne commented 4 years ago

I'll take this issue

ilkkarinne commented 4 years ago

I cannot reproduce this with the JUnit test of the project, perhaps caused by another XSLT engine used with the workstation project?

ilkkarinne commented 4 years ago

This which turned up to be caused by the clean-up XSL script for the SWX messages: The template match rules at https://github.com/fmidev/fmi-avi-messageconverter-iwxxm/blob/7c25a8e8138b7facc43d9ca5cb60b5dd436a3142/src/main/resources/fi/fmi/avi/converter/iwxxm/v3_0/swx/SpaceWeatherAdvisoryCleanUp.xsl#L7 and https://github.com/fmidev/fmi-avi-messageconverter-iwxxm/blob/7c25a8e8138b7facc43d9ca5cb60b5dd436a3142/src/main/resources/fi/fmi/avi/converter/iwxxm/v3_0/swx/SpaceWeatherAdvisoryCleanUp.xsl#L13 were ambiguous when matching element nodes.