I am new to xml and I am having difficulties in understanding what is happening in the below statement. The Schematron file is from https://schemas.wmo.int/iwxxm/3.0.0/rule/iwxxm.sch
<sch:rule context="//*[contains(name(),'MeteorologicalAerodromeTrendForecast')]/iwxxm:weather">
<sch:assert test="@xlink:href = document('codes.wmo.int-49-2-AerodromePresentOrForecastWeather.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason">
MeteorologicalAerodromeTrendForecast iwxxm:weather elements should be a member of http://codes.wmo.int/49-2/AerodromePresentOrForecastWeather
</sch:assert>
</sch:rule>
I understand that there is a rule to check the element iwxxm:weather
, but i am unable to understand the test condition. Can anyone explain it to me please? For what value, the test will pass.
The test is failing at a line in the xml which is
<iwxxm:MeteorologicalAerodromeForecast gml:id="uuid.c42e9861-aed6-449f-b4cd-4789e96464d5" cloudAndVisibilityOK="false">
<iwxxm:prevailingVisibility uom="m">350</iwxxm:prevailingVisibility>
<iwxxm:surfaceWind>
<iwxxm:AerodromeSurfaceWindForecast variableWindDirection="false">
<iwxxm:meanWindDirection uom="deg">240</iwxxm:meanWindDirection>
<iwxxm:meanWindSpeed uom="[kn_i]">8</iwxxm:meanWindSpeed>
</iwxxm:AerodromeSurfaceWindForecast>
</iwxxm:surfaceWind>
Here ----> <iwxxm:weather xlink:href="http://codes.wmo.int/49-2/AerodromePresentOrForecastWeather/_RA"/>
<iwxxm:cloud>
Thanks
contains(name(),'MeteorologicalAerodromeTrendForecast')
tocontains(local-name(),'MeteorologicalAerodromeTrendForecast')
. – Brown