Project

Profile

Help

Failure to compile XSLT ยป iwxxm.xsl

Tiaan Waslap, 2023-03-16 15:55

 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xsl:stylesheet xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:saxon="http://saxon.sf.net/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:schold="http://www.ascc.net/xml/schematron"
xmlns:iso="http://purl.oclc.org/dsdl/schematron"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:iwxxm="http://icao.int/iwxxm/3.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:gml="http://www.opengis.net/gml/3.2"
xmlns:aixm="http://www.aixm.aero/schema/5.1.1"
xmlns:collect="http://def.wmo.int/collect/2014"
xmlns:metce="http://def.wmo.int/metce/2013"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:reg="http://purl.org/linked-data/registry#"
version="2.0"><!--Implementers: please note that overriding process-prolog or process-root is
the preferred method for meta-stylesheets to use where possible. -->
<xsl:param name="archiveDirParameter"/>
<xsl:param name="archiveNameParameter"/>
<xsl:param name="fileNameParameter"/>
<xsl:param name="fileDirParameter"/>
<xsl:variable name="document-uri">
<xsl:value-of select="document-uri(/)"/>
</xsl:variable>
<!--PHASES-->
<!--PROLOG-->
<xsl:output xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
method="xml"
omit-xml-declaration="no"
standalone="yes"
indent="yes"/>
<!--XSD TYPES FOR XSLT2-->
<!--KEYS AND FUNCTIONS-->
<!--DEFAULT RULES-->
<!--MODE: SCHEMATRON-SELECT-FULL-PATH-->
<!--This mode can be used to generate an ugly though full XPath for locators-->
<xsl:template match="*" mode="schematron-select-full-path">
<xsl:apply-templates select="." mode="schematron-get-full-path"/>
</xsl:template>
<!--MODE: SCHEMATRON-FULL-PATH-->
<!--This mode can be used to generate an ugly though full XPath for locators-->
<xsl:template match="*" mode="schematron-get-full-path">
<xsl:apply-templates select="parent::*" mode="schematron-get-full-path"/>
<xsl:text>/</xsl:text>
<xsl:choose>
<xsl:when test="namespace-uri()=''">
<xsl:value-of select="name()"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>*:</xsl:text>
<xsl:value-of select="local-name()"/>
<xsl:text>[namespace-uri()='</xsl:text>
<xsl:value-of select="namespace-uri()"/>
<xsl:text>']</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:variable name="preceding"
select="count(preceding-sibling::*[local-name()=local-name(current()) and namespace-uri() = namespace-uri(current())])"/>
<xsl:text>[</xsl:text>
<xsl:value-of select="1+ $preceding"/>
<xsl:text>]</xsl:text>
</xsl:template>
<xsl:template match="@*" mode="schematron-get-full-path">
<xsl:apply-templates select="parent::*" mode="schematron-get-full-path"/>
<xsl:text>/</xsl:text>
<xsl:choose>
<xsl:when test="namespace-uri()=''">@<xsl:value-of select="name()"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>@*[local-name()='</xsl:text>
<xsl:value-of select="local-name()"/>
<xsl:text>' and namespace-uri()='</xsl:text>
<xsl:value-of select="namespace-uri()"/>
<xsl:text>']</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!--MODE: SCHEMATRON-FULL-PATH-2-->
<!--This mode can be used to generate prefixed XPath for humans-->
<xsl:template match="node() | @*" mode="schematron-get-full-path-2">
<xsl:for-each select="ancestor-or-self::*">
<xsl:text>/</xsl:text>
<xsl:value-of select="name(.)"/>
<xsl:if test="preceding-sibling::*[name(.)=name(current())]">
<xsl:text>[</xsl:text>
<xsl:value-of select="count(preceding-sibling::*[name(.)=name(current())])+1"/>
<xsl:text>]</xsl:text>
</xsl:if>
</xsl:for-each>
<xsl:if test="not(self::*)">
<xsl:text/>/@<xsl:value-of select="name(.)"/>
</xsl:if>
</xsl:template>
<!--MODE: SCHEMATRON-FULL-PATH-3-->
<!--This mode can be used to generate prefixed XPath for humans
(Top-level element has index)-->
<xsl:template match="node() | @*" mode="schematron-get-full-path-3">
<xsl:for-each select="ancestor-or-self::*">
<xsl:text>/</xsl:text>
<xsl:value-of select="name(.)"/>
<xsl:if test="parent::*">
<xsl:text>[</xsl:text>
<xsl:value-of select="count(preceding-sibling::*[name(.)=name(current())])+1"/>
<xsl:text>]</xsl:text>
</xsl:if>
</xsl:for-each>
<xsl:if test="not(self::*)">
<xsl:text/>/@<xsl:value-of select="name(.)"/>
</xsl:if>
</xsl:template>
<!--MODE: GENERATE-ID-FROM-PATH -->
<xsl:template match="/" mode="generate-id-from-path"/>
<xsl:template match="text()" mode="generate-id-from-path">
<xsl:apply-templates select="parent::*" mode="generate-id-from-path"/>
<xsl:value-of select="concat('.text-', 1+count(preceding-sibling::text()), '-')"/>
</xsl:template>
<xsl:template match="comment()" mode="generate-id-from-path">
<xsl:apply-templates select="parent::*" mode="generate-id-from-path"/>
<xsl:value-of select="concat('.comment-', 1+count(preceding-sibling::comment()), '-')"/>
</xsl:template>
<xsl:template match="processing-instruction()" mode="generate-id-from-path">
<xsl:apply-templates select="parent::*" mode="generate-id-from-path"/>
<xsl:value-of select="concat('.processing-instruction-', 1+count(preceding-sibling::processing-instruction()), '-')"/>
</xsl:template>
<xsl:template match="@*" mode="generate-id-from-path">
<xsl:apply-templates select="parent::*" mode="generate-id-from-path"/>
<xsl:value-of select="concat('.@', name())"/>
</xsl:template>
<xsl:template match="*" mode="generate-id-from-path" priority="-0.5">
<xsl:apply-templates select="parent::*" mode="generate-id-from-path"/>
<xsl:text>.</xsl:text>
<xsl:value-of select="concat('.',name(),'-',1+count(preceding-sibling::*[name()=name(current())]),'-')"/>
</xsl:template>
<!--MODE: GENERATE-ID-2 -->
<xsl:template match="/" mode="generate-id-2">U</xsl:template>
<xsl:template match="*" mode="generate-id-2" priority="2">
<xsl:text>U</xsl:text>
<xsl:number level="multiple" count="*"/>
</xsl:template>
<xsl:template match="node()" mode="generate-id-2">
<xsl:text>U.</xsl:text>
<xsl:number level="multiple" count="*"/>
<xsl:text>n</xsl:text>
<xsl:number count="node()"/>
</xsl:template>
<xsl:template match="@*" mode="generate-id-2">
<xsl:text>U.</xsl:text>
<xsl:number level="multiple" count="*"/>
<xsl:text>_</xsl:text>
<xsl:value-of select="string-length(local-name(.))"/>
<xsl:text>_</xsl:text>
<xsl:value-of select="translate(name(),':','.')"/>
</xsl:template>
<!--Strip characters-->
<xsl:template match="text()" priority="-1"/>
<!--SCHEMA SETUP-->
<xsl:template match="/">
<svrl:schematron-output xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
title="Schematron validation"
schemaVersion="">
<xsl:comment>
<xsl:value-of select="$archiveDirParameter"/> ย 
<xsl:value-of select="$archiveNameParameter"/> ย 
<xsl:value-of select="$fileNameParameter"/> ย 
<xsl:value-of select="$fileDirParameter"/>
</xsl:comment>
<svrl:ns-prefix-in-attribute-values uri="http://icao.int/iwxxm/3.0" prefix="iwxxm"/>
<svrl:ns-prefix-in-attribute-values uri="http://www.w3.org/1999/xlink" prefix="xlink"/>
<svrl:ns-prefix-in-attribute-values uri="http://www.w3.org/2001/XMLSchema-instance" prefix="xsi"/>
<svrl:ns-prefix-in-attribute-values uri="http://www.opengis.net/gml/3.2" prefix="gml"/>
<svrl:ns-prefix-in-attribute-values uri="http://www.aixm.aero/schema/5.1.1" prefix="aixm"/>
<svrl:ns-prefix-in-attribute-values uri="http://def.wmo.int/collect/2014" prefix="collect"/>
<svrl:ns-prefix-in-attribute-values uri="http://def.wmo.int/metce/2013" prefix="metce"/>
<svrl:ns-prefix-in-attribute-values uri="http://www.w3.org/1999/02/22-rdf-syntax-ns#" prefix="rdf"/>
<svrl:ns-prefix-in-attribute-values uri="http://www.w3.org/2004/02/skos/core#" prefix="skos"/>
<svrl:ns-prefix-in-attribute-values uri="http://purl.org/linked-data/registry#" prefix="reg"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">COLLECT.MB1</xsl:attribute>
<xsl:attribute name="name">COLLECT.MB1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M11"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.AerodromeRunwayState-1</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.AerodromeRunwayState-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M12"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.AerodromeRunwayState-3</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.AerodromeRunwayState-3</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M13"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.AerodromeRunwayState-2</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.AerodromeRunwayState-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M14"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.AerodromeRunwayVisualRange-1</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.AerodromeRunwayVisualRange-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M15"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.MeteorologicalAerodromeObservation.recentWeather</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.MeteorologicalAerodromeObservation.recentWeather</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M16"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.MeteorologicalAerodromeObservationReport-1</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.MeteorologicalAerodromeObservationReport-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M17"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.MeteorologicalAerodromeObservationReport-9</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.MeteorologicalAerodromeObservationReport-9</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M18"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.MeteorologicalAerodromeObservationReport-7</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.MeteorologicalAerodromeObservationReport-7</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M19"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.MeteorologicalAerodromeObservationReport-8</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.MeteorologicalAerodromeObservationReport-8</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M20"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.MeteorologicalAerodromeObservationReport-5</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.MeteorologicalAerodromeObservationReport-5</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M21"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.MeteorologicalAerodromeObservationReport-6</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.MeteorologicalAerodromeObservationReport-6</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M22"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.MeteorologicalAerodromeObservationReport-3</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.MeteorologicalAerodromeObservationReport-3</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M23"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.MeteorologicalAerodromeObservationReport-2</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.MeteorologicalAerodromeObservationReport-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M24"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.MeteorologicalAerodromeObservationReport-4</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.MeteorologicalAerodromeObservationReport-4</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M25"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.AerodromeSeaCondition.seaState</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.AerodromeSeaCondition.seaState</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M26"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.AerodromeRunwayState.depositType</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.AerodromeRunwayState.depositType</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M27"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.AerodromeSeaState-1</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.AerodromeSeaState-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M28"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.AerodromeSeaState-2</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.AerodromeSeaState-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M29"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.AerodromeSeaState-3</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.AerodromeSeaState-3</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M30"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.AerodromeSeaState-4</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.AerodromeSeaState-4</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M31"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.AerodromeWindShear-1</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.AerodromeWindShear-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M32"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.AerodromeWindShear-2</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.AerodromeWindShear-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M33"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.AerodromeRunwayState.contamination</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.AerodromeRunwayState.contamination</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M34"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.MeteorologicalAerodromeTrendForecast-1</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.MeteorologicalAerodromeTrendForecast-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M35"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.MeteorologicalAerodromeTrendForecast-2</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.MeteorologicalAerodromeTrendForecast-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M36"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.MeteorologicalAerodromeObservation-3</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.MeteorologicalAerodromeObservation-3</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M37"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.MeteorologicalAerodromeObservation-4</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.MeteorologicalAerodromeObservation-4</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M38"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.MeteorologicalAerodromeObservation-1</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.MeteorologicalAerodromeObservation-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M39"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.MeteorologicalAerodromeObservation-2</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.MeteorologicalAerodromeObservation-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M40"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.MeteorologicalAerodromeObservation-5</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.MeteorologicalAerodromeObservation-5</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M41"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.AerodromeCloud-2</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.AerodromeCloud-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M42"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.AerodromeCloud-1</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.AerodromeCloud-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M43"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.AerodromeCloud-3</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.AerodromeCloud-3</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M44"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.AerodromeSurfaceWind-3</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.AerodromeSurfaceWind-3</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M45"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.AerodromeSurfaceWind-4</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.AerodromeSurfaceWind-4</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M46"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.AerodromeSurfaceWind-2</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.AerodromeSurfaceWind-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M47"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.AerodromeSurfaceWind-5</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.AerodromeSurfaceWind-5</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M48"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.AerodromeSurfaceWind-1</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.AerodromeSurfaceWind-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M49"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.AerodromeSurfaceWind-6</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.AerodromeSurfaceWind-6</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M50"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.AerodromeSurfaceWind-7</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.AerodromeSurfaceWind-7</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M51"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.MeteorologicalAerodromeObservation.presentWeather</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.MeteorologicalAerodromeObservation.presentWeather</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M52"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.AerodromeRunwayState.estimatedSurfaceFrictionOrBrakingAction</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.AerodromeRunwayState.estimatedSurfaceFrictionOrBrakingAction</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M53"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.AerodromeHorizontalVisibility-1</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.AerodromeHorizontalVisibility-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M54"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.AerodromeHorizontalVisibility-2</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.AerodromeHorizontalVisibility-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M55"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.AerodromeHorizontalVisibility-3</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.AerodromeHorizontalVisibility-3</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M56"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TAF.MeteorologicalAerodromeForecast-1</xsl:attribute>
<xsl:attribute name="name">TAF.MeteorologicalAerodromeForecast-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M57"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TAF.MeteorologicalAerodromeForecast-2</xsl:attribute>
<xsl:attribute name="name">TAF.MeteorologicalAerodromeForecast-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M58"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TAF.AerodromeAirTemperatureForecast-1</xsl:attribute>
<xsl:attribute name="name">TAF.AerodromeAirTemperatureForecast-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M59"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TAF.AerodromeAirTemperatureForecast-2</xsl:attribute>
<xsl:attribute name="name">TAF.AerodromeAirTemperatureForecast-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M60"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TAF.TAF-9</xsl:attribute>
<xsl:attribute name="name">TAF.TAF-9</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M61"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TAF.TAF-6</xsl:attribute>
<xsl:attribute name="name">TAF.TAF-6</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M62"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TAF.TAF-7</xsl:attribute>
<xsl:attribute name="name">TAF.TAF-7</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M63"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TAF.TAF-8</xsl:attribute>
<xsl:attribute name="name">TAF.TAF-8</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M64"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TAF.TAF-4</xsl:attribute>
<xsl:attribute name="name">TAF.TAF-4</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M65"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TAF.TAF-3</xsl:attribute>
<xsl:attribute name="name">TAF.TAF-3</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M66"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TAF.TAF-2</xsl:attribute>
<xsl:attribute name="name">TAF.TAF-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M67"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TAF.TAF-5</xsl:attribute>
<xsl:attribute name="name">TAF.TAF-5</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M68"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TAF.TAF-1</xsl:attribute>
<xsl:attribute name="name">TAF.TAF-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M69"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">SIGMET.SIGMETPosition-1</xsl:attribute>
<xsl:attribute name="name">SIGMET.SIGMETPosition-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M70"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">SIGMET.SIGMET-1</xsl:attribute>
<xsl:attribute name="name">SIGMET.SIGMET-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M71"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">SIGMET.SIGMET-5</xsl:attribute>
<xsl:attribute name="name">SIGMET.SIGMET-5</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M72"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">SIGMET.SIGMET-12</xsl:attribute>
<xsl:attribute name="name">SIGMET.SIGMET-12</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M73"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">SIGMET.SIGMET-7</xsl:attribute>
<xsl:attribute name="name">SIGMET.SIGMET-7</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M74"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">SIGMET.SIGMET-6</xsl:attribute>
<xsl:attribute name="name">SIGMET.SIGMET-6</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M75"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">SIGMET.SIGMET-8</xsl:attribute>
<xsl:attribute name="name">SIGMET.SIGMET-8</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M76"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">SIGMET.SIGMET-9</xsl:attribute>
<xsl:attribute name="name">SIGMET.SIGMET-9</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M77"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">SIGMET.SIGMET-10</xsl:attribute>
<xsl:attribute name="name">SIGMET.SIGMET-10</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M78"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">SIGMET.SIGMET-11</xsl:attribute>
<xsl:attribute name="name">SIGMET.SIGMET-11</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M79"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">SIGMET.SIGMET-3</xsl:attribute>
<xsl:attribute name="name">SIGMET.SIGMET-3</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M80"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">SIGMET.SIGMET-2</xsl:attribute>
<xsl:attribute name="name">SIGMET.SIGMET-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M81"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">SIGMET.SIGMET-4</xsl:attribute>
<xsl:attribute name="name">SIGMET.SIGMET-4</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M82"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">SIGMET.SIGMET.phenomenon</xsl:attribute>
<xsl:attribute name="name">SIGMET.SIGMET.phenomenon</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M83"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">SIGMET.SIGMETEvolvingCondition-4</xsl:attribute>
<xsl:attribute name="name">SIGMET.SIGMETEvolvingCondition-4</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M84"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">SIGMET.SIGMETEvolvingCondition-2</xsl:attribute>
<xsl:attribute name="name">SIGMET.SIGMETEvolvingCondition-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M85"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">SIGMET.SIGMETEvolvingCondition-1</xsl:attribute>
<xsl:attribute name="name">SIGMET.SIGMETEvolvingCondition-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M86"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">SIGMET.SIGMETEvolvingCondition-3</xsl:attribute>
<xsl:attribute name="name">SIGMET.SIGMETEvolvingCondition-3</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M87"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TropicalCycloneSIGMET.TropicalCycloneSIGMET-1</xsl:attribute>
<xsl:attribute name="name">TropicalCycloneSIGMET.TropicalCycloneSIGMET-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M88"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TropicalCycloneSIGMET.TropicalCycloneSIGMET-2</xsl:attribute>
<xsl:attribute name="name">TropicalCycloneSIGMET.TropicalCycloneSIGMET-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M89"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TropicalCycloneSIGMET.TropicalCycloneSIGMET-3</xsl:attribute>
<xsl:attribute name="name">TropicalCycloneSIGMET.TropicalCycloneSIGMET-3</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M90"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TropicalCycloneSIGMET.TropicalCycloneSIGMET-4</xsl:attribute>
<xsl:attribute name="name">TropicalCycloneSIGMET.TropicalCycloneSIGMET-4</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M91"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">VolcanicAshSIGMET.VolcanicAshSIGMET-6</xsl:attribute>
<xsl:attribute name="name">VolcanicAshSIGMET.VolcanicAshSIGMET-6</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M92"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">VolcanicAshSIGMET.VolcanicAshSIGMET-7</xsl:attribute>
<xsl:attribute name="name">VolcanicAshSIGMET.VolcanicAshSIGMET-7</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M93"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">VolcanicAshSIGMET.VolcanicAshSIGMET-1</xsl:attribute>
<xsl:attribute name="name">VolcanicAshSIGMET.VolcanicAshSIGMET-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M94"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">VolcanicAshSIGMET.VolcanicAshSIGMET-2</xsl:attribute>
<xsl:attribute name="name">VolcanicAshSIGMET.VolcanicAshSIGMET-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M95"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">VolcanicAshSIGMET.VolcanicAshSIGMET-3</xsl:attribute>
<xsl:attribute name="name">VolcanicAshSIGMET.VolcanicAshSIGMET-3</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M96"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">VolcanicAshSIGMET.VolcanicAshSIGMET-4</xsl:attribute>
<xsl:attribute name="name">VolcanicAshSIGMET.VolcanicAshSIGMET-4</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M97"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">VolcanicAshSIGMET.VolcanicAshSIGMET-5</xsl:attribute>
<xsl:attribute name="name">VolcanicAshSIGMET.VolcanicAshSIGMET-5</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M98"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TropicalCycloneSIGMET.TropicalCycloneSIGMETEvolvoingConditionCollection-1</xsl:attribute>
<xsl:attribute name="name">TropicalCycloneSIGMET.TropicalCycloneSIGMETEvolvoingConditionCollection-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M99"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TropicalCycloneSIGMET.TropicalCycloneSIGMETPositionCollection-1</xsl:attribute>
<xsl:attribute name="name">TropicalCycloneSIGMET.TropicalCycloneSIGMETPositionCollection-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M100"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">AIRMET.AIRMETEvolvingCondition.surfaceVisibilityCause</xsl:attribute>
<xsl:attribute name="name">AIRMET.AIRMETEvolvingCondition.surfaceVisibilityCause</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M101"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">AIRMET.AIRMETEvolvingCondition-1</xsl:attribute>
<xsl:attribute name="name">AIRMET.AIRMETEvolvingCondition-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M102"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">AIRMET.AIRMETEvolvingCondition-2</xsl:attribute>
<xsl:attribute name="name">AIRMET.AIRMETEvolvingCondition-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M103"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">AIRMET.AIRMETEvolvingCondition-9</xsl:attribute>
<xsl:attribute name="name">AIRMET.AIRMETEvolvingCondition-9</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M104"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">AIRMET.AIRMETEvolvingCondition-3</xsl:attribute>
<xsl:attribute name="name">AIRMET.AIRMETEvolvingCondition-3</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M105"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">AIRMET.AIRMETEvolvingCondition-4</xsl:attribute>
<xsl:attribute name="name">AIRMET.AIRMETEvolvingCondition-4</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M106"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">AIRMET.AIRMETEvolvingCondition-5</xsl:attribute>
<xsl:attribute name="name">AIRMET.AIRMETEvolvingCondition-5</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M107"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">AIRMET.AIRMETEvolvingCondition-8</xsl:attribute>
<xsl:attribute name="name">AIRMET.AIRMETEvolvingCondition-8</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M108"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">AIRMET.AIRMETEvolvingCondition-7</xsl:attribute>
<xsl:attribute name="name">AIRMET.AIRMETEvolvingCondition-7</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M109"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">AIRMET.AIRMETEvolvingCondition-6</xsl:attribute>
<xsl:attribute name="name">AIRMET.AIRMETEvolvingCondition-6</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M110"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">AIRMET.AIRMET.phenomenon</xsl:attribute>
<xsl:attribute name="name">AIRMET.AIRMET.phenomenon</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M111"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">AIRMET.AIRMET-1</xsl:attribute>
<xsl:attribute name="name">AIRMET.AIRMET-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M112"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">AIRMET.AIRMET-5</xsl:attribute>
<xsl:attribute name="name">AIRMET.AIRMET-5</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M113"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">AIRMET.AIRMET-6</xsl:attribute>
<xsl:attribute name="name">AIRMET.AIRMET-6</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M114"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">AIRMET.AIRMET-3</xsl:attribute>
<xsl:attribute name="name">AIRMET.AIRMET-3</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M115"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">AIRMET.AIRMET-2</xsl:attribute>
<xsl:attribute name="name">AIRMET.AIRMET-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M116"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">AIRMET.AIRMET-4</xsl:attribute>
<xsl:attribute name="name">AIRMET.AIRMET-4</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M117"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TropicalCycloneAdvisory.TropicalCycloneForecastConditions-2</xsl:attribute>
<xsl:attribute name="name">TropicalCycloneAdvisory.TropicalCycloneForecastConditions-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M118"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TropicalCycloneAdvisory.TropicalCycloneForecastConditions-1</xsl:attribute>
<xsl:attribute name="name">TropicalCycloneAdvisory.TropicalCycloneForecastConditions-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M119"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TropicalCycloneAdvisory.TropicalCycloneAdvisory-1</xsl:attribute>
<xsl:attribute name="name">TropicalCycloneAdvisory.TropicalCycloneAdvisory-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M120"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TropicalCycloneAdvisory.TropicalCycloneAdvisory-2</xsl:attribute>
<xsl:attribute name="name">TropicalCycloneAdvisory.TropicalCycloneAdvisory-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M121"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TropicalCycloneAdvisory.TropicalCycloneObservedConditions-1</xsl:attribute>
<xsl:attribute name="name">TropicalCycloneAdvisory.TropicalCycloneObservedConditions-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M122"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TropicalCycloneAdvisory.TropicalCycloneObservedConditions-6</xsl:attribute>
<xsl:attribute name="name">TropicalCycloneAdvisory.TropicalCycloneObservedConditions-6</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M123"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TropicalCycloneAdvisory.TropicalCycloneObservedConditions-5</xsl:attribute>
<xsl:attribute name="name">TropicalCycloneAdvisory.TropicalCycloneObservedConditions-5</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M124"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TropicalCycloneAdvisory.TropicalCycloneObservedConditions-2</xsl:attribute>
<xsl:attribute name="name">TropicalCycloneAdvisory.TropicalCycloneObservedConditions-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M125"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TropicalCycloneAdvisory.TropicalCycloneObservedConditions-3</xsl:attribute>
<xsl:attribute name="name">TropicalCycloneAdvisory.TropicalCycloneObservedConditions-3</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M126"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TropicalCycloneAdvisory.TropicalCycloneObservedConditions-4</xsl:attribute>
<xsl:attribute name="name">TropicalCycloneAdvisory.TropicalCycloneObservedConditions-4</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M127"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">VolcanicAshAdvisory.VolcanicAshCloudObservedOrEstimated-3</xsl:attribute>
<xsl:attribute name="name">VolcanicAshAdvisory.VolcanicAshCloudObservedOrEstimated-3</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M128"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">VolcanicAshAdvisory.VolcanicAshCloud-1</xsl:attribute>
<xsl:attribute name="name">VolcanicAshAdvisory.VolcanicAshCloud-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M129"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">VolcanicAshAdvisory.VolcanicAshCloud-2</xsl:attribute>
<xsl:attribute name="name">VolcanicAshAdvisory.VolcanicAshCloud-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M130"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">VolcanicAshAdvisory.VolcanicAshAdvisory.colourCode</xsl:attribute>
<xsl:attribute name="name">VolcanicAshAdvisory.VolcanicAshAdvisory.colourCode</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M131"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">VolcanicAshAdvisory.VolcanicAshAdvisory-3</xsl:attribute>
<xsl:attribute name="name">VolcanicAshAdvisory.VolcanicAshAdvisory-3</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M132"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">VolcanicAshAdvisory.VolcanicAshAdvisory-1</xsl:attribute>
<xsl:attribute name="name">VolcanicAshAdvisory.VolcanicAshAdvisory-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M133"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">VolcanicAshAdvisory.VolcanicAshAdvisory-2</xsl:attribute>
<xsl:attribute name="name">VolcanicAshAdvisory.VolcanicAshAdvisory-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M134"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">VolcanicAshAdvisory.WindConditions-3</xsl:attribute>
<xsl:attribute name="name">VolcanicAshAdvisory.WindConditions-3</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M135"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">VolcanicAshAdvisory.WindConditions-1</xsl:attribute>
<xsl:attribute name="name">VolcanicAshAdvisory.WindConditions-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M136"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">VolcanicAshAdvisory.WindConditions-2</xsl:attribute>
<xsl:attribute name="name">VolcanicAshAdvisory.WindConditions-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M137"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">VolcanicAshAdvisory.VolcanicAshForecastConditions-2</xsl:attribute>
<xsl:attribute name="name">VolcanicAshAdvisory.VolcanicAshForecastConditions-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M138"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">VolcanicAshAdvisory.VolcanicAshForecastConditions-1</xsl:attribute>
<xsl:attribute name="name">VolcanicAshAdvisory.VolcanicAshForecastConditions-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M139"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">VolcanicAshAdvisory.VolcanicAshCloudForecast-1</xsl:attribute>
<xsl:attribute name="name">VolcanicAshAdvisory.VolcanicAshCloudForecast-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M140"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">VolcanicAshAdvisory.VolcanicAshObservedOrEstimatedConditions-1</xsl:attribute>
<xsl:attribute name="name">VolcanicAshAdvisory.VolcanicAshObservedOrEstimatedConditions-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M141"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">VolcanicAshAdvisory.VolcanicAshObservedOrEstimatedConditions-2</xsl:attribute>
<xsl:attribute name="name">VolcanicAshAdvisory.VolcanicAshObservedOrEstimatedConditions-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M142"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">SpaceWeatherAdvisory.SpaceWeatherRegion.locationIndicator</xsl:attribute>
<xsl:attribute name="name">SpaceWeatherAdvisory.SpaceWeatherRegion.locationIndicator</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M143"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">SpaceWeatherAdvisory.SpaceWeatherAdvisory.phenomenon</xsl:attribute>
<xsl:attribute name="name">SpaceWeatherAdvisory.SpaceWeatherAdvisory.phenomenon</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M144"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">SpaceWeatherAdvisory.SpaceWeatherRegion-1</xsl:attribute>
<xsl:attribute name="name">SpaceWeatherAdvisory.SpaceWeatherRegion-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M145"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">SpaceWeatherAdvisory.SpaceWeatherAdvisory-1</xsl:attribute>
<xsl:attribute name="name">SpaceWeatherAdvisory.SpaceWeatherAdvisory-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M146"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">SpaceWeatherAdvisory.SpaceWeatherAdvisory-2</xsl:attribute>
<xsl:attribute name="name">SpaceWeatherAdvisory.SpaceWeatherAdvisory-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M147"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">METAR_SPECI.MeteorologicalAerodromeTrendForecast.weather</xsl:attribute>
<xsl:attribute name="name">METAR_SPECI.MeteorologicalAerodromeTrendForecast.weather</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M148"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">TAF.MeteorologicalAerodromeForecast.weather</xsl:attribute>
<xsl:attribute name="name">TAF.MeteorologicalAerodromeForecast.weather</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M149"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">Common.CloudLayer.cloudType</xsl:attribute>
<xsl:attribute name="name">Common.CloudLayer.cloudType</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M150"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">Common.CloudLayer.amount</xsl:attribute>
<xsl:attribute name="name">Common.CloudLayer.amount</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M151"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">Common.CloudLayer-1</xsl:attribute>
<xsl:attribute name="name">Common.CloudLayer-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M152"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">Common.Report-5</xsl:attribute>
<xsl:attribute name="name">Common.Report-5</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M153"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">Common.Report-4</xsl:attribute>
<xsl:attribute name="name">Common.Report-4</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M154"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">Common.Report-1</xsl:attribute>
<xsl:attribute name="name">Common.Report-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M155"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">Common.Report-2</xsl:attribute>
<xsl:attribute name="name">Common.Report-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M156"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">Common.Report-3</xsl:attribute>
<xsl:attribute name="name">Common.Report-3</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M157"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">Common.AerodromeCloudForecast-2</xsl:attribute>
<xsl:attribute name="name">Common.AerodromeCloudForecast-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M158"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">Common.AerodromeCloudForecast-1</xsl:attribute>
<xsl:attribute name="name">Common.AerodromeCloudForecast-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M159"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">Common.AerodromeCloudForecast-3</xsl:attribute>
<xsl:attribute name="name">Common.AerodromeCloudForecast-3</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M160"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">Common.AerodromeSurfaceWindForecast-1</xsl:attribute>
<xsl:attribute name="name">Common.AerodromeSurfaceWindForecast-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M161"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">Common.AerodromeSurfaceWindTrendForecast-1</xsl:attribute>
<xsl:attribute name="name">Common.AerodromeSurfaceWindTrendForecast-1</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M162"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">Common.AerodromeSurfaceWindTrendForecast-2</xsl:attribute>
<xsl:attribute name="name">Common.AerodromeSurfaceWindTrendForecast-2</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M163"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">Common.AerodromeSurfaceWindTrendForecast-3</xsl:attribute>
<xsl:attribute name="name">Common.AerodromeSurfaceWindTrendForecast-3</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M164"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">IWXXM.nilReasonCheck</xsl:attribute>
<xsl:attribute name="name">IWXXM.nilReasonCheck</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M165"/>
<svrl:active-pattern>
<xsl:attribute name="document">
<xsl:value-of select="document-uri(/)"/>
</xsl:attribute>
<xsl:attribute name="id">IWXXM.ExtensionAlwaysLast</xsl:attribute>
<xsl:attribute name="name">IWXXM.ExtensionAlwaysLast</xsl:attribute>
<xsl:apply-templates/>
</svrl:active-pattern>
<xsl:apply-templates select="/" mode="M166"/>
</svrl:schematron-output>
</xsl:template>
<!--SCHEMATRON PATTERNS-->
<svrl:text xmlns:svrl="http://purl.oclc.org/dsdl/svrl">Schematron validation</svrl:text>
<!--PATTERN COLLECT.MB1-->
<!--RULE -->
<xsl:template match="//collect:MeteorologicalBulletin" priority="1000" mode="M11">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//collect:MeteorologicalBulletin"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="count(distinct-values(for $item in //collect:meteorologicalInformation/child::node() return(node-name($item))))eq 1"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="count(distinct-values(for $item in //collect:meteorologicalInformation/child::node() return(node-name($item))))eq 1">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>COLLECT.MB1: All meteorologicalInformation instances in MeteorologicalBulletin must be of the same type</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M11"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M11"/>
<xsl:template match="@*|node()" priority="-2" mode="M11">
<xsl:apply-templates select="*" mode="M11"/>
</xsl:template>
<!--PATTERN METAR_SPECI.AerodromeRunwayState-1-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeRunwayState" priority="1000" mode="M12">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeRunwayState"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( @allRunways = 'true' ) then( empty(iwxxm:runway) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( @allRunways = 'true' ) then( empty(iwxxm:runway) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.AerodromeRunwayState-1: When all runways are being reported upon, no specific runway should be reported</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M12"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M12"/>
<xsl:template match="@*|node()" priority="-2" mode="M12">
<xsl:apply-templates select="*" mode="M12"/>
</xsl:template>
<!--PATTERN METAR_SPECI.AerodromeRunwayState-3-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeRunwayState" priority="1000" mode="M13">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeRunwayState"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( @cleared = 'true' ) then( empty(iwxxm:depositType) and empty(iwxxm:contamination) and empty(iwxxm:depthOfDeposit) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( @cleared = 'true' ) then( empty(iwxxm:depositType) and empty(iwxxm:contamination) and empty(iwxxm:depthOfDeposit) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.AerodromeRunwayState-3: If contaminations have ceased to exist, then iwxxm:depositType, iwxxm:contamination and iwxxm:depthOfDeposit should be empty</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M13"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M13"/>
<xsl:template match="@*|node()" priority="-2" mode="M13">
<xsl:apply-templates select="*" mode="M13"/>
</xsl:template>
<!--PATTERN METAR_SPECI.AerodromeRunwayState-2-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeRunwayState" priority="1000" mode="M14">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeRunwayState"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="(if( exists(iwxxm:runway) ) then( empty(@allRunways) or (@allRunways = 'false') ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="(if( exists(iwxxm:runway) ) then( empty(@allRunways) or (@allRunways = 'false') ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.AerodromeRunwayState-2: When a single Runway is reported upon, the allRunways flag should be missing or false</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M14"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M14"/>
<xsl:template match="@*|node()" priority="-2" mode="M14">
<xsl:apply-templates select="*" mode="M14"/>
</xsl:template>
<!--PATTERN METAR_SPECI.AerodromeRunwayVisualRange-1-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeRunwayVisualRange"
priority="1000"
mode="M15">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeRunwayVisualRange"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:meanRVR) and not(iwxxm:meanRVR/@xsi:nil = 'true') ) then( iwxxm:meanRVR/@uom = 'm' ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:meanRVR) and not(iwxxm:meanRVR/@xsi:nil = 'true') ) then( iwxxm:meanRVR/@uom = 'm' ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.AerodromeRunwayVisualRange-1: meanRVR shall be reported in metres (m)</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M15"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M15"/>
<xsl:template match="@*|node()" priority="-2" mode="M15">
<xsl:apply-templates select="*" mode="M15"/>
</xsl:template>
<!--PATTERN METAR_SPECI.MeteorologicalAerodromeObservation.recentWeather-->
<!--RULE -->
<xsl:template match="//*[contains(name(),'MeteorologicalAerodromeObservation')]/iwxxm:recentWeather"
priority="1000"
mode="M16">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//*[contains(name(),'MeteorologicalAerodromeObservation')]/iwxxm:recentWeather"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="@xlink:href = document('codes.wmo.int-49-2-AerodromeRecentWeather.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="@xlink:href = document('codes.wmo.int-49-2-AerodromeRecentWeather.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>MeteorologicalAerodromeObservation iwxxm:recentWeather elements should be a member of http://codes.wmo.int/49-2/AerodromeRecentWeather</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M16"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M16"/>
<xsl:template match="@*|node()" priority="-2" mode="M16">
<xsl:apply-templates select="*" mode="M16"/>
</xsl:template>
<!--PATTERN METAR_SPECI.MeteorologicalAerodromeObservationReport-1-->
<!--RULE -->
<xsl:template match="//iwxxm:METAR|//iwxxm:SPECI" priority="1000" mode="M17">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:METAR|//iwxxm:SPECI"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( @reportStatus != 'AMENDMENT' )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( @reportStatus != 'AMENDMENT' )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.MeteorologicalAerodromeObservationReport-1: A METAR or SPECI report cannot have a reportStatus of 'AMENDMENT'</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M17"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M17"/>
<xsl:template match="@*|node()" priority="-2" mode="M17">
<xsl:apply-templates select="*" mode="M17"/>
</xsl:template>
<!--PATTERN METAR_SPECI.MeteorologicalAerodromeObservationReport-9-->
<!--RULE -->
<xsl:template match="//iwxxm:METAR|//iwxxm:SPECI" priority="1000" mode="M18">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:METAR|//iwxxm:SPECI"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:aerodrome//aixm:ARP) ) then( empty(index-of(iwxxm:aerodrome//aixm:ARP//gml:pos/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:aerodrome//aixm:ARP) ) then( empty(index-of(iwxxm:aerodrome//aixm:ARP//gml:pos/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.MeteorologicalAerodromeObservationReport-9: If a geometry is defined for iwxxm:aerodrome//aixm:AIP with the provision of attribute srsName, attribute srsDimension must equal to 2 and attribute axisLabels must be non-empty</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M18"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M18"/>
<xsl:template match="@*|node()" priority="-2" mode="M18">
<xsl:apply-templates select="*" mode="M18"/>
</xsl:template>
<!--PATTERN METAR_SPECI.MeteorologicalAerodromeObservationReport-7-->
<!--RULE -->
<xsl:template match="//iwxxm:METAR|//iwxxm:SPECI" priority="1000" mode="M19">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:METAR|//iwxxm:SPECI"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( empty(iwxxm:observation//iwxxm:cloud//iwxxm:layer//iwxxm:amount/*) and ends-with(iwxxm:observation//iwxxm:cloud//iwxxm:layer//iwxxm:amount/@nilReason, 'notDetectedByAutoSystem') ) then( @automatedStation = 'true' ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( empty(iwxxm:observation//iwxxm:cloud//iwxxm:layer//iwxxm:amount/*) and ends-with(iwxxm:observation//iwxxm:cloud//iwxxm:layer//iwxxm:amount/@nilReason, 'notDetectedByAutoSystem') ) then( @automatedStation = 'true' ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.MeteorologicalAerodromeObservationReport-7: When cloud amount is not detected by an automated station, this report must be an automated station report</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M19"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M19"/>
<xsl:template match="@*|node()" priority="-2" mode="M19">
<xsl:apply-templates select="*" mode="M19"/>
</xsl:template>
<!--PATTERN METAR_SPECI.MeteorologicalAerodromeObservationReport-8-->
<!--RULE -->
<xsl:template match="//iwxxm:METAR|//iwxxm:SPECI" priority="1000" mode="M20">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:METAR|//iwxxm:SPECI"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( empty(iwxxm:observation//iwxxm:cloud//iwxxm:layer//iwxxm:base/*) and ends-with(iwxxm:observation//iwxxm:cloud//iwxxm:layer//iwxxm:base/@nilReason, 'notDetectedByAutoSystem') ) then( @automatedStation = 'true' ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( empty(iwxxm:observation//iwxxm:cloud//iwxxm:layer//iwxxm:base/*) and ends-with(iwxxm:observation//iwxxm:cloud//iwxxm:layer//iwxxm:base/@nilReason, 'notDetectedByAutoSystem') ) then( @automatedStation = 'true' ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.MeteorologicalAerodromeObservationReport-8: When cloud base is not detected by an automated station, this report must be an automated station report</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M20"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M20"/>
<xsl:template match="@*|node()" priority="-2" mode="M20">
<xsl:apply-templates select="*" mode="M20"/>
</xsl:template>
<!--PATTERN METAR_SPECI.MeteorologicalAerodromeObservationReport-5-->
<!--RULE -->
<xsl:template match="//iwxxm:METAR|//iwxxm:SPECI" priority="1000" mode="M21">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:METAR|//iwxxm:SPECI"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( empty(iwxxm:observation//iwxxm:cloud/*) and ends-with(iwxxm:observation//iwxxm:cloud/@nilReason, 'notDetectedByAutoSystem') ) then( @automatedStation = 'true' ) else( true() ))"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( empty(iwxxm:observation//iwxxm:cloud/*) and ends-with(iwxxm:observation//iwxxm:cloud/@nilReason, 'notDetectedByAutoSystem') ) then( @automatedStation = 'true' ) else( true() ))">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.MeteorologicalAerodromeObservationReport-5: When no clouds are detected by an automated station, this report must be an automated station report</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M21"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M21"/>
<xsl:template match="@*|node()" priority="-2" mode="M21">
<xsl:apply-templates select="*" mode="M21"/>
</xsl:template>
<!--PATTERN METAR_SPECI.MeteorologicalAerodromeObservationReport-6-->
<!--RULE -->
<xsl:template match="//iwxxm:METAR|//iwxxm:SPECI" priority="1000" mode="M22">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:METAR|//iwxxm:SPECI"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( empty(iwxxm:observation//iwxxm:cloud//iwxxm:layer/*) and ends-with(iwxxm:observation//iwxxm:cloud//iwxxm:layer/@nilReason, 'notDetectedByAutoSystem') ) then( @automatedStation = 'true' ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( empty(iwxxm:observation//iwxxm:cloud//iwxxm:layer/*) and ends-with(iwxxm:observation//iwxxm:cloud//iwxxm:layer/@nilReason, 'notDetectedByAutoSystem') ) then( @automatedStation = 'true' ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.MeteorologicalAerodromeObservationReport-6: When both cloud amount and base are not detected by an automated station, this report must be an automated station report</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M22"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M22"/>
<xsl:template match="@*|node()" priority="-2" mode="M22">
<xsl:apply-templates select="*" mode="M22"/>
</xsl:template>
<!--PATTERN METAR_SPECI.MeteorologicalAerodromeObservationReport-3-->
<!--RULE -->
<xsl:template match="//iwxxm:METAR|//iwxxm:SPECI" priority="1000" mode="M23">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:METAR|//iwxxm:SPECI"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( (empty(iwxxm:observation/*) and iwxxm:observation/@nilReason = 'http://codes.wmo.int/common/nil/missing') and string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:aerodrome) and exists(iwxxm:observationTime) and empty(iwxxm:trendForecast) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( (empty(iwxxm:observation/*) and iwxxm:observation/@nilReason = 'http://codes.wmo.int/common/nil/missing') and string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:aerodrome) and exists(iwxxm:observationTime) and empty(iwxxm:trendForecast) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.MeteorologicalAerodromeObservationReport-3: A 'Nil' report should have appropriately filled elements including Iwxxm:issueTime, iwxxm:aerodrome, iwxxm:observationTime, iwxxm:observation (empty with nilReason) and iwxxm:trendForecast (missing)</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M23"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M23"/>
<xsl:template match="@*|node()" priority="-2" mode="M23">
<xsl:apply-templates select="*" mode="M23"/>
</xsl:template>
<!--PATTERN METAR_SPECI.MeteorologicalAerodromeObservationReport-2-->
<!--RULE -->
<xsl:template match="//iwxxm:METAR|//iwxxm:SPECI" priority="1000" mode="M24">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:METAR|//iwxxm:SPECI"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( string-length(@translationFailedTAC) gt 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:aerodrome) and exists(iwxxm:observationTime) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( string-length(@translationFailedTAC) gt 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:aerodrome) and exists(iwxxm:observationTime) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.MeteorologicalAerodromeObservationReport-2: A report that failed translation should have as a minimum appropriately filled elements including Iwxxm:issueTime, iwxxm:aerodrome and iwxxm:observationTime</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M24"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M24"/>
<xsl:template match="@*|node()" priority="-2" mode="M24">
<xsl:apply-templates select="*" mode="M24"/>
</xsl:template>
<!--PATTERN METAR_SPECI.MeteorologicalAerodromeObservationReport-4-->
<!--RULE -->
<xsl:template match="//iwxxm:METAR|//iwxxm:SPECI" priority="1000" mode="M25">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:METAR|//iwxxm:SPECI"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:aerodrome) and exists(iwxxm:observationTime) and exists(iwxxm:observation) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:aerodrome) and exists(iwxxm:observationTime) and exists(iwxxm:observation) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.MeteorologicalAerodromeObservationReport-4: An ordinary report should have appropriately filled elements including Iwxxm:issueTime, iwxxm:aerodrome, iwxxm:observationTime and iwxxm:observation</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M25"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M25"/>
<xsl:template match="@*|node()" priority="-2" mode="M25">
<xsl:apply-templates select="*" mode="M25"/>
</xsl:template>
<!--PATTERN METAR_SPECI.AerodromeSeaCondition.seaState-->
<!--RULE -->
<xsl:template match="//*[contains(name(),'AerodromeSeaCondition')]/iwxxm:seaState"
priority="1000"
mode="M26">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//*[contains(name(),'AerodromeSeaCondition')]/iwxxm:seaState"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="@xlink:href = document('codes.wmo.int-bufr4-codeflag-0-22-061.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="@xlink:href = document('codes.wmo.int-bufr4-codeflag-0-22-061.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>AerodromeSeaCondition iwxxm:seaState elements should be a member of http://codes.wmo.int/bufr4/codeflag/0-22-061</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M26"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M26"/>
<xsl:template match="@*|node()" priority="-2" mode="M26">
<xsl:apply-templates select="*" mode="M26"/>
</xsl:template>
<!--PATTERN METAR_SPECI.AerodromeRunwayState.depositType-->
<!--RULE -->
<xsl:template match="//*[contains(name(),'AerodromeRunwayState')]/iwxxm:depositType"
priority="1000"
mode="M27">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//*[contains(name(),'AerodromeRunwayState')]/iwxxm:depositType"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="@xlink:href = document('codes.wmo.int-bufr4-codeflag-0-20-086.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="@xlink:href = document('codes.wmo.int-bufr4-codeflag-0-20-086.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>AerodromeRunwayState iwxxm:depositType elements should be a member of http://codes.wmo.int/bufr4/codeflag/0-20-086</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M27"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M27"/>
<xsl:template match="@*|node()" priority="-2" mode="M27">
<xsl:apply-templates select="*" mode="M27"/>
</xsl:template>
<!--PATTERN METAR_SPECI.AerodromeSeaState-1-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeSeaCondition" priority="1000" mode="M28">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeSeaCondition"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:seaState) ) then( empty(iwxxm:significantWaveHeight) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:seaState) ) then( empty(iwxxm:significantWaveHeight) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.AerodromeSeaState-1: If the sea state is set, significantWaveHeight is not reported</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M28"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M28"/>
<xsl:template match="@*|node()" priority="-2" mode="M28">
<xsl:apply-templates select="*" mode="M28"/>
</xsl:template>
<!--PATTERN METAR_SPECI.AerodromeSeaState-2-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeSeaCondition" priority="1000" mode="M29">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeSeaCondition"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:significantWaveHeight) ) then( empty(iwxxm:seaState) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:significantWaveHeight) ) then( empty(iwxxm:seaState) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.AerodromeSeaState-2: If significantWaveHeight is reported, seaState should not be set</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M29"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M29"/>
<xsl:template match="@*|node()" priority="-2" mode="M29">
<xsl:apply-templates select="*" mode="M29"/>
</xsl:template>
<!--PATTERN METAR_SPECI.AerodromeSeaState-3-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeSeaCondition" priority="1000" mode="M30">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeSeaCondition"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:seaSurfaceTemperature) and not(iwxxm:seaSurfaceTemperature/@xsi:nil = 'true') ) then( iwxxm:seaSurfaceTemperature/@uom = 'Cel' ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:seaSurfaceTemperature) and not(iwxxm:seaSurfaceTemperature/@xsi:nil = 'true') ) then( iwxxm:seaSurfaceTemperature/@uom = 'Cel' ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.AerodromeSeaState-3: seaSurfaceTemperature shall be reported in degrees Celsius (Cel)</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M30"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M30"/>
<xsl:template match="@*|node()" priority="-2" mode="M30">
<xsl:apply-templates select="*" mode="M30"/>
</xsl:template>
<!--PATTERN METAR_SPECI.AerodromeSeaState-4-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeSeaCondition" priority="1000" mode="M31">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeSeaCondition"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:significantWaveHeight) and not(iwxxm:significantWaveHeight/@xsi:nil = 'true') ) then( iwxxm:significantWaveHeight/@uom = 'm' ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:significantWaveHeight) and not(iwxxm:significantWaveHeight/@xsi:nil = 'true') ) then( iwxxm:significantWaveHeight/@uom = 'm' ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.AerodromeSeaState-4: significantWaveHeight shall be reported in metres (m)</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M31"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M31"/>
<xsl:template match="@*|node()" priority="-2" mode="M31">
<xsl:apply-templates select="*" mode="M31"/>
</xsl:template>
<!--PATTERN METAR_SPECI.AerodromeWindShear-1-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeWindShear" priority="1000" mode="M32">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeWindShear"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="(if( @allRunways = 'true' ) then( empty(iwxxm:runway) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="(if( @allRunways = 'true' ) then( empty(iwxxm:runway) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.AerodromeWindShear-1: When all runways are affected by wind shear, no specific runways should be reported</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M32"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M32"/>
<xsl:template match="@*|node()" priority="-2" mode="M32">
<xsl:apply-templates select="*" mode="M32"/>
</xsl:template>
<!--PATTERN METAR_SPECI.AerodromeWindShear-2-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeWindShear" priority="1000" mode="M33">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeWindShear"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:runway) ) then( empty(@allRunways) or (@allRunways = 'false') ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:runway) ) then( empty(@allRunways) or (@allRunways = 'false') ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.AerodromeWindShear-2: When a single Runway is reported upon, the allRunways flag should be missing or false</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M33"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M33"/>
<xsl:template match="@*|node()" priority="-2" mode="M33">
<xsl:apply-templates select="*" mode="M33"/>
</xsl:template>
<!--PATTERN METAR_SPECI.AerodromeRunwayState.contamination-->
<!--RULE -->
<xsl:template match="//*[contains(name(),'AerodromeRunwayState')]/iwxxm:contamination"
priority="1000"
mode="M34">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//*[contains(name(),'AerodromeRunwayState')]/iwxxm:contamination"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="@xlink:href = document('codes.wmo.int-bufr4-codeflag-0-20-087.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="@xlink:href = document('codes.wmo.int-bufr4-codeflag-0-20-087.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>AerodromeRunwayState iwxxm:contamination elements should be a member of http://codes.wmo.int/bufr4/codeflag/0-20-087</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M34"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M34"/>
<xsl:template match="@*|node()" priority="-2" mode="M34">
<xsl:apply-templates select="*" mode="M34"/>
</xsl:template>
<!--PATTERN METAR_SPECI.MeteorologicalAerodromeTrendForecast-1-->
<!--RULE -->
<xsl:template match="//iwxxm:MeteorologicalAerodromeTrendForecast"
priority="1000"
mode="M35">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:MeteorologicalAerodromeTrendForecast"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( @cloudAndVisibilityOK = 'true' ) then( empty(iwxxm:cloud) and empty(iwxxm:weather) and empty(iwxxm:prevailingVisibility) and empty(iwxxm:prevailingVisibilityOperator) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( @cloudAndVisibilityOK = 'true' ) then( empty(iwxxm:cloud) and empty(iwxxm:weather) and empty(iwxxm:prevailingVisibility) and empty(iwxxm:prevailingVisibilityOperator) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.MeteorologicalAerodromeTrendForecast-1: When cloudAndVisibilityOK is true cloud, weather, prevailingVisibility and prevailingVisibilityOperator should be missing</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M35"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M35"/>
<xsl:template match="@*|node()" priority="-2" mode="M35">
<xsl:apply-templates select="*" mode="M35"/>
</xsl:template>
<!--PATTERN METAR_SPECI.MeteorologicalAerodromeTrendForecast-2-->
<!--RULE -->
<xsl:template match="//iwxxm:MeteorologicalAerodromeTrendForecast"
priority="1000"
mode="M36">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:MeteorologicalAerodromeTrendForecast"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:prevailingVisibility) and not(iwxxm:prevailingVisibility/@xsi:nil = 'true') ) then( iwxxm:prevailingVisibility/@uom = 'm' ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:prevailingVisibility) and not(iwxxm:prevailingVisibility/@xsi:nil = 'true') ) then( iwxxm:prevailingVisibility/@uom = 'm' ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.MeteorologicalAerodromeTrendForecast-2: prevailingVisibility shall be reported in metres (m)</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M36"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M36"/>
<xsl:template match="@*|node()" priority="-2" mode="M36">
<xsl:apply-templates select="*" mode="M36"/>
</xsl:template>
<!--PATTERN METAR_SPECI.MeteorologicalAerodromeObservation-3-->
<!--RULE -->
<xsl:template match="//iwxxm:MeteorologicalAerodromeObservation"
priority="1000"
mode="M37">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:MeteorologicalAerodromeObservation"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:airTemperature) and not(iwxxm:airTemperature/@xsi:nil = 'true') ) then( iwxxm:airTemperature/@uom = 'Cel' ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:airTemperature) and not(iwxxm:airTemperature/@xsi:nil = 'true') ) then( iwxxm:airTemperature/@uom = 'Cel' ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.MeteorologicalAerodromeObservation-3: airTemperature shall be reported in degrees Celsius (Cel)</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M37"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M37"/>
<xsl:template match="@*|node()" priority="-2" mode="M37">
<xsl:apply-templates select="*" mode="M37"/>
</xsl:template>
<!--PATTERN METAR_SPECI.MeteorologicalAerodromeObservation-4-->
<!--RULE -->
<xsl:template match="//iwxxm:MeteorologicalAerodromeObservation"
priority="1000"
mode="M38">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:MeteorologicalAerodromeObservation"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:dewpointTemperature) and not(iwxxm:dewpointTemperature/@xsi:nil = 'true') ) then( iwxxm:dewpointTemperature/@uom = 'Cel' ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:dewpointTemperature) and not(iwxxm:dewpointTemperature/@xsi:nil = 'true') ) then( iwxxm:dewpointTemperature/@uom = 'Cel' ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.MeteorologicalAerodromeObservation-4: dewpointTemperature shall be reported in degrees Celsius (Cel)</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M38"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M38"/>
<xsl:template match="@*|node()" priority="-2" mode="M38">
<xsl:apply-templates select="*" mode="M38"/>
</xsl:template>
<!--PATTERN METAR_SPECI.MeteorologicalAerodromeObservation-1-->
<!--RULE -->
<xsl:template match="//iwxxm:MeteorologicalAerodromeObservation"
priority="1000"
mode="M39">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:MeteorologicalAerodromeObservation"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( @cloudAndVisibilityOK = 'true' ) then( empty(iwxxm:visibility) and empty(iwxxm:rvr) and empty(iwxxm:presentWeather) and empty(iwxxm:cloud) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( @cloudAndVisibilityOK = 'true' ) then( empty(iwxxm:visibility) and empty(iwxxm:rvr) and empty(iwxxm:presentWeather) and empty(iwxxm:cloud) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.MeteorologicalAerodromeObservation-1: When cloudAndVisibilityOK is true, visibility, rvr, presentWeather and cloud should be missing</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M39"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M39"/>
<xsl:template match="@*|node()" priority="-2" mode="M39">
<xsl:apply-templates select="*" mode="M39"/>
</xsl:template>
<!--PATTERN METAR_SPECI.MeteorologicalAerodromeObservation-2-->
<!--RULE -->
<xsl:template match="//iwxxm:MeteorologicalAerodromeObservation"
priority="1000"
mode="M40">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:MeteorologicalAerodromeObservation"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:visibility) and (iwxxm:visibility//iwxxm:prevailingVisibility/number(text()) lt 1500) and (iwxxm:visibility//iwxxm:prevailingVisibility/@uom = 'm') ) then( exists(iwxxm:rvr) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:visibility) and (iwxxm:visibility//iwxxm:prevailingVisibility/number(text()) lt 1500) and (iwxxm:visibility//iwxxm:prevailingVisibility/@uom = 'm') ) then( exists(iwxxm:rvr) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.MeteorologicalAerodromeObservation-2: RVR should always be included if prevailing visibility is below 1500 meters,</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M40"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M40"/>
<xsl:template match="@*|node()" priority="-2" mode="M40">
<xsl:apply-templates select="*" mode="M40"/>
</xsl:template>
<!--PATTERN METAR_SPECI.MeteorologicalAerodromeObservation-5-->
<!--RULE -->
<xsl:template match="//iwxxm:MeteorologicalAerodromeObservation"
priority="1000"
mode="M41">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:MeteorologicalAerodromeObservation"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:qnh) and not(iwxxm:qnh/@xsi:nil = 'true') ) then( iwxxm:qnh/@uom = 'hPa' ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:qnh) and not(iwxxm:qnh/@xsi:nil = 'true') ) then( iwxxm:qnh/@uom = 'hPa' ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.MeteorologicalAerodromeObservation-5: qnh shall be reported in hectopascals (hPa)</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M41"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M41"/>
<xsl:template match="@*|node()" priority="-2" mode="M41">
<xsl:apply-templates select="*" mode="M41"/>
</xsl:template>
<!--PATTERN METAR_SPECI.AerodromeCloud-2-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeCloud" priority="1000" mode="M42">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeCloud"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:layer) ) then( empty(iwxxm:verticalVisibility) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:layer) ) then( empty(iwxxm:verticalVisibility) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.AerodromeCloud-2: When cloud layers are reported vertical visibility should be empty</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M42"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M42"/>
<xsl:template match="@*|node()" priority="-2" mode="M42">
<xsl:apply-templates select="*" mode="M42"/>
</xsl:template>
<!--PATTERN METAR_SPECI.AerodromeCloud-1-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeCloud" priority="1000" mode="M43">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeCloud"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:verticalVisibility) ) then( empty(iwxxm:layer) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:verticalVisibility) ) then( empty(iwxxm:layer) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.AerodromeCloud-1: When vertical visibility is reported cloud layers should be empty</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M43"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M43"/>
<xsl:template match="@*|node()" priority="-2" mode="M43">
<xsl:apply-templates select="*" mode="M43"/>
</xsl:template>
<!--PATTERN METAR_SPECI.AerodromeCloud-3-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeCloud" priority="1000" mode="M44">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeCloud"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:verticalVisibility) and not(iwxxm:verticalVisibility/@xsi:nil = 'true') ) then( (iwxxm:verticalVisibility/@uom = 'm') or (iwxxm:verticalVisibility/@uom = '[ft_i]') ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:verticalVisibility) and not(iwxxm:verticalVisibility/@xsi:nil = 'true') ) then( (iwxxm:verticalVisibility/@uom = 'm') or (iwxxm:verticalVisibility/@uom = '[ft_i]') ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.AerodromeCloud-3: verticalVisibility shall be reported in metres (m) or feet ([ft_i])</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M44"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M44"/>
<xsl:template match="@*|node()" priority="-2" mode="M44">
<xsl:apply-templates select="*" mode="M44"/>
</xsl:template>
<!--PATTERN METAR_SPECI.AerodromeSurfaceWind-3-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeSurfaceWind" priority="1000" mode="M45">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeSurfaceWind"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:extremeClockwiseWindDirection) and not(iwxxm:extremeClockwiseWindDirection/@xsi:nil = 'true') ) then( iwxxm:extremeClockwiseWindDirection/@uom = 'deg') else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:extremeClockwiseWindDirection) and not(iwxxm:extremeClockwiseWindDirection/@xsi:nil = 'true') ) then( iwxxm:extremeClockwiseWindDirection/@uom = 'deg') else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.AerodromeSurfaceWind-3: extremeClockwiseWindDirection shall be reported in degrees (deg)</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M45"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M45"/>
<xsl:template match="@*|node()" priority="-2" mode="M45">
<xsl:apply-templates select="*" mode="M45"/>
</xsl:template>
<!--PATTERN METAR_SPECI.AerodromeSurfaceWind-4-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeSurfaceWind" priority="1000" mode="M46">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeSurfaceWind"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:extremeCounterClockwiseWindDirection) and not(iwxxm:extremeCounterClockwiseWindDirection/@xsi:nil = 'true') ) then( iwxxm:extremeCounterClockwiseWindDirection/@uom = 'deg' ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:extremeCounterClockwiseWindDirection) and not(iwxxm:extremeCounterClockwiseWindDirection/@xsi:nil = 'true') ) then( iwxxm:extremeCounterClockwiseWindDirection/@uom = 'deg' ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.AerodromeSurfaceWind-4: extremeCounterClockwiseWindDirection shall be reported in degrees (deg)</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M46"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M46"/>
<xsl:template match="@*|node()" priority="-2" mode="M46">
<xsl:apply-templates select="*" mode="M46"/>
</xsl:template>
<!--PATTERN METAR_SPECI.AerodromeSurfaceWind-2-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeSurfaceWind" priority="1000" mode="M47">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeSurfaceWind"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="(if( @variableDirection = 'true' ) then( empty(iwxxm:meanWindDirection) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="(if( @variableDirection = 'true' ) then( empty(iwxxm:meanWindDirection) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.AerodromeSurfaceWind-2: Wind direction is not reported when variable winds are indicated</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M47"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M47"/>
<xsl:template match="@*|node()" priority="-2" mode="M47">
<xsl:apply-templates select="*" mode="M47"/>
</xsl:template>
<!--PATTERN METAR_SPECI.AerodromeSurfaceWind-5-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeSurfaceWind" priority="1000" mode="M48">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeSurfaceWind"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:meanWindDirection) and not(iwxxm:meanWindDirection/@xsi:nil = 'true') ) then( iwxxm:meanWindDirection/@uom = 'deg' ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:meanWindDirection) and not(iwxxm:meanWindDirection/@xsi:nil = 'true') ) then( iwxxm:meanWindDirection/@uom = 'deg' ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.AerodromeSurfaceWind-5: meanWindDirection shall be reported in degrees (deg)</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M48"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M48"/>
<xsl:template match="@*|node()" priority="-2" mode="M48">
<xsl:apply-templates select="*" mode="M48"/>
</xsl:template>
<!--PATTERN METAR_SPECI.AerodromeSurfaceWind-1-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeSurfaceWind" priority="1000" mode="M49">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeSurfaceWind"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="(if( exists(iwxxm:meanWindDirection/@uom) and exists(iwxxm:extremeClockwiseWindDirection/@uom) and exists(iwxxm:extremeCounterClockwiseWindDirection/@uom) ) then( (iwxxm:meanWindDirection/@uom = iwxxm:extremeClockwiseWindDirection/@uom) and (iwxxm:meanWindDirection/@uom = iwxxm:extremeCounterClockwiseWindDirection/@uom) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="(if( exists(iwxxm:meanWindDirection/@uom) and exists(iwxxm:extremeClockwiseWindDirection/@uom) and exists(iwxxm:extremeCounterClockwiseWindDirection/@uom) ) then( (iwxxm:meanWindDirection/@uom = iwxxm:extremeClockwiseWindDirection/@uom) and (iwxxm:meanWindDirection/@uom = iwxxm:extremeCounterClockwiseWindDirection/@uom) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.AerodromeSurfaceWind-1: All wind UOMs must be the same</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M49"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M49"/>
<xsl:template match="@*|node()" priority="-2" mode="M49">
<xsl:apply-templates select="*" mode="M49"/>
</xsl:template>
<!--PATTERN METAR_SPECI.AerodromeSurfaceWind-6-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeSurfaceWind" priority="1000" mode="M50">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeSurfaceWind"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:meanWindSpeed) and not(iwxxm:meanWindSpeed/@xsi:nil = 'true') ) then( (iwxxm:meanWindSpeed/@uom = 'm/s') or (iwxxm:meanWindSpeed/@uom = '[kn_i]') ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:meanWindSpeed) and not(iwxxm:meanWindSpeed/@xsi:nil = 'true') ) then( (iwxxm:meanWindSpeed/@uom = 'm/s') or (iwxxm:meanWindSpeed/@uom = '[kn_i]') ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.AerodromeSurfaceWind-6: meanWindSpeed shall be reported in metres per second (m/s) or knots ([kn_i])</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M50"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M50"/>
<xsl:template match="@*|node()" priority="-2" mode="M50">
<xsl:apply-templates select="*" mode="M50"/>
</xsl:template>
<!--PATTERN METAR_SPECI.AerodromeSurfaceWind-7-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeSurfaceWind" priority="1000" mode="M51">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeSurfaceWind"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:windGustSpeed) and not(iwxxm:windGustSpeed/@xsi:nil = 'true') ) then( (iwxxm:windGustSpeed/@uom = 'm/s') or (iwxxm:windGustSpeed/@uom = '[kn_i]') ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:windGustSpeed) and not(iwxxm:windGustSpeed/@xsi:nil = 'true') ) then( (iwxxm:windGustSpeed/@uom = 'm/s') or (iwxxm:windGustSpeed/@uom = '[kn_i]') ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.AerodromeSurfaceWind-7: windGustSpeed shall be reported in metres per second (m/s) or knots ([kn_i])</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M51"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M51"/>
<xsl:template match="@*|node()" priority="-2" mode="M51">
<xsl:apply-templates select="*" mode="M51"/>
</xsl:template>
<!--PATTERN METAR_SPECI.MeteorologicalAerodromeObservation.presentWeather-->
<!--RULE -->
<xsl:template match="//*[contains(name(),'MeteorologicalAerodromeObservation')]/iwxxm:presentWeather"
priority="1000"
mode="M52">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//*[contains(name(),'MeteorologicalAerodromeObservation')]/iwxxm:presentWeather"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="@xlink:href = document('codes.wmo.int-49-2-AerodromePresentOrForecastWeather.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="@xlink:href = document('codes.wmo.int-49-2-AerodromePresentOrForecastWeather.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>MeteorologicalAerodromeObservation iwxxm:presentWeather elements should be a member of http://codes.wmo.int/49-2/AerodromePresentOrForecastWeather</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M52"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M52"/>
<xsl:template match="@*|node()" priority="-2" mode="M52">
<xsl:apply-templates select="*" mode="M52"/>
</xsl:template>
<!--PATTERN METAR_SPECI.AerodromeRunwayState.estimatedSurfaceFrictionOrBrakingAction-->
<!--RULE -->
<xsl:template match="//*[contains(name(),'AerodromeRunwayState')]/iwxxm:estimatedSurfaceFrictionOrBrakingAction"
priority="1000"
mode="M53">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//*[contains(name(),'AerodromeRunwayState')]/iwxxm:estimatedSurfaceFrictionOrBrakingAction"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="@xlink:href = document('codes.wmo.int-bufr4-codeflag-0-20-089.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="@xlink:href = document('codes.wmo.int-bufr4-codeflag-0-20-089.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>AerodromeRunwayState iwxxm:estimatedSurfaceFrictionOrBrakingAction elements should be a member of http://codes.wmo.int/bufr4/codeflag/0-20-089</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M53"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M53"/>
<xsl:template match="@*|node()" priority="-2" mode="M53">
<xsl:apply-templates select="*" mode="M53"/>
</xsl:template>
<!--PATTERN METAR_SPECI.AerodromeHorizontalVisibility-1-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeHorizontalVisibility"
priority="1000"
mode="M54">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeHorizontalVisibility"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:minimumVisibility) and not(iwxxm:minimumVisibility/@xsi:nil = 'true') ) then( iwxxm:minimumVisibility/@uom = 'm' ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:minimumVisibility) and not(iwxxm:minimumVisibility/@xsi:nil = 'true') ) then( iwxxm:minimumVisibility/@uom = 'm' ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.AerodromeHorizontalVisibility-1: minimumVisibility shall be reported in metres (m)</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M54"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M54"/>
<xsl:template match="@*|node()" priority="-2" mode="M54">
<xsl:apply-templates select="*" mode="M54"/>
</xsl:template>
<!--PATTERN METAR_SPECI.AerodromeHorizontalVisibility-2-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeHorizontalVisibility"
priority="1000"
mode="M55">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeHorizontalVisibility"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:minimumVisibilityDirection) and not(iwxxm:minimumVisibilityDirection/@xsi:nil = 'true') ) then( iwxxm:minimumVisibilityDirection/@uom = 'deg') else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:minimumVisibilityDirection) and not(iwxxm:minimumVisibilityDirection/@xsi:nil = 'true') ) then( iwxxm:minimumVisibilityDirection/@uom = 'deg') else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.AerodromeHorizontalVisibility-2: minimumVisibilityDirection shall be reported in degrees (deg)</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M55"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M55"/>
<xsl:template match="@*|node()" priority="-2" mode="M55">
<xsl:apply-templates select="*" mode="M55"/>
</xsl:template>
<!--PATTERN METAR_SPECI.AerodromeHorizontalVisibility-3-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeHorizontalVisibility"
priority="1000"
mode="M56">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeHorizontalVisibility"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:prevailingVisibility) and not(iwxxm:prevailingVisibility/@xsi:nil = 'true') ) then( iwxxm:prevailingVisibility/@uom = 'm') else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:prevailingVisibility) and not(iwxxm:prevailingVisibility/@xsi:nil = 'true') ) then( iwxxm:prevailingVisibility/@uom = 'm') else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>METAR_SPECI.AerodromeHorizontalVisibility-3: prevailingVisibility shall be reported in metres (m)</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M56"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M56"/>
<xsl:template match="@*|node()" priority="-2" mode="M56">
<xsl:apply-templates select="*" mode="M56"/>
</xsl:template>
<!--PATTERN TAF.MeteorologicalAerodromeForecast-1-->
<!--RULE -->
<xsl:template match="//iwxxm:MeteorologicalAerodromeForecast"
priority="1000"
mode="M57">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:MeteorologicalAerodromeForecast"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( @cloudAndVisibilityOK = 'true' ) then( empty(iwxxm:prevailingVisibility) and empty(iwxxm:rvr) and empty(iwxxm:weather) and empty(iwxxm:cloud) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( @cloudAndVisibilityOK = 'true' ) then( empty(iwxxm:prevailingVisibility) and empty(iwxxm:rvr) and empty(iwxxm:weather) and empty(iwxxm:cloud) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TAF.MeteorologicalAerodromeForecast-1: When cloudAndVisibilityOK is true, prevailingVisibility, rvr, weather and cloud should be missing</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M57"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M57"/>
<xsl:template match="@*|node()" priority="-2" mode="M57">
<xsl:apply-templates select="*" mode="M57"/>
</xsl:template>
<!--PATTERN TAF.MeteorologicalAerodromeForecast-2-->
<!--RULE -->
<xsl:template match="//iwxxm:MeteorologicalAerodromeForecast"
priority="1000"
mode="M58">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:MeteorologicalAerodromeForecast"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:prevailingVisibility) and not(iwxxm:prevailingVisibility/@xsi:nil = 'true') ) then( iwxxm:prevailingVisibility/@uom = 'm' ) else true())"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:prevailingVisibility) and not(iwxxm:prevailingVisibility/@xsi:nil = 'true') ) then( iwxxm:prevailingVisibility/@uom = 'm' ) else true())">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TAF.MeteorologicalAerodromeForecast-2: prevailingVisibility shall be reported in metres (m)</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M58"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M58"/>
<xsl:template match="@*|node()" priority="-2" mode="M58">
<xsl:apply-templates select="*" mode="M58"/>
</xsl:template>
<!--PATTERN TAF.AerodromeAirTemperatureForecast-1-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeAirTemperatureForecast"
priority="1000"
mode="M59">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeAirTemperatureForecast"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:maximumTemperature) and not(iwxxm:maximumTemperature/@xsi:nil = 'true') ) then( iwxxm:maximumTemperature/@uom = 'Cel' ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:maximumTemperature) and not(iwxxm:maximumTemperature/@xsi:nil = 'true') ) then( iwxxm:maximumTemperature/@uom = 'Cel' ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TAF.AerodromeAirTemperatureForecast-1: maximumTemperature shall be reported in degrees Celsius (Cel)</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M59"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M59"/>
<xsl:template match="@*|node()" priority="-2" mode="M59">
<xsl:apply-templates select="*" mode="M59"/>
</xsl:template>
<!--PATTERN TAF.AerodromeAirTemperatureForecast-2-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeAirTemperatureForecast"
priority="1000"
mode="M60">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeAirTemperatureForecast"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:minimumTemperature) and not(iwxxm:minimumTemperature/@xsi:nil = 'true') ) then( iwxxm:minimumTemperature/@uom = 'Cel' ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:minimumTemperature) and not(iwxxm:minimumTemperature/@xsi:nil = 'true') ) then( iwxxm:minimumTemperature/@uom = 'Cel' ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TAF.AerodromeAirTemperatureForecast-2: minimumTemperature shall be reported in degrees Celsius (Cel)</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M60"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M60"/>
<xsl:template match="@*|node()" priority="-2" mode="M60">
<xsl:apply-templates select="*" mode="M60"/>
</xsl:template>
<!--PATTERN TAF.TAF-9-->
<!--RULE -->
<xsl:template match="//iwxxm:TAF" priority="1000" mode="M61">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="//iwxxm:TAF"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:aerodrome//aixm:ARP) ) then( empty(index-of(iwxxm:aerodrome//aixm:ARP//gml:pos/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:aerodrome//aixm:ARP) ) then( empty(index-of(iwxxm:aerodrome//aixm:ARP//gml:pos/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TAF.TAF-9: If a geometry is defined for iwxxm:aerodrome//aixm:AIP with the provision of attribute srsName, attribute srsDimension must equal to 2 and attribute axisLabels must be non-empty</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M61"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M61"/>
<xsl:template match="@*|node()" priority="-2" mode="M61">
<xsl:apply-templates select="*" mode="M61"/>
</xsl:template>
<!--PATTERN TAF.TAF-6-->
<!--RULE -->
<xsl:template match="//iwxxm:TAF" priority="1000" mode="M62">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="//iwxxm:TAF"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:baseForecast/*) ) then( empty(iwxxm:baseForecast/iwxxm:MeteorologicalAerodromeForecast/@changeIndicator) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:baseForecast/*) ) then( empty(iwxxm:baseForecast/iwxxm:MeteorologicalAerodromeForecast/@changeIndicator) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TAF.TAF-6: A non-empty iwxxm:baseForecast should not have @changeIndicator</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M62"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M62"/>
<xsl:template match="@*|node()" priority="-2" mode="M62">
<xsl:apply-templates select="*" mode="M62"/>
</xsl:template>
<!--PATTERN TAF.TAF-7-->
<!--RULE -->
<xsl:template match="//iwxxm:TAF" priority="1000" mode="M63">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="//iwxxm:TAF"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:baseForecast/*) ) then( exists(iwxxm:baseForecast/iwxxm:MeteorologicalAerodromeForecast/iwxxm:surfaceWind) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:baseForecast/*) ) then( exists(iwxxm:baseForecast/iwxxm:MeteorologicalAerodromeForecast/iwxxm:surfaceWind) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TAF.TAF-7: in a non-empty iwxxm:baseForecast wxxm:surfaceWind is mandatory</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M63"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M63"/>
<xsl:template match="@*|node()" priority="-2" mode="M63">
<xsl:apply-templates select="*" mode="M63"/>
</xsl:template>
<!--PATTERN TAF.TAF-8-->
<!--RULE -->
<xsl:template match="//iwxxm:TAF" priority="1000" mode="M64">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="//iwxxm:TAF"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:baseForecast/*) and not(iwxxm:baseForecast/iwxxm:MeteorologicalAerodromeForecast/@cloudAndVisibilityOK = 'true') ) then( exists(iwxxm:baseForecast/iwxxm:MeteorologicalAerodromeForecast/iwxxm:prevailingVisibility) and exists(iwxxm:baseForecast/iwxxm:MeteorologicalAerodromeForecast/iwxxm:cloud) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:baseForecast/*) and not(iwxxm:baseForecast/iwxxm:MeteorologicalAerodromeForecast/@cloudAndVisibilityOK = 'true') ) then( exists(iwxxm:baseForecast/iwxxm:MeteorologicalAerodromeForecast/iwxxm:prevailingVisibility) and exists(iwxxm:baseForecast/iwxxm:MeteorologicalAerodromeForecast/iwxxm:cloud) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TAF.TAF-8: In a non-empty iwxxm:baseForecast when @cloudAndVisibilityOK is false iwxxm:prevailingVisibility and iwxxm:cloud are mandatory</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M64"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M64"/>
<xsl:template match="@*|node()" priority="-2" mode="M64">
<xsl:apply-templates select="*" mode="M64"/>
</xsl:template>
<!--PATTERN TAF.TAF-4-->
<!--RULE -->
<xsl:template match="//iwxxm:TAF" priority="1000" mode="M65">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="//iwxxm:TAF"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( @isCancelReport = 'true' and string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:aerodrome) and empty(iwxxm:validPeriod) and exists(iwxxm:cancelledReportValidPeriod) and empty(iwxxm:baseForecast) and empty(iwxxm:changeForecast) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( @isCancelReport = 'true' and string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:aerodrome) and empty(iwxxm:validPeriod) and exists(iwxxm:cancelledReportValidPeriod) and empty(iwxxm:baseForecast) and empty(iwxxm:changeForecast) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TAF.TAF-4: A CANCELLATION report should have the appropriate elements filled including iwxxm:issueTime, iwxxm:aerodrome, iwxxm:cancelledReportValidPeriod. Elements iwxxm:validPeriod, iwxxm:baseForecast and iwxxm:changeForecast are absent</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M65"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M65"/>
<xsl:template match="@*|node()" priority="-2" mode="M65">
<xsl:apply-templates select="*" mode="M65"/>
</xsl:template>
<!--PATTERN TAF.TAF-3-->
<!--RULE -->
<xsl:template match="//iwxxm:TAF" priority="1000" mode="M66">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="//iwxxm:TAF"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( (empty(iwxxm:baseForecast/*) and iwxxm:baseForecast/@nilReason = 'http://codes.wmo.int/common/nil/missing') and string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:aerodrome) and empty(iwxxm:validPeriod) and empty(iwxxm:cancelledReportValidPeriod) and empty(iwxxm:changeForecast) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( (empty(iwxxm:baseForecast/*) and iwxxm:baseForecast/@nilReason = 'http://codes.wmo.int/common/nil/missing') and string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:aerodrome) and empty(iwxxm:validPeriod) and empty(iwxxm:cancelledReportValidPeriod) and empty(iwxxm:changeForecast) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TAF.TAF-3: A 'Nil' report should have appropriately filled elements including iwxxm:issueTime, iwxxm:aerodrome, iwxxm:validPeriod (missing), iwxxm:cancelledReportValidPeriod (missing), iwxxm:baseForecast (empty with nilReason) and iwxxm:changeForecast (missing)</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M66"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M66"/>
<xsl:template match="@*|node()" priority="-2" mode="M66">
<xsl:apply-templates select="*" mode="M66"/>
</xsl:template>
<!--PATTERN TAF.TAF-2-->
<!--RULE -->
<xsl:template match="//iwxxm:TAF" priority="1000" mode="M67">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="//iwxxm:TAF"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( string-length(@translationFailedTAC) gt 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:aerodrome) and exists(iwxxm:validPeriod) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( string-length(@translationFailedTAC) gt 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:aerodrome) and exists(iwxxm:validPeriod) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TAF.TAF-2: A report that failed translation should have as a minimum appropriately filled elements including iwxxm:issueTime, iwxxm:aerodrome and iwxxm:validPeriod</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M67"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M67"/>
<xsl:template match="@*|node()" priority="-2" mode="M67">
<xsl:apply-templates select="*" mode="M67"/>
</xsl:template>
<!--PATTERN TAF.TAF-5-->
<!--RULE -->
<xsl:template match="//iwxxm:TAF" priority="1000" mode="M68">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="//iwxxm:TAF"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( (iwxxm:baseForecast/@nilReason != 'http://codes.wmo.int/common/nil/missing' and (empty(@isCancelReport) or @isCancelReport = 'false')) and string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:aerodrome) and exists(iwxxm:validPeriod) and empty(iwxxm:cancelledReportValidPeriod) and exists(iwxxm:baseForecast) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( (iwxxm:baseForecast/@nilReason != 'http://codes.wmo.int/common/nil/missing' and (empty(@isCancelReport) or @isCancelReport = 'false')) and string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:aerodrome) and exists(iwxxm:validPeriod) and empty(iwxxm:cancelledReportValidPeriod) and exists(iwxxm:baseForecast) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TAF.TAF-5: An ordinary report should have appropriately filled elements including iwxxm:issueTime, iwxxm:aerodrome, iwxxm:validPeriod, iwxxm:cancelledReportValidPeriod (missing) and iwxxm:baseForecast</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M68"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M68"/>
<xsl:template match="@*|node()" priority="-2" mode="M68">
<xsl:apply-templates select="*" mode="M68"/>
</xsl:template>
<!--PATTERN TAF.TAF-1-->
<!--RULE -->
<xsl:template match="//iwxxm:TAF" priority="1000" mode="M69">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="//iwxxm:TAF"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( not((@isNilReport = 'true') and (@isCancelReport = 'true')) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( not((@isNilReport = 'true') and (@isCancelReport = 'true')) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TAF.TAF-1: Attributes isNilReport and isCancelReport cannot be true at the same time</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M69"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M69"/>
<xsl:template match="@*|node()" priority="-2" mode="M69">
<xsl:apply-templates select="*" mode="M69"/>
</xsl:template>
<!--PATTERN SIGMET.SIGMETPosition-1-->
<!--RULE -->
<xsl:template match="//iwxxm:SIGMETPosition" priority="1000" mode="M70">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:SIGMETPosition"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:geometry/*[self::aixm:horizontalProjection or self::aixm:centreline]) ) then( empty(index-of(iwxxm:geometry//*[self::aixm:Surface or self::aixm:Curve]/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:geometry/*[self::aixm:horizontalProjection or self::aixm:centreline]) ) then( empty(index-of(iwxxm:geometry//*[self::aixm:Surface or self::aixm:Curve]/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>SIGMET.SIGMETPosition-1: If a geometry of iwxxm:geometry is defined with the provision of attribute srsName, attribute srsDimension must equal to 2 and attribute axisLabels must be non-empty</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M70"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M70"/>
<xsl:template match="@*|node()" priority="-2" mode="M70">
<xsl:apply-templates select="*" mode="M70"/>
</xsl:template>
<!--PATTERN SIGMET.SIGMET-1-->
<!--RULE -->
<xsl:template match="//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET"
priority="1000"
mode="M71">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( @reportStatus != 'AMENDMENT' and @reportStatus != 'CORRECTION' )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( @reportStatus != 'AMENDMENT' and @reportStatus != 'CORRECTION' )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>SIGMET.SIGMET-1: A SIGMET report cannot have a reportStatus of 'AMENDMENT' or 'CORRECTION'</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M71"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M71"/>
<xsl:template match="@*|node()" priority="-2" mode="M71">
<xsl:apply-templates select="*" mode="M71"/>
</xsl:template>
<!--PATTERN SIGMET.SIGMET-5-->
<!--RULE -->
<xsl:template match="//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET"
priority="1000"
mode="M72">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( string-length(@translationFailedTAC) eq 0 and exists(iwxxm:analysis//iwxxm:phenomenonTime/*) and exists(iwxxm:validPeriod/*) ) then( empty(index-of(for $i in iwxxm:analysis return number(translate($i//iwxxm:phenomenonTime/gml:TimeInstant/gml:timePosition,'-T:Z','')) eq number(translate(iwxxm:validPeriod/gml:TimePeriod/gml:beginPosition,'-T:Z','')),false())) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( string-length(@translationFailedTAC) eq 0 and exists(iwxxm:analysis//iwxxm:phenomenonTime/*) and exists(iwxxm:validPeriod/*) ) then( empty(index-of(for $i in iwxxm:analysis return number(translate($i//iwxxm:phenomenonTime/gml:TimeInstant/gml:timePosition,'-T:Z','')) eq number(translate(iwxxm:validPeriod/gml:TimePeriod/gml:beginPosition,'-T:Z','')),false())) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>SIGMET.SIGMET-5: iwxxm:analysis//iwxxm:phenomenonTime must be equal to iwxxm:validPeriod//gml:beginPosition</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M72"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M72"/>
<xsl:template match="@*|node()" priority="-2" mode="M72">
<xsl:apply-templates select="*" mode="M72"/>
</xsl:template>
<!--PATTERN SIGMET.SIGMET-12-->
<!--RULE -->
<xsl:template match="//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET"
priority="1000"
mode="M73">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:issuingAirTrafficServicesRegion//aixm:geometryComponent) ) then( empty(index-of(iwxxm:issuingAirTrafficServicesRegion//aixm:geometryComponent//*[self::aixm:Surface or self::aixm:Curve]/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:issuingAirTrafficServicesRegion//aixm:geometryComponent) ) then( empty(index-of(iwxxm:issuingAirTrafficServicesRegion//aixm:geometryComponent//*[self::aixm:Surface or self::aixm:Curve]/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>SIGMET.SIGMET-12: If a geometry is defined for iwxxm:issuingAirTrafficServicesRegion//aixm:geometryComponent with the provision of attribute srsName, attribute srsDimension must equal to 2 and attribute axisLabels must be non-empty</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M73"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M73"/>
<xsl:template match="@*|node()" priority="-2" mode="M73">
<xsl:apply-templates select="*" mode="M73"/>
</xsl:template>
<!--PATTERN SIGMET.SIGMET-7-->
<!--RULE -->
<xsl:template match="//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET"
priority="1000"
mode="M74">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( string-length(@translationFailedTAC) eq 0 ) then( (exists(iwxxm:forecastPositionAnalysis) and empty(iwxxm:analysis//iwxxm:directionOfMotion) and empty(iwxxm:analysis//iwxxm:speedOfMotion)) or (empty(iwxxm:forecastPositionAnalysis) and exists(iwxxm:analysis//iwxxm:directionOfMotion)) or (empty(iwxxm:forecastPositionAnalysis) and empty(iwxxm:analysis//iwxxm:directionOfMotion) and empty(iwxxm:analysis//iwxxm:speedOfMotion)) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( string-length(@translationFailedTAC) eq 0 ) then( (exists(iwxxm:forecastPositionAnalysis) and empty(iwxxm:analysis//iwxxm:directionOfMotion) and empty(iwxxm:analysis//iwxxm:speedOfMotion)) or (empty(iwxxm:forecastPositionAnalysis) and exists(iwxxm:analysis//iwxxm:directionOfMotion)) or (empty(iwxxm:forecastPositionAnalysis) and empty(iwxxm:analysis//iwxxm:directionOfMotion) and empty(iwxxm:analysis//iwxxm:speedOfMotion)) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>SIGMET.SIGMET-7: A report cannot have both iwxxm:forecastPositionAnalysis and iwxxm:analysis//iwxxm:directionOfMotion (with or without iwxxm:analysis//iwxxm:speedOfMotion) at the same time</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M74"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M74"/>
<xsl:template match="@*|node()" priority="-2" mode="M74">
<xsl:apply-templates select="*" mode="M74"/>
</xsl:template>
<!--PATTERN SIGMET.SIGMET-6-->
<!--RULE -->
<xsl:template match="//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET"
priority="1000"
mode="M75">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( string-length(@translationFailedTAC) eq 0 and exists(iwxxm:forecastPositionAnalysis//iwxxm:phenomenonTime/*) and exists(iwxxm:validPeriod/*) ) then( empty(index-of(for $i in iwxxm:forecastPositionAnalysis return number(translate($i//iwxxm:phenomenonTime/gml:TimeInstant/gml:timePosition,'-T:Z','')) eq number(translate(iwxxm:validPeriod/gml:TimePeriod/gml:endPosition,'-T:Z','')),false())) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( string-length(@translationFailedTAC) eq 0 and exists(iwxxm:forecastPositionAnalysis//iwxxm:phenomenonTime/*) and exists(iwxxm:validPeriod/*) ) then( empty(index-of(for $i in iwxxm:forecastPositionAnalysis return number(translate($i//iwxxm:phenomenonTime/gml:TimeInstant/gml:timePosition,'-T:Z','')) eq number(translate(iwxxm:validPeriod/gml:TimePeriod/gml:endPosition,'-T:Z','')),false())) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>SIGMET.SIGMET-6: iwxxm:forecastPositionAnalysis//iwxxm:phenomenonTime must be less than or equal to iwxxm:validPeriod//endPosition</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M75"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M75"/>
<xsl:template match="@*|node()" priority="-2" mode="M75">
<xsl:apply-templates select="*" mode="M75"/>
</xsl:template>
<!--PATTERN SIGMET.SIGMET-8-->
<!--RULE -->
<xsl:template match="//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET"
priority="1000"
mode="M76">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( local-name( . ) = 'SIGMET' and exists(iwxxm:analysis/*) ) then( exists(iwxxm:analysis/iwxxm:SIGMETEvolvingConditionCollection) and empty(iwxxm:analysis/*[name() != 'iwxxm:SIGMETEvolvingConditionCollection']) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( local-name( . ) = 'SIGMET' and exists(iwxxm:analysis/*) ) then( exists(iwxxm:analysis/iwxxm:SIGMETEvolvingConditionCollection) and empty(iwxxm:analysis/*[name() != 'iwxxm:SIGMETEvolvingConditionCollection']) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>SIGMET.SIGMET-8: In a SIGMET report the child element of iwxxm:analysis should be SIGMETEvolvingConditionCollection</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M76"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M76"/>
<xsl:template match="@*|node()" priority="-2" mode="M76">
<xsl:apply-templates select="*" mode="M76"/>
</xsl:template>
<!--PATTERN SIGMET.SIGMET-9-->
<!--RULE -->
<xsl:template match="//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET"
priority="1000"
mode="M77">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( local-name( . ) = 'SIGMET' and exists(iwxxm:forecastPositionAnalysis) ) then( exists(iwxxm:forecastPositionAnalysis/iwxxm:SIGMETPositionCollection) and empty(iwxxm:forecastPositionAnalysis/*[name() != 'iwxxm:SIGMETPositionCollection']) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( local-name( . ) = 'SIGMET' and exists(iwxxm:forecastPositionAnalysis) ) then( exists(iwxxm:forecastPositionAnalysis/iwxxm:SIGMETPositionCollection) and empty(iwxxm:forecastPositionAnalysis/*[name() != 'iwxxm:SIGMETPositionCollection']) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>SIGMET.SIGMET-9: In a SIGMET report the child element of iwxxm:forecastPositionAnalysis should be SIGMETPositionCollection</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M77"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M77"/>
<xsl:template match="@*|node()" priority="-2" mode="M77">
<xsl:apply-templates select="*" mode="M77"/>
</xsl:template>
<!--PATTERN SIGMET.SIGMET-10-->
<!--RULE -->
<xsl:template match="//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET"
priority="1000"
mode="M78">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( local-name( . ) = 'SIGMET' and exists(iwxxm:analysis/*) ) then( count(iwxxm:analysis) eq 1 ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( local-name( . ) = 'SIGMET' and exists(iwxxm:analysis/*) ) then( count(iwxxm:analysis) eq 1 ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>SIGMET.SIGMET-10: In a SIGMET report there should be one iwxxm:analysis at most</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M78"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M78"/>
<xsl:template match="@*|node()" priority="-2" mode="M78">
<xsl:apply-templates select="*" mode="M78"/>
</xsl:template>
<!--PATTERN SIGMET.SIGMET-11-->
<!--RULE -->
<xsl:template match="//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET"
priority="1000"
mode="M79">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( local-name( . ) = 'SIGMET' and exists(iwxxm:forecastPositionAnalysis) ) then( count(iwxxm:forecastPositionAnalysis) eq 1 ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( local-name( . ) = 'SIGMET' and exists(iwxxm:forecastPositionAnalysis) ) then( count(iwxxm:forecastPositionAnalysis) eq 1 ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>SIGMET.SIGMET-11: In a SIGMET report there should be one iwxxm:forecastPositionAnalysis at most</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M79"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M79"/>
<xsl:template match="@*|node()" priority="-2" mode="M79">
<xsl:apply-templates select="*" mode="M79"/>
</xsl:template>
<!--PATTERN SIGMET.SIGMET-3-->
<!--RULE -->
<xsl:template match="//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET"
priority="1000"
mode="M80">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( @isCancelReport = 'true' and string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:issuingAirTrafficServicesUnit) and exists(iwxxm:originatingMeteorologicalWatchOffice) and exists(iwxxm:issuingAirTrafficServicesRegion) and exists(iwxxm:sequenceNumber) and exists(iwxxm:validPeriod) and exists(iwxxm:cancelledReportSequenceNumber) and exists(iwxxm:cancelledReportValidPeriod) and empty(iwxxm:phenomenon) and empty(iwxxm:analysis) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( @isCancelReport = 'true' and string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:issuingAirTrafficServicesUnit) and exists(iwxxm:originatingMeteorologicalWatchOffice) and exists(iwxxm:issuingAirTrafficServicesRegion) and exists(iwxxm:sequenceNumber) and exists(iwxxm:validPeriod) and exists(iwxxm:cancelledReportSequenceNumber) and exists(iwxxm:cancelledReportValidPeriod) and empty(iwxxm:phenomenon) and empty(iwxxm:analysis) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>SIGMET.SIGMET-3: A 'CANCELLATION' report should have appropriately filled elements including iwxxm:issueTime, iwxxm:issuingAirTrafficServicesUnit, iwxxm:originatingMeteorologicalWatchOffice, iwxxm:issuingAirTrafficServicesRegion, iwxxm:sequenceNumber, iwxxm:validPeriod, iwxxm:cancelledReportSequenceNumber, iwxxm:cancelledReportValidPeriod. Elements iwxxm:phenomenon and iwxxm:analysis shall be absent</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M80"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M80"/>
<xsl:template match="@*|node()" priority="-2" mode="M80">
<xsl:apply-templates select="*" mode="M80"/>
</xsl:template>
<!--PATTERN SIGMET.SIGMET-2-->
<!--RULE -->
<xsl:template match="//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET"
priority="1000"
mode="M81">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( string-length(@translationFailedTAC) gt 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:issuingAirTrafficServicesUnit) and exists(iwxxm:validPeriod) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( string-length(@translationFailedTAC) gt 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:issuingAirTrafficServicesUnit) and exists(iwxxm:validPeriod) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>SIGMET.SIGMET-2: A report that failed translation should have as a minimum appropriately filled elements including Iwxxm:issueTime, iwxxm:issuingAirTrafficServicesUnit and iwxxm:validPeriod</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M81"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M81"/>
<xsl:template match="@*|node()" priority="-2" mode="M81">
<xsl:apply-templates select="*" mode="M81"/>
</xsl:template>
<!--PATTERN SIGMET.SIGMET-4-->
<!--RULE -->
<xsl:template match="//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET"
priority="1000"
mode="M82">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( (empty(@isCancelReport) or @isCancelReport = 'false') and string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:issuingAirTrafficServicesUnit) and exists(iwxxm:originatingMeteorologicalWatchOffice) and exists(iwxxm:issuingAirTrafficServicesRegion) and exists(iwxxm:sequenceNumber) and exists(iwxxm:validPeriod) and empty(iwxxm:cancelledReportSequenceNumber) and empty(iwxxm:cancelledReportValidPeriod) and exists(iwxxm:phenomenon) and exists(iwxxm:analysis) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( (empty(@isCancelReport) or @isCancelReport = 'false') and string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:issuingAirTrafficServicesUnit) and exists(iwxxm:originatingMeteorologicalWatchOffice) and exists(iwxxm:issuingAirTrafficServicesRegion) and exists(iwxxm:sequenceNumber) and exists(iwxxm:validPeriod) and empty(iwxxm:cancelledReportSequenceNumber) and empty(iwxxm:cancelledReportValidPeriod) and exists(iwxxm:phenomenon) and exists(iwxxm:analysis) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>SIGMET.SIGMET-4: An ordinary report should have appropriately filled elements including Iwxxm:issueTime, iwxxm:issuingAirTrafficServicesUnit, iwxxm:originatingMeteorologicalWatchOffice, iwxxm:issuingAirTrafficServicesRegion, iwxxm:sequenceNumber, iwxxm:validPeriod, iwxxm:phenomenon and iwxxm:analysis. Elements iwxxm:cancelledReportSequenceNumber and iwxxm:cancelledReportValidPeriod shall be absent</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M82"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M82"/>
<xsl:template match="@*|node()" priority="-2" mode="M82">
<xsl:apply-templates select="*" mode="M82"/>
</xsl:template>
<!--PATTERN SIGMET.SIGMET.phenomenon-->
<!--RULE -->
<xsl:template match="//*[contains(name(),'SIGMET')]/iwxxm:phenomenon"
priority="1000"
mode="M83">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//*[contains(name(),'SIGMET')]/iwxxm:phenomenon"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="@xlink:href = document('codes.wmo.int-49-2-SigWxPhenomena.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="@xlink:href = document('codes.wmo.int-49-2-SigWxPhenomena.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>SIGMET iwxxm:phenomenon elements should be a member of http://codes.wmo.int/49-2/SigWxPhenomena</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M83"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M83"/>
<xsl:template match="@*|node()" priority="-2" mode="M83">
<xsl:apply-templates select="*" mode="M83"/>
</xsl:template>
<!--PATTERN SIGMET.SIGMETEvolvingCondition-4-->
<!--RULE -->
<xsl:template match="//iwxxm:SIGMETEvolvingCondition" priority="1000" mode="M84">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:SIGMETEvolvingCondition"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:geometry//*[self::aixm:horizontalProjection or self::aixm:centreline]) ) then( empty(index-of(iwxxm:geometry//*[self::aixm:Surface or self::aixm:Curve]/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:geometry//*[self::aixm:horizontalProjection or self::aixm:centreline]) ) then( empty(index-of(iwxxm:geometry//*[self::aixm:Surface or self::aixm:Curve]/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>SIGMET.SIGMETEvolvingCondition-4: If a geometry of iwxxm:geometry is defined with the provision of attribute srsName, attribute srsDimension must equal to 2 and attribute axisLabels must be non-empty</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M84"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M84"/>
<xsl:template match="@*|node()" priority="-2" mode="M84">
<xsl:apply-templates select="*" mode="M84"/>
</xsl:template>
<!--PATTERN SIGMET.SIGMETEvolvingCondition-2-->
<!--RULE -->
<xsl:template match="//iwxxm:SIGMETEvolvingCondition" priority="1000" mode="M85">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:SIGMETEvolvingCondition"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:directionOfMotion) and not(iwxxm:directionOfMotion/@xsi:nil = 'true') ) then ( iwxxm:directionOfMotion/@uom = 'deg' ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:directionOfMotion) and not(iwxxm:directionOfMotion/@xsi:nil = 'true') ) then ( iwxxm:directionOfMotion/@uom = 'deg' ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>SIGMET.SIGMETEvolvingCondition-2: directionOfMotion shall be reported in degrees (deg)</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M85"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M85"/>
<xsl:template match="@*|node()" priority="-2" mode="M85">
<xsl:apply-templates select="*" mode="M85"/>
</xsl:template>
<!--PATTERN SIGMET.SIGMETEvolvingCondition-1-->
<!--RULE -->
<xsl:template match="//iwxxm:SIGMETEvolvingCondition" priority="1000" mode="M86">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:SIGMETEvolvingCondition"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:speedOfMotion) ) then( exists(iwxxm:directionOfMotion) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:speedOfMotion) ) then( exists(iwxxm:directionOfMotion) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>SIGMET.SIGMETEvolvingCondition-1: iwxxm:speedOfMotion cannot be given without having iwxxm:directionOfMotion</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M86"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M86"/>
<xsl:template match="@*|node()" priority="-2" mode="M86">
<xsl:apply-templates select="*" mode="M86"/>
</xsl:template>
<!--PATTERN SIGMET.SIGMETEvolvingCondition-3-->
<!--RULE -->
<xsl:template match="//iwxxm:SIGMETEvolvingCondition" priority="1000" mode="M87">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:SIGMETEvolvingCondition"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:speedOfMotion) and not(iwxxm:speedOfMotion/@xsi:nil = 'true') ) then ( (iwxxm:speedOfMotion/@uom = 'km/h') or (iwxxm:speedOfMotion/@uom = '[kn_i]') ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:speedOfMotion) and not(iwxxm:speedOfMotion/@xsi:nil = 'true') ) then ( (iwxxm:speedOfMotion/@uom = 'km/h') or (iwxxm:speedOfMotion/@uom = '[kn_i]') ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>SIGMET.SIGMETEvolvingCondition-3: speedOfMotion shall be reported in kilometres per hour (km/h) or knots ([kn_i])</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M87"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M87"/>
<xsl:template match="@*|node()" priority="-2" mode="M87">
<xsl:apply-templates select="*" mode="M87"/>
</xsl:template>
<!--PATTERN TropicalCycloneSIGMET.TropicalCycloneSIGMET-1-->
<!--RULE -->
<xsl:template match="//iwxxm:TropicalCycloneSIGMET" priority="1000" mode="M88">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:TropicalCycloneSIGMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( @isCancelReport = 'true' and string-length(@translationFailedTAC) eq 0 ) then( empty(iwxxm:tropicalCyclone) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( @isCancelReport = 'true' and string-length(@translationFailedTAC) eq 0 ) then( empty(iwxxm:tropicalCyclone) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TropicalCycloneSIGMET.TropicalCycloneSIGMET-1: In a 'CANCELLATION' report iwxxm:TropicalCyclone shall be absent</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M88"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M88"/>
<xsl:template match="@*|node()" priority="-2" mode="M88">
<xsl:apply-templates select="*" mode="M88"/>
</xsl:template>
<!--PATTERN TropicalCycloneSIGMET.TropicalCycloneSIGMET-2-->
<!--RULE -->
<xsl:template match="//iwxxm:TropicalCycloneSIGMET" priority="1000" mode="M89">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:TropicalCycloneSIGMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( (empty(@isCancelReport) or @isCancelReport = 'false') and string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:tropicalCyclone) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( (empty(@isCancelReport) or @isCancelReport = 'false') and string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:tropicalCyclone) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TropicalCycloneSIGMET.TropicalCycloneSIGMET-2: An ordinary report should also have iwxxm:TropicalCyclone</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M89"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M89"/>
<xsl:template match="@*|node()" priority="-2" mode="M89">
<xsl:apply-templates select="*" mode="M89"/>
</xsl:template>
<!--PATTERN TropicalCycloneSIGMET.TropicalCycloneSIGMET-3-->
<!--RULE -->
<xsl:template match="//iwxxm:TropicalCycloneSIGMET" priority="1000" mode="M90">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:TropicalCycloneSIGMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( local-name( . ) = 'TropicalCycloneSIGMET' and exists(iwxxm:analysis/*) ) then( exists(iwxxm:analysis/iwxxm:TropicalCycloneSIGMETEvolvingConditionCollection) and empty(iwxxm:analysis/*[name() != 'iwxxm:TropicalCycloneSIGMETEvolvingConditionCollection']) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( local-name( . ) = 'TropicalCycloneSIGMET' and exists(iwxxm:analysis/*) ) then( exists(iwxxm:analysis/iwxxm:TropicalCycloneSIGMETEvolvingConditionCollection) and empty(iwxxm:analysis/*[name() != 'iwxxm:TropicalCycloneSIGMETEvolvingConditionCollection']) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TropicalCycloneSIGMET.TropicalCycloneSIGMET-3: In a TC SIGMET report the child elements of iwxxm:analysis should be TropicalCycloneSIGMETEvolvingConditionCollection and TropicalCycloneSIGMETEvolvingCondition</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M90"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M90"/>
<xsl:template match="@*|node()" priority="-2" mode="M90">
<xsl:apply-templates select="*" mode="M90"/>
</xsl:template>
<!--PATTERN TropicalCycloneSIGMET.TropicalCycloneSIGMET-4-->
<!--RULE -->
<xsl:template match="//iwxxm:TropicalCycloneSIGMET" priority="1000" mode="M91">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:TropicalCycloneSIGMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( local-name( . ) = 'TropicalCycloneSIGMET' and exists(iwxxm:forecastPositionAnalysis/*) ) then( exists(iwxxm:forecastPositionAnalysis/iwxxm:TropicalCycloneSIGMETPositionCollection) and empty(iwxxm:forecastPositionAnalysis/*[name() != 'iwxxm:TropicalCycloneSIGMETPositionCollection']) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( local-name( . ) = 'TropicalCycloneSIGMET' and exists(iwxxm:forecastPositionAnalysis/*) ) then( exists(iwxxm:forecastPositionAnalysis/iwxxm:TropicalCycloneSIGMETPositionCollection) and empty(iwxxm:forecastPositionAnalysis/*[name() != 'iwxxm:TropicalCycloneSIGMETPositionCollection']) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TropicalCycloneSIGMET.TropicalCycloneSIGMET-4: In a TC SIGMET report the child elements of iwxxm:forecastPositionAnalysis should be TropicalCycloneSIGMETPositionCollection and TropicalCycloneSIGMETPosition</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M91"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M91"/>
<xsl:template match="@*|node()" priority="-2" mode="M91">
<xsl:apply-templates select="*" mode="M91"/>
</xsl:template>
<!--PATTERN VolcanicAshSIGMET.VolcanicAshSIGMET-6-->
<!--RULE -->
<xsl:template match="//iwxxm:VolcanicAshSIGMET" priority="1000" mode="M92">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:VolcanicAshSIGMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:eruptingVolcano//metce:position) ) then( iwxxm:eruptingVolcano//metce:position//gml:pos/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:eruptingVolcano//metce:position) ) then( iwxxm:eruptingVolcano//metce:position//gml:pos/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>VolcanicAshSIGMET.VolcanicAshSIGMET-6: If a geometry is defined for iwxxm:eruptingVolcano//metce:position by providing @srsName, @srsDimension must equal to 2 and @aixsLabels must be non-empty</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M92"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M92"/>
<xsl:template match="@*|node()" priority="-2" mode="M92">
<xsl:apply-templates select="*" mode="M92"/>
</xsl:template>
<!--PATTERN VolcanicAshSIGMET.VolcanicAshSIGMET-7-->
<!--RULE -->
<xsl:template match="//iwxxm:VolcanicAshSIGMET" priority="1000" mode="M93">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:VolcanicAshSIGMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:volcanicAshMovedToFIR//aixm:geometryComponent) ) then( iwxxm:volcanicAshMovedToFIR//aixm:geometryComponent//*[self::aixm:Surface or self::aixm:Curve]/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:volcanicAshMovedToFIR//aixm:geometryComponent) ) then( iwxxm:volcanicAshMovedToFIR//aixm:geometryComponent//*[self::aixm:Surface or self::aixm:Curve]/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>VolcanicAshSIGMET.VolcanicAshSIGMET-7: If a geometry is defined for iwxxm:volcanicAshMovedToFIR//aixm:geometryComponent by providing @srsName, @srsDimension must equal to 2 and @aixsLabels must be non-empty</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M93"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M93"/>
<xsl:template match="@*|node()" priority="-2" mode="M93">
<xsl:apply-templates select="*" mode="M93"/>
</xsl:template>
<!--PATTERN VolcanicAshSIGMET.VolcanicAshSIGMET-1-->
<!--RULE -->
<xsl:template match="//iwxxm:VolcanicAshSIGMET" priority="1000" mode="M94">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:VolcanicAshSIGMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( @isCancelReport = 'true' and string-length(@translationFailedTAC) eq 0 ) then( empty(iwxxm:eruptingVolcano) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( @isCancelReport = 'true' and string-length(@translationFailedTAC) eq 0 ) then( empty(iwxxm:eruptingVolcano) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>VolcanicAshSIGMET.VolcanicAshSIGMET-1: In a 'CANCELLATION' report iwxxm:eruptingVolcano shall be absent</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M94"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M94"/>
<xsl:template match="@*|node()" priority="-2" mode="M94">
<xsl:apply-templates select="*" mode="M94"/>
</xsl:template>
<!--PATTERN VolcanicAshSIGMET.VolcanicAshSIGMET-2-->
<!--RULE -->
<xsl:template match="//iwxxm:VolcanicAshSIGMET" priority="1000" mode="M95">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:VolcanicAshSIGMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( (empty(@isCancelReport) or @isCancelReport = 'false') and string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:eruptingVolcano) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( (empty(@isCancelReport) or @isCancelReport = 'false') and string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:eruptingVolcano) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>VolcanicAshSIGMET.VolcanicAshSIGMET-2: An ordinary report should also have iwxxm:eruptingVolcano</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M95"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M95"/>
<xsl:template match="@*|node()" priority="-2" mode="M95">
<xsl:apply-templates select="*" mode="M95"/>
</xsl:template>
<!--PATTERN VolcanicAshSIGMET.VolcanicAshSIGMET-3-->
<!--RULE -->
<xsl:template match="//iwxxm:VolcanicAshSIGMET" priority="1000" mode="M96">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:VolcanicAshSIGMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:volcanicAshMovedToFIR) ) then( @isCancelReport = 'true' ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:volcanicAshMovedToFIR) ) then( @isCancelReport = 'true' ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>VolcanicAshSIGMET.VolcanicAshSIGMET-3: iwxxm:volcanicAshMovedToFIR can only be used in a 'CANCELLATION' report</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M96"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M96"/>
<xsl:template match="@*|node()" priority="-2" mode="M96">
<xsl:apply-templates select="*" mode="M96"/>
</xsl:template>
<!--PATTERN VolcanicAshSIGMET.VolcanicAshSIGMET-4-->
<!--RULE -->
<xsl:template match="//iwxxm:VolcanicAshSIGMET" priority="1000" mode="M97">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:VolcanicAshSIGMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( local-name( . ) = 'VolcanicAshSIGMET' and exists(iwxxm:analysis/*) ) then( exists(iwxxm:analysis/iwxxm:VolcanicAshSIGMETEvolvingConditionCollection) and empty(iwxxm:analysis/*[name() != 'iwxxm:VolcanicAshSIGMETEvolvingConditionCollection']) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( local-name( . ) = 'VolcanicAshSIGMET' and exists(iwxxm:analysis/*) ) then( exists(iwxxm:analysis/iwxxm:VolcanicAshSIGMETEvolvingConditionCollection) and empty(iwxxm:analysis/*[name() != 'iwxxm:VolcanicAshSIGMETEvolvingConditionCollection']) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>VolcanicAshSIGMET.VolcanicAshSIGMET-4: In a VA SIGMET report the child elements of iwxxm:analysis should be VolcanicAshSIGMETEvolvingConditionCollection</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M97"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M97"/>
<xsl:template match="@*|node()" priority="-2" mode="M97">
<xsl:apply-templates select="*" mode="M97"/>
</xsl:template>
<!--PATTERN VolcanicAshSIGMET.VolcanicAshSIGMET-5-->
<!--RULE -->
<xsl:template match="//iwxxm:VolcanicAshSIGMET" priority="1000" mode="M98">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:VolcanicAshSIGMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( local-name( . ) = 'VolcanicAshSIGMET' and exists(iwxxm:forecastPositionAnalysis/*) ) then( exists(iwxxm:forecastPositionAnalysis/iwxxm:VolcanicAshSIGMETPositionCollection) and empty(iwxxm:forecastPositionAnalysis/*[name() != 'iwxxm:VolcanicAshSIGMETPositionCollection']) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( local-name( . ) = 'VolcanicAshSIGMET' and exists(iwxxm:forecastPositionAnalysis/*) ) then( exists(iwxxm:forecastPositionAnalysis/iwxxm:VolcanicAshSIGMETPositionCollection) and empty(iwxxm:forecastPositionAnalysis/*[name() != 'iwxxm:VolcanicAshSIGMETPositionCollection']) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>VolcanicAshSIGMET.VolcanicAshSIGMET-5: In a VA SIGMET report the child elements of iwxxm:forecastPositionAnalysis should be VolcanicAshSIGMETPositionCollection</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M98"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M98"/>
<xsl:template match="@*|node()" priority="-2" mode="M98">
<xsl:apply-templates select="*" mode="M98"/>
</xsl:template>
<!--PATTERN TropicalCycloneSIGMET.TropicalCycloneSIGMETEvolvoingConditionCollection-1-->
<!--RULE -->
<xsl:template match="//iwxxm:TropicalCycloneSIGMETEvolvingConditionCollection"
priority="1000"
mode="M99">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:TropicalCycloneSIGMETEvolvingConditionCollection"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:tropicalCyclonePosition/gml:Point) ) then( empty(index-of(iwxxm:tropicalCyclonePosition/gml:Point/gml:pos/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:tropicalCyclonePosition/gml:Point) ) then( empty(index-of(iwxxm:tropicalCyclonePosition/gml:Point/gml:pos/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TropicalCycloneSIGMET.TropicalCycloneSIGMETEvolvoingConditionCollection-1: If a geometry is defined for iwxxm:tropicalCyclonePosition/gml:Point with the provision of attribute srsName, attribute srsDimension must equal to 2 and attribute axisLabels must be non-empty</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M99"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M99"/>
<xsl:template match="@*|node()" priority="-2" mode="M99">
<xsl:apply-templates select="*" mode="M99"/>
</xsl:template>
<!--PATTERN TropicalCycloneSIGMET.TropicalCycloneSIGMETPositionCollection-1-->
<!--RULE -->
<xsl:template match="//iwxxm:TropicalCycloneSIGMETPositionCollection"
priority="1000"
mode="M100">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:TropicalCycloneSIGMETPositionCollection"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:tropicalCyclonePosition/gml:Point) ) then( empty(index-of(iwxxm:tropicalCyclonePosition/gml:Point/gml:pos/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else ( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:tropicalCyclonePosition/gml:Point) ) then( empty(index-of(iwxxm:tropicalCyclonePosition/gml:Point/gml:pos/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else ( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TropicalCycloneSIGMET.TropicalCycloneSIGMETPositionCollection-1: If a geometry is defined for iwxxm:tropicalCyclonePosition/gml:Point with the provision of attribute srsName, attribute srsDimension must equal to 2 and attribute axisLabels must be non-empty</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M100"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M100"/>
<xsl:template match="@*|node()" priority="-2" mode="M100">
<xsl:apply-templates select="*" mode="M100"/>
</xsl:template>
<!--PATTERN AIRMET.AIRMETEvolvingCondition.surfaceVisibilityCause-->
<!--RULE -->
<xsl:template match="//*[contains(name(),'AIRMETEvolvingCondition')]/iwxxm:surfaceVisibilityCause"
priority="1000"
mode="M101">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//*[contains(name(),'AIRMETEvolvingCondition')]/iwxxm:surfaceVisibilityCause"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="@xlink:href = document('codes.wmo.int-49-2-WeatherCausingVisibilityReduction.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="@xlink:href = document('codes.wmo.int-49-2-WeatherCausingVisibilityReduction.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>AIRMETEvolvingCondition iwxxm:surfaceVisibilityCause elements should be a member of http://codes.wmo.int/49-2/WeatherCausingVisibilityReduction</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M101"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M101"/>
<xsl:template match="@*|node()" priority="-2" mode="M101">
<xsl:apply-templates select="*" mode="M101"/>
</xsl:template>
<!--PATTERN AIRMET.AIRMETEvolvingCondition-1-->
<!--RULE -->
<xsl:template match="//iwxxm:AIRMETEvolvingCondition" priority="1000" mode="M102">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AIRMETEvolvingCondition"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:cloudBase) and not(iwxxm:cloudBase/@xsi:nil = 'true') ) then( (iwxxm:cloudBase/@uom = 'm') or (iwxxm:cloudBase/@uom = '[ft_i]') ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:cloudBase) and not(iwxxm:cloudBase/@xsi:nil = 'true') ) then( (iwxxm:cloudBase/@uom = 'm') or (iwxxm:cloudBase/@uom = '[ft_i]') ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>AIRMET.AIRMETEvolvingCondition-1: cloudBase shall be reported in metres (m) or feet ([ft_i])</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M102"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M102"/>
<xsl:template match="@*|node()" priority="-2" mode="M102">
<xsl:apply-templates select="*" mode="M102"/>
</xsl:template>
<!--PATTERN AIRMET.AIRMETEvolvingCondition-2-->
<!--RULE -->
<xsl:template match="//iwxxm:AIRMETEvolvingCondition" priority="1000" mode="M103">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AIRMETEvolvingCondition"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:cloudTop) and not(iwxxm:cloudTop/@xsi:nil = 'true') ) then( (iwxxm:cloudTop/@uom = 'm') or (iwxxm:cloudTop/@uom = '[ft_i]') ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:cloudTop) and not(iwxxm:cloudTop/@xsi:nil = 'true') ) then( (iwxxm:cloudTop/@uom = 'm') or (iwxxm:cloudTop/@uom = '[ft_i]') ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>AIRMET.AIRMETEvolvingCondition-2: cloudTop shall be reported in metres (m) or feet ([ft_i])</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M103"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M103"/>
<xsl:template match="@*|node()" priority="-2" mode="M103">
<xsl:apply-templates select="*" mode="M103"/>
</xsl:template>
<!--PATTERN AIRMET.AIRMETEvolvingCondition-9-->
<!--RULE -->
<xsl:template match="//iwxxm:AIRMETEvolvingCondition" priority="1000" mode="M104">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AIRMETEvolvingCondition"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:geometry//*[self::aixm:horizontalProjection or self::aixm:centreline]) ) then( empty(index-of(iwxxm:geometry//*[self::aixm:Surface or self::aixm:Curve]/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:geometry//*[self::aixm:horizontalProjection or self::aixm:centreline]) ) then( empty(index-of(iwxxm:geometry//*[self::aixm:Surface or self::aixm:Curve]/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>AIRMET.AIRMETEvolvingCondition-9: If a geometry of iwxxm:geometry is defined with the provision of attribute srsName, attribute srsDimension must equal to 2 and attribute axisLabels must be non-empty</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M104"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M104"/>
<xsl:template match="@*|node()" priority="-2" mode="M104">
<xsl:apply-templates select="*" mode="M104"/>
</xsl:template>
<!--PATTERN AIRMET.AIRMETEvolvingCondition-3-->
<!--RULE -->
<xsl:template match="//iwxxm:AIRMETEvolvingCondition" priority="1000" mode="M105">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AIRMETEvolvingCondition"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:directionOfMotion) and not(iwxxm:directionOfMotion/@xsi:nil = 'true') ) then( iwxxm:directionOfMotion/@uom = 'deg' ) else true())"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:directionOfMotion) and not(iwxxm:directionOfMotion/@xsi:nil = 'true') ) then( iwxxm:directionOfMotion/@uom = 'deg' ) else true())">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>AIRMET.AIRMETEvolvingCondition-3: directionOfMotion shall be reported in degrees (deg)</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M105"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M105"/>
<xsl:template match="@*|node()" priority="-2" mode="M105">
<xsl:apply-templates select="*" mode="M105"/>
</xsl:template>
<!--PATTERN AIRMET.AIRMETEvolvingCondition-4-->
<!--RULE -->
<xsl:template match="//iwxxm:AIRMETEvolvingCondition" priority="1000" mode="M106">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AIRMETEvolvingCondition"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:speedOfMotion) and not(iwxxm:speedOfMotion/@xsi:nil = 'true') ) then( (iwxxm:speedOfMotion/@uom = 'km/h') or (iwxxm:speedOfMotion/@uom = '[kn_i]') ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:speedOfMotion) and not(iwxxm:speedOfMotion/@xsi:nil = 'true') ) then( (iwxxm:speedOfMotion/@uom = 'km/h') or (iwxxm:speedOfMotion/@uom = '[kn_i]') ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>AIRMET.AIRMETEvolvingCondition-4: speedOfMotion shall be reported in kilometres per hour (km/h) or knots ([kn_i])</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M106"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M106"/>
<xsl:template match="@*|node()" priority="-2" mode="M106">
<xsl:apply-templates select="*" mode="M106"/>
</xsl:template>
<!--PATTERN AIRMET.AIRMETEvolvingCondition-5-->
<!--RULE -->
<xsl:template match="//iwxxm:AIRMETEvolvingCondition" priority="1000" mode="M107">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AIRMETEvolvingCondition"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:surfaceVisibility) and not(iwxxm:surfaceVisibility/@xsi:nil = 'true') ) then( iwxxm:surfaceVisibility/@uom = 'm' ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:surfaceVisibility) and not(iwxxm:surfaceVisibility/@xsi:nil = 'true') ) then( iwxxm:surfaceVisibility/@uom = 'm' ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>AIRMET.AIRMETEvolvingCondition-5: surfaceVisibility shall be reported in metres (m)</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M107"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M107"/>
<xsl:template match="@*|node()" priority="-2" mode="M107">
<xsl:apply-templates select="*" mode="M107"/>
</xsl:template>
<!--PATTERN AIRMET.AIRMETEvolvingCondition-8-->
<!--RULE -->
<xsl:template match="//iwxxm:AIRMETEvolvingCondition" priority="1000" mode="M108">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AIRMETEvolvingCondition"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( not((exists(iwxxm:surfaceWindDirection) and exists(iwxxm:surfaceWindSpeed)) or (empty(iwxxm:surfaceWindDirection) and empty(iwxxm:surfaceWindSpeed))) ) then( false() ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( not((exists(iwxxm:surfaceWindDirection) and exists(iwxxm:surfaceWindSpeed)) or (empty(iwxxm:surfaceWindDirection) and empty(iwxxm:surfaceWindSpeed))) ) then( false() ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>AIRMET.AIRMETEvolvingCondition-8: surfaceWindDirection and surfaceWindSpeed must be reported together</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M108"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M108"/>
<xsl:template match="@*|node()" priority="-2" mode="M108">
<xsl:apply-templates select="*" mode="M108"/>
</xsl:template>
<!--PATTERN AIRMET.AIRMETEvolvingCondition-7-->
<!--RULE -->
<xsl:template match="//iwxxm:AIRMETEvolvingCondition" priority="1000" mode="M109">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AIRMETEvolvingCondition"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:surfaceWindDirection) and not(iwxxm:surfaceWindDirection/@xsi:nil = 'true') ) then( iwxxm:surfaceWindDirection/@uom = 'deg' ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:surfaceWindDirection) and not(iwxxm:surfaceWindDirection/@xsi:nil = 'true') ) then( iwxxm:surfaceWindDirection/@uom = 'deg' ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>AIRMET.AIRMETEvolvingCondition-7: surfaceWindDirection shall be reported in the degrees unit of measure ('deg')</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M109"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M109"/>
<xsl:template match="@*|node()" priority="-2" mode="M109">
<xsl:apply-templates select="*" mode="M109"/>
</xsl:template>
<!--PATTERN AIRMET.AIRMETEvolvingCondition-6-->
<!--RULE -->
<xsl:template match="//iwxxm:AIRMETEvolvingCondition" priority="1000" mode="M110">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AIRMETEvolvingCondition"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:surfaceWindSpeed) and not(iwxxm:surfaceWindSpeed/@xsi:nil = 'true') ) then( (iwxxm:surfaceWindSpeed/@uom = 'm/s') or (iwxxm:surfaceWindSpeed/@uom = '[kn_i]') ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:surfaceWindSpeed) and not(iwxxm:surfaceWindSpeed/@xsi:nil = 'true') ) then( (iwxxm:surfaceWindSpeed/@uom = 'm/s') or (iwxxm:surfaceWindSpeed/@uom = '[kn_i]') ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>AIRMET.AIRMETEvolvingCondition-6: surfaceWindSpeed shall be reported in metres per second (m/s) or knots ([kn_i])</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M110"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M110"/>
<xsl:template match="@*|node()" priority="-2" mode="M110">
<xsl:apply-templates select="*" mode="M110"/>
</xsl:template>
<!--PATTERN AIRMET.AIRMET.phenomenon-->
<!--RULE -->
<xsl:template match="//*[contains(name(),'AIRMET')]/iwxxm:phenomenon"
priority="1000"
mode="M111">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//*[contains(name(),'AIRMET')]/iwxxm:phenomenon"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="@xlink:href = document('codes.wmo.int-49-2-AirWxPhenomena.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="@xlink:href = document('codes.wmo.int-49-2-AirWxPhenomena.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>AIRMET iwxxm:phenomenon elements should be a member of http://codes.wmo.int/49-2/AirWxPhenomena</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M111"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M111"/>
<xsl:template match="@*|node()" priority="-2" mode="M111">
<xsl:apply-templates select="*" mode="M111"/>
</xsl:template>
<!--PATTERN AIRMET.AIRMET-1-->
<!--RULE -->
<xsl:template match="//iwxxm:AIRMET" priority="1000" mode="M112">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="//iwxxm:AIRMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( @reportStatus != 'AMENDMENT' and @reportStatus != 'CORRECTION' )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( @reportStatus != 'AMENDMENT' and @reportStatus != 'CORRECTION' )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>AIRMET.AIRMET-1: An AIRMET report cannot have a reportStatus of 'AMENDMENT' or 'CORRECTION'</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M112"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M112"/>
<xsl:template match="@*|node()" priority="-2" mode="M112">
<xsl:apply-templates select="*" mode="M112"/>
</xsl:template>
<!--PATTERN AIRMET.AIRMET-5-->
<!--RULE -->
<xsl:template match="//iwxxm:AIRMET" priority="1000" mode="M113">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="//iwxxm:AIRMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( string-length(@translationFailedTAC) eq 0 and exists(iwxxm:analysis//iwxxm:phenomenonTime/*) and exists(iwxxm:validPeriod/*) ) then( empty(index-of(for $i in iwxxm:analysis return number(translate($i//iwxxm:phenomenonTime/gml:TimeInstant/gml:timePosition,'-T:Z','')) eq number(translate(iwxxm:validPeriod/gml:TimePeriod/gml:beginPosition,'-T:Z','')),false())) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( string-length(@translationFailedTAC) eq 0 and exists(iwxxm:analysis//iwxxm:phenomenonTime/*) and exists(iwxxm:validPeriod/*) ) then( empty(index-of(for $i in iwxxm:analysis return number(translate($i//iwxxm:phenomenonTime/gml:TimeInstant/gml:timePosition,'-T:Z','')) eq number(translate(iwxxm:validPeriod/gml:TimePeriod/gml:beginPosition,'-T:Z','')),false())) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>AIRMET.AIRMET-5: iwxxm:analysis//iwxxm:phenomenonTime must be equal to iwxxm:validPeriod//gml:beginPosition</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M113"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M113"/>
<xsl:template match="@*|node()" priority="-2" mode="M113">
<xsl:apply-templates select="*" mode="M113"/>
</xsl:template>
<!--PATTERN AIRMET.AIRMET-6-->
<!--RULE -->
<xsl:template match="//iwxxm:AIRMET" priority="1000" mode="M114">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="//iwxxm:AIRMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:issuingAirTrafficServicesRegion//aixm:geometryComponent) ) then( empty(index-of(iwxxm:issuingAirTrafficServicesRegion//aixm:geometryComponent//*[self::aixm:Surface or self::aixm:Curve]/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:issuingAirTrafficServicesRegion//aixm:geometryComponent) ) then( empty(index-of(iwxxm:issuingAirTrafficServicesRegion//aixm:geometryComponent//*[self::aixm:Surface or self::aixm:Curve]/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>AIRMET.AIRMET-6: If a geometry is defined for iwxxm:issuingAirTrafficServicesRegion//aixm:geometryComponent with the provision of attribute srsName, attribute srsDimension must equal to 2 and attribute axisLabels must be non-empty</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M114"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M114"/>
<xsl:template match="@*|node()" priority="-2" mode="M114">
<xsl:apply-templates select="*" mode="M114"/>
</xsl:template>
<!--PATTERN AIRMET.AIRMET-3-->
<!--RULE -->
<xsl:template match="//iwxxm:AIRMET" priority="1000" mode="M115">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="//iwxxm:AIRMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( @isCancelReport= 'true' and string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:issuingAirTrafficServicesUnit) and exists(iwxxm:originatingMeteorologicalWatchOffice) and exists(iwxxm:issuingAirTrafficServicesRegion) and exists(iwxxm:sequenceNumber) and exists(iwxxm:validPeriod) and exists(iwxxm:cancelledReportSequenceNumber) and exists(iwxxm:cancelledReportValidPeriod) and empty(iwxxm:phenomenon) and empty(iwxxm:analysis) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( @isCancelReport= 'true' and string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:issuingAirTrafficServicesUnit) and exists(iwxxm:originatingMeteorologicalWatchOffice) and exists(iwxxm:issuingAirTrafficServicesRegion) and exists(iwxxm:sequenceNumber) and exists(iwxxm:validPeriod) and exists(iwxxm:cancelledReportSequenceNumber) and exists(iwxxm:cancelledReportValidPeriod) and empty(iwxxm:phenomenon) and empty(iwxxm:analysis) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>AIRMET.AIRMET-3: A 'CANCELLATION' report should have appropriately filled elements including Iwxxm:issueTime, iwxxm:issuingAirTrafficServicesUnit, iwxxm:originatingMeteorologicalWatchOffice, iwxxm:issuingAirTrafficServicesRegion, iwxxm:sequenceNumber, iwxxm:validPeriod, iwxxm:cancelledReportSequenceNumber, iwxxm:cancelledReportValidPeriod. Elements iwxxm:phenomenon and iwxxm:analysis shall be absent</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M115"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M115"/>
<xsl:template match="@*|node()" priority="-2" mode="M115">
<xsl:apply-templates select="*" mode="M115"/>
</xsl:template>
<!--PATTERN AIRMET.AIRMET-2-->
<!--RULE -->
<xsl:template match="//iwxxm:AIRMET" priority="1000" mode="M116">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="//iwxxm:AIRMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( string-length(@translationFailedTAC) gt 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:issuingAirTrafficServicesUnit) and exists(iwxxm:validPeriod) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( string-length(@translationFailedTAC) gt 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:issuingAirTrafficServicesUnit) and exists(iwxxm:validPeriod) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>AIRMET.AIRMET-2: A report that failed translation should have as a minimum appropriately filled elements including Iwxxm:issueTime, iwxxm:issuingAirTrafficServicesUnit and iwxxm:validPeriod</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M116"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M116"/>
<xsl:template match="@*|node()" priority="-2" mode="M116">
<xsl:apply-templates select="*" mode="M116"/>
</xsl:template>
<!--PATTERN AIRMET.AIRMET-4-->
<!--RULE -->
<xsl:template match="//iwxxm:AIRMET" priority="1000" mode="M117">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="//iwxxm:AIRMET"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( (empty(@isCancelReport) or @isCancelReport = 'false') and string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:issuingAirTrafficServicesUnit) and exists(iwxxm:originatingMeteorologicalWatchOffice) and exists(iwxxm:issuingAirTrafficServicesRegion) and exists(iwxxm:sequenceNumber) and exists(iwxxm:validPeriod) and empty(iwxxm:cancelledReportSequenceNumber) and empty(iwxxm:cancelledReportValidPeriod) and exists(iwxxm:phenomenon) and exists(iwxxm:analysis) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( (empty(@isCancelReport) or @isCancelReport = 'false') and string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:issuingAirTrafficServicesUnit) and exists(iwxxm:originatingMeteorologicalWatchOffice) and exists(iwxxm:issuingAirTrafficServicesRegion) and exists(iwxxm:sequenceNumber) and exists(iwxxm:validPeriod) and empty(iwxxm:cancelledReportSequenceNumber) and empty(iwxxm:cancelledReportValidPeriod) and exists(iwxxm:phenomenon) and exists(iwxxm:analysis) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>AIRMET.AIRMET-4: An ordinary report should have appropriately filled elements including iwxxm:issueTime, iwxxm:issuingAirTrafficServicesUnit, iwxxm:originatingMeteorologicalWatchOffice, iwxxm:issuingAirTrafficServicesRegion, iwxxm:sequenceNumber, iwxxm:validPeriod, iwxxm:phenomenon and iwxxm:analysis. Elements iwxxm:cancelledReportSequenceNumber and iwxxm:cancelledReportValidPeriod shall be absent</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M117"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M117"/>
<xsl:template match="@*|node()" priority="-2" mode="M117">
<xsl:apply-templates select="*" mode="M117"/>
</xsl:template>
<!--PATTERN TropicalCycloneAdvisory.TropicalCycloneForecastConditions-2-->
<!--RULE -->
<xsl:template match="//iwxxm:TropicalCycloneForecastConditions"
priority="1000"
mode="M118">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:TropicalCycloneForecastConditions"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:tropicalCyclonePosition/gml:Point) ) then( empty(index-of(iwxxm:tropicalCyclonePosition/gml:Point/gml:pos/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:tropicalCyclonePosition/gml:Point) ) then( empty(index-of(iwxxm:tropicalCyclonePosition/gml:Point/gml:pos/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TropicalCycloneAdvisory.TropicalCycloneForecastConditions-2: If a geometry is defined for iwxxm:tropicalCyclonePosition/gml:Point with the provision of attribute srsName, attribute srsDimension must equal to 2 and attribute axisLabels must be non-empty</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M118"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M118"/>
<xsl:template match="@*|node()" priority="-2" mode="M118">
<xsl:apply-templates select="*" mode="M118"/>
</xsl:template>
<!--PATTERN TropicalCycloneAdvisory.TropicalCycloneForecastConditions-1-->
<!--RULE -->
<xsl:template match="//iwxxm:TropicalCycloneForecastConditions"
priority="1000"
mode="M119">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:TropicalCycloneForecastConditions"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:maximumSurfaceWindSpeed) and not(iwxxm:maximumSurfaceWindSpeed/@xsi:nil = 'true') ) then( (iwxxm:maximumSurfaceWindSpeed/@uom = 'm/s') or (iwxxm:maximumSurfaceWindSpeed/@uom = '[kn_i]') ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:maximumSurfaceWindSpeed) and not(iwxxm:maximumSurfaceWindSpeed/@xsi:nil = 'true') ) then( (iwxxm:maximumSurfaceWindSpeed/@uom = 'm/s') or (iwxxm:maximumSurfaceWindSpeed/@uom = '[kn_i]') ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TropicalCycloneAdvisory.TropicalCycloneForecastConditions-1: maximumSurfaceWindSpeed shall be reported in metres per second (m/s) or knots ([kn_i])</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M119"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M119"/>
<xsl:template match="@*|node()" priority="-2" mode="M119">
<xsl:apply-templates select="*" mode="M119"/>
</xsl:template>
<!--PATTERN TropicalCycloneAdvisory.TropicalCycloneAdvisory-1-->
<!--RULE -->
<xsl:template match="//iwxxm:TropicalCycloneAdvisory" priority="1000" mode="M120">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:TropicalCycloneAdvisory"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( string-length(@translationFailedTAC) gt 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:issuingTropicalCycloneAdvisoryCentre) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( string-length(@translationFailedTAC) gt 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:issuingTropicalCycloneAdvisoryCentre) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TropicalCycloneAdvisory.TropicalCycloneAdvisory-1: A report that failed translation should have as a minimum appropriately filled elements including Iwxxm:issueTime and iwxxm:issuingTropicalCycloneAdvisoryCentre</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M120"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M120"/>
<xsl:template match="@*|node()" priority="-2" mode="M120">
<xsl:apply-templates select="*" mode="M120"/>
</xsl:template>
<!--PATTERN TropicalCycloneAdvisory.TropicalCycloneAdvisory-2-->
<!--RULE -->
<xsl:template match="//iwxxm:TropicalCycloneAdvisory" priority="1000" mode="M121">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:TropicalCycloneAdvisory"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:issuingTropicalCycloneAdvisoryCentre) and exists(iwxxm:tropicalCycloneName) and exists(iwxxm:advisoryNumber) and exists(iwxxm:observation) and exists(iwxxm:forecast) and exists(iwxxm:remarks) and exists(iwxxm:nextAdvisoryTime) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:issuingTropicalCycloneAdvisoryCentre) and exists(iwxxm:tropicalCycloneName) and exists(iwxxm:advisoryNumber) and exists(iwxxm:observation) and exists(iwxxm:forecast) and exists(iwxxm:remarks) and exists(iwxxm:nextAdvisoryTime) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TropicalCycloneAdvisory.TropicalCycloneAdvisory-2: An ordinary report should have appropriately filled elements including Iwxxm:issueTime, iwxxm:issuingTropicalCycloneAdvisoryCentre, iwxxm:tropicalCycloneName, iwxxm:advisoryNumber, iwxxm:observation, iwxxm:forecast, iwxxm:remarks and iwxxm:nextAdvisoryTime</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M121"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M121"/>
<xsl:template match="@*|node()" priority="-2" mode="M121">
<xsl:apply-templates select="*" mode="M121"/>
</xsl:template>
<!--PATTERN TropicalCycloneAdvisory.TropicalCycloneObservedConditions-1-->
<!--RULE -->
<xsl:template match="//iwxxm:TropicalCycloneObservedConditions"
priority="1000"
mode="M122">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:TropicalCycloneObservedConditions"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:centralPressure) and not(iwxxm:centralPressure/@xsi:nil = 'true') ) then( iwxxm:centralPressure/@uom = 'hPa' ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:centralPressure) and not(iwxxm:centralPressure/@xsi:nil = 'true') ) then( iwxxm:centralPressure/@uom = 'hPa' ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TropicalCycloneAdvisory.TropicalCycloneObservedConditions-1: centralPressure shall be reported in hectopascals (hPa)</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M122"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M122"/>
<xsl:template match="@*|node()" priority="-2" mode="M122">
<xsl:apply-templates select="*" mode="M122"/>
</xsl:template>
<!--PATTERN TropicalCycloneAdvisory.TropicalCycloneObservedConditions-6-->
<!--RULE -->
<xsl:template match="//iwxxm:TropicalCycloneObservedConditions"
priority="1000"
mode="M123">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:TropicalCycloneObservedConditions"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:cumulonimbusCloudLocation//*[self::aixm:horizontalProjection or self::aixm:centreline]) ) then( empty(index-of(iwxxm:cumulonimbusCloudLocation//*[self::aixm:Surface or self::aixm:Curve]/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:cumulonimbusCloudLocation//*[self::aixm:horizontalProjection or self::aixm:centreline]) ) then( empty(index-of(iwxxm:cumulonimbusCloudLocation//*[self::aixm:Surface or self::aixm:Curve]/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TropicalCycloneAdvisory.TropicalCycloneObservedConditions-6: If a geometry of iwxxm:cumulonimbusCloudLocation is defined with the provision of attribute srsName, attribute srsDimension must equal to 2 and attribute axisLabels must be non-empty</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M123"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M123"/>
<xsl:template match="@*|node()" priority="-2" mode="M123">
<xsl:apply-templates select="*" mode="M123"/>
</xsl:template>
<!--PATTERN TropicalCycloneAdvisory.TropicalCycloneObservedConditions-5-->
<!--RULE -->
<xsl:template match="//iwxxm:TropicalCycloneObservedConditions"
priority="1000"
mode="M124">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:TropicalCycloneObservedConditions"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:tropicalCyclonePosition/gml:Point) ) then( empty(index-of(iwxxm:tropicalCyclonePosition/gml:Point/gml:pos/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:tropicalCyclonePosition/gml:Point) ) then( empty(index-of(iwxxm:tropicalCyclonePosition/gml:Point/gml:pos/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TropicalCycloneAdvisory.TropicalCycloneObservedConditions-5: If a geometry is defined for iwxxm:tropicalCyclonePosition/gml:Point with the provision of attribute srsName, attribute srsDimension must equal to 2 and attribute axisLabels must be non-empty</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M124"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M124"/>
<xsl:template match="@*|node()" priority="-2" mode="M124">
<xsl:apply-templates select="*" mode="M124"/>
</xsl:template>
<!--PATTERN TropicalCycloneAdvisory.TropicalCycloneObservedConditions-2-->
<!--RULE -->
<xsl:template match="//iwxxm:TropicalCycloneObservedConditions"
priority="1000"
mode="M125">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:TropicalCycloneObservedConditions"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:maximumSurfaceWindSpeed) and not(iwxxm:maximumSurfaceWindSpeed/@xsi:nil = 'true') ) then( (iwxxm:maximumSurfaceWindSpeed/@uom = 'm/s') or (iwxxm:maximumSurfaceWindSpeed/@uom = '[kn_i]') ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:maximumSurfaceWindSpeed) and not(iwxxm:maximumSurfaceWindSpeed/@xsi:nil = 'true') ) then( (iwxxm:maximumSurfaceWindSpeed/@uom = 'm/s') or (iwxxm:maximumSurfaceWindSpeed/@uom = '[kn_i]') ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TropicalCycloneAdvisory.TropicalCycloneObservedConditions-2: maximumSurfaceWindSpeed shall be reported in metres per second (m/s) or knots ([kn_i])</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M125"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M125"/>
<xsl:template match="@*|node()" priority="-2" mode="M125">
<xsl:apply-templates select="*" mode="M125"/>
</xsl:template>
<!--PATTERN TropicalCycloneAdvisory.TropicalCycloneObservedConditions-3-->
<!--RULE -->
<xsl:template match="//iwxxm:TropicalCycloneObservedConditions"
priority="1000"
mode="M126">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:TropicalCycloneObservedConditions"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:movementDirection) and not(iwxxm:movementDirection/@xsi:nil = 'true') ) then( iwxxm:movementDirection/@uom = 'deg' ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:movementDirection) and not(iwxxm:movementDirection/@xsi:nil = 'true') ) then( iwxxm:movementDirection/@uom = 'deg' ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TropicalCycloneAdvisory.TropicalCycloneObservedConditions-3: movementDirection shall be reported in degrees (deg)</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M126"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M126"/>
<xsl:template match="@*|node()" priority="-2" mode="M126">
<xsl:apply-templates select="*" mode="M126"/>
</xsl:template>
<!--PATTERN TropicalCycloneAdvisory.TropicalCycloneObservedConditions-4-->
<!--RULE -->
<xsl:template match="//iwxxm:TropicalCycloneObservedConditions"
priority="1000"
mode="M127">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:TropicalCycloneObservedConditions"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:movementSpeed) and not(iwxxm:movementSpeed/@xsi:nil = 'true') ) then( (iwxxm:movementSpeed/@uom = 'km/h') or (iwxxm:movementSpeed/@uom = '[kn_i]') ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:movementSpeed) and not(iwxxm:movementSpeed/@xsi:nil = 'true') ) then( (iwxxm:movementSpeed/@uom = 'km/h') or (iwxxm:movementSpeed/@uom = '[kn_i]') ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>TropicalCycloneAdvisory.TropicalCycloneObservedConditions-4: movementSpeed shall be reported in kilometres per hour (km/h) or knots ([kn_i])</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M127"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M127"/>
<xsl:template match="@*|node()" priority="-2" mode="M127">
<xsl:apply-templates select="*" mode="M127"/>
</xsl:template>
<!--PATTERN VolcanicAshAdvisory.VolcanicAshCloudObservedOrEstimated-3-->
<!--RULE -->
<xsl:template match="//iwxxm:VolcanicAshCloudObservedOrEstimated"
priority="1000"
mode="M128">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:VolcanicAshCloudObservedOrEstimated"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:ashCloudExtent//*[self::aixm:horizontalProjection or self::aixm:centreline]) ) then( empty(index-of(iwxxm:ashCloudExtent//*[self::aixm:Surface or self::aixm:Curve]/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:ashCloudExtent//*[self::aixm:horizontalProjection or self::aixm:centreline]) ) then( empty(index-of(iwxxm:ashCloudExtent//*[self::aixm:Surface or self::aixm:Curve]/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>VolcanicAshAdvisory.VolcanicAshCloudObservedOrEstimated-3: If a geometry of iwxxm:ashCloudExtent is defined with the provision of attribute srsName, attribute srsDimension must equal to 2 and attribute axisLabels must be non-empty</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M128"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M128"/>
<xsl:template match="@*|node()" priority="-2" mode="M128">
<xsl:apply-templates select="*" mode="M128"/>
</xsl:template>
<!--PATTERN VolcanicAshAdvisory.VolcanicAshCloud-1-->
<!--RULE -->
<xsl:template match="//iwxxm:VolcanicAshCloudObservedOrEstimated"
priority="1000"
mode="M129">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:VolcanicAshCloudObservedOrEstimated"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:directionOfMotion) and not(iwxxm:directionOfMotion/@xsi:nil = 'true') ) then( iwxxm:directionOfMotion/@uom = 'deg' ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:directionOfMotion) and not(iwxxm:directionOfMotion/@xsi:nil = 'true') ) then( iwxxm:directionOfMotion/@uom = 'deg' ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>VolcanicAshAdvisory.VolcanicAshCloud-1: directionOfMotion shall be reported in degrees (deg)</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M129"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M129"/>
<xsl:template match="@*|node()" priority="-2" mode="M129">
<xsl:apply-templates select="*" mode="M129"/>
</xsl:template>
<!--PATTERN VolcanicAshAdvisory.VolcanicAshCloud-2-->
<!--RULE -->
<xsl:template match="//iwxxm:VolcanicAshCloudObservedOrEstimated"
priority="1000"
mode="M130">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:VolcanicAshCloudObservedOrEstimated"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:speedOfMotion) and not(iwxxm:speedOfMotion/@xsi:nil = 'true') ) then( (iwxxm:speedOfMotion/@uom = 'km/h') or (iwxxm:speedOfMotion/@uom = '[kn_i]') ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:speedOfMotion) and not(iwxxm:speedOfMotion/@xsi:nil = 'true') ) then( (iwxxm:speedOfMotion/@uom = 'km/h') or (iwxxm:speedOfMotion/@uom = '[kn_i]') ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>VolcanicAshAdvisory.VolcanicAshCloud-2: speedOfMotion shall be reported in kilometres per hour (km/h) or knots ([kn_i])</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M130"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M130"/>
<xsl:template match="@*|node()" priority="-2" mode="M130">
<xsl:apply-templates select="*" mode="M130"/>
</xsl:template>
<!--PATTERN VolcanicAshAdvisory.VolcanicAshAdvisory.colourCode-->
<!--RULE -->
<xsl:template match="//*[contains(name(),'VolcanicAshAdvisory')]/iwxxm:colourCode"
priority="1000"
mode="M131">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//*[contains(name(),'VolcanicAshAdvisory')]/iwxxm:colourCode"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="@xlink:href = document('codes.wmo.int-49-2-AviationColourCode.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="@xlink:href = document('codes.wmo.int-49-2-AviationColourCode.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>VolcanicAshAdvisory iwxxm:colourCode elements should be a member of http://codes.wmo.int/49-2/AviationColourCode</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M131"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M131"/>
<xsl:template match="@*|node()" priority="-2" mode="M131">
<xsl:apply-templates select="*" mode="M131"/>
</xsl:template>
<!--PATTERN VolcanicAshAdvisory.VolcanicAshAdvisory-3-->
<!--RULE -->
<xsl:template match="//iwxxm:VolcanicAshAdvisory" priority="1000" mode="M132">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:VolcanicAshAdvisory"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:volcano//metce:position) ) then( empty(index-of(iwxxm:volcano//metce:position//gml:pos/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:volcano//metce:position) ) then( empty(index-of(iwxxm:volcano//metce:position//gml:pos/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>VolcanicAshAdvisory.VolcanicAshAdvisory-3: If a geometry is defined for iwxxm:volcano//metce:position with the provision of attribute srsName, attribute srsDimension must equal to 2 and attribute axisLabels must be non-empty</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M132"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M132"/>
<xsl:template match="@*|node()" priority="-2" mode="M132">
<xsl:apply-templates select="*" mode="M132"/>
</xsl:template>
<!--PATTERN VolcanicAshAdvisory.VolcanicAshAdvisory-1-->
<!--RULE -->
<xsl:template match="//iwxxm:VolcanicAshAdvisory" priority="1000" mode="M133">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:VolcanicAshAdvisory"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( string-length(@translationFailedTAC) gt 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:issuingVolcanicAshAdvisoryCentre) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( string-length(@translationFailedTAC) gt 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:issuingVolcanicAshAdvisoryCentre) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>VolcanicAshAdvisory.VolcanicAshAdvisory-1: A report that failed translation should have as a minimum appropriately filled elements including Iwxxm:issueTime and iwxxm:issuingVolcanicAshAdvisoryCentre</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M133"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M133"/>
<xsl:template match="@*|node()" priority="-2" mode="M133">
<xsl:apply-templates select="*" mode="M133"/>
</xsl:template>
<!--PATTERN VolcanicAshAdvisory.VolcanicAshAdvisory-2-->
<!--RULE -->
<xsl:template match="//iwxxm:VolcanicAshAdvisory" priority="1000" mode="M134">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:VolcanicAshAdvisory"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:issuingVolcanicAshAdvisoryCentre) and exists(iwxxm:volcano) and exists(iwxxm:stateOrRegion) and exists(iwxxm:summitElevation) and exists(iwxxm:advisoryNumber) and exists(iwxxm:informationSource) and exists(iwxxm:eruptionDetails) and exists(iwxxm:observation) and exists(iwxxm:forecast) and exists(iwxxm:remarks) and exists(iwxxm:nextAdvisoryTime) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:issuingVolcanicAshAdvisoryCentre) and exists(iwxxm:volcano) and exists(iwxxm:stateOrRegion) and exists(iwxxm:summitElevation) and exists(iwxxm:advisoryNumber) and exists(iwxxm:informationSource) and exists(iwxxm:eruptionDetails) and exists(iwxxm:observation) and exists(iwxxm:forecast) and exists(iwxxm:remarks) and exists(iwxxm:nextAdvisoryTime) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>VolcanicAshAdvisory.VolcanicAshAdvisory-2: An ordinary report should have appropriately filled elements including Iwxxm:issueTime, iwxxm:issuingVolcanicAshAdvisoryCentre, iwxxm:volcano, iwxxm:stateOrRegion, iwxxm:summitElevation, iwxxm:advisoryNumber, iwxxm:informationSource, iwxxm:eruptionDetails, iwxxm:observation, iwxxm:forecast, iwxxm:remarks and iwxxm:nextAdvisoryTime</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M134"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M134"/>
<xsl:template match="@*|node()" priority="-2" mode="M134">
<xsl:apply-templates select="*" mode="M134"/>
</xsl:template>
<!--PATTERN VolcanicAshAdvisory.WindConditions-3-->
<!--RULE -->
<xsl:template match="//iwxxm:WindObservedOrEstimated" priority="1000" mode="M135">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:WindObservedOrEstimated"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( iwxxm:variableWindDirection = 'true' ) then( empty(iwxxm:windDirection) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( iwxxm:variableWindDirection = 'true' ) then( empty(iwxxm:windDirection) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>VolcanicAshAdvisory.WindConditions-3: When iwxxm:variableWindDirection is true, iwxxm:windDirection must be empty</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M135"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M135"/>
<xsl:template match="@*|node()" priority="-2" mode="M135">
<xsl:apply-templates select="*" mode="M135"/>
</xsl:template>
<!--PATTERN VolcanicAshAdvisory.WindConditions-1-->
<!--RULE -->
<xsl:template match="//iwxxm:WindObservedOrEstimated" priority="1000" mode="M136">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:WindObservedOrEstimated"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:windDirection) and not(iwxxm:windDirection/@xsi:nil = 'true') ) then( iwxxm:windDirection/@uom = 'deg' ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:windDirection) and not(iwxxm:windDirection/@xsi:nil = 'true') ) then( iwxxm:windDirection/@uom = 'deg' ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>VolcanicAshAdvisory.WindConditions-1: windDirection shall be reported in degrees (deg)</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M136"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M136"/>
<xsl:template match="@*|node()" priority="-2" mode="M136">
<xsl:apply-templates select="*" mode="M136"/>
</xsl:template>
<!--PATTERN VolcanicAshAdvisory.WindConditions-2-->
<!--RULE -->
<xsl:template match="//iwxxm:WindObservedOrEstimated" priority="1000" mode="M137">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:WindObservedOrEstimated"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:windSpeed) and not(iwxxm:windSpeed/@xsi:nil = 'true') ) then( (iwxxm:windSpeed/@uom = 'm/s') or (iwxxm:windSpeed/@uom = '[kn_i]') ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:windSpeed) and not(iwxxm:windSpeed/@xsi:nil = 'true') ) then( (iwxxm:windSpeed/@uom = 'm/s') or (iwxxm:windSpeed/@uom = '[kn_i]') ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>VolcanicAshAdvisory.WindConditions-2: windSpeed shall be reported in metres per second (m/s) or knots ([kn_i])</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M137"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M137"/>
<xsl:template match="@*|node()" priority="-2" mode="M137">
<xsl:apply-templates select="*" mode="M137"/>
</xsl:template>
<!--PATTERN VolcanicAshAdvisory.VolcanicAshForecastConditions-2-->
<!--RULE -->
<xsl:template match="//iwxxm:VolcanicAshForecastConditions"
priority="1000"
mode="M138">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:VolcanicAshForecastConditions"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( @status != 'PROVIDED' ) then(empty(iwxxm:ashCloud) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( @status != 'PROVIDED' ) then(empty(iwxxm:ashCloud) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>VolcanicAshAdvisory.VolcanicAshForecastConditions-2: When @status is not equal to 'PROVIDED', iwxxm:ashCloud must be empty</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M138"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M138"/>
<xsl:template match="@*|node()" priority="-2" mode="M138">
<xsl:apply-templates select="*" mode="M138"/>
</xsl:template>
<!--PATTERN VolcanicAshAdvisory.VolcanicAshForecastConditions-1-->
<!--RULE -->
<xsl:template match="//iwxxm:VolcanicAshForecastConditions"
priority="1000"
mode="M139">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:VolcanicAshForecastConditions"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( @status = 'PROVIDED' ) then( count(iwxxm:ashCloud) ge 1 ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( @status = 'PROVIDED' ) then( count(iwxxm:ashCloud) ge 1 ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>VolcanicAshAdvisory.VolcanicAshForecastConditions-1: When @status is equal to 'PROVIDED', iwxxm:ashCloud must exist</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M139"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M139"/>
<xsl:template match="@*|node()" priority="-2" mode="M139">
<xsl:apply-templates select="*" mode="M139"/>
</xsl:template>
<!--PATTERN VolcanicAshAdvisory.VolcanicAshCloudForecast-1-->
<!--RULE -->
<xsl:template match="//iwxxm:VolcanicAshCloudForecast"
priority="1000"
mode="M140">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:VolcanicAshCloudForecast"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:ashCloudExtent//*[self::aixm:horizontalProjection or self::aixm:centreline]) ) then( empty(index-of(iwxxm:ashCloudExtent//*[self::aixm:Surface or self::aixm:Curve]/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:ashCloudExtent//*[self::aixm:horizontalProjection or self::aixm:centreline]) ) then( empty(index-of(iwxxm:ashCloudExtent//*[self::aixm:Surface or self::aixm:Curve]/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>VolcanicAshAdvisory.VolcanicAshCloudForecast-1: If a geometry of iwxxm:ashCloudExtent is defined with the provision of attribute srsName, attribute srsDimension must equal to 2 and attribute axisLabels must be non-empty</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M140"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M140"/>
<xsl:template match="@*|node()" priority="-2" mode="M140">
<xsl:apply-templates select="*" mode="M140"/>
</xsl:template>
<!--PATTERN VolcanicAshAdvisory.VolcanicAshObservedOrEstimatedConditions-1-->
<!--RULE -->
<xsl:template match="//iwxxm:VolcanicAshObservedOrEstimatedConditions"
priority="1000"
mode="M141">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:VolcanicAshObservedOrEstimatedConditions"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( @status = 'IDENTIFIABLE' ) then( (count(iwxxm:ashCloud) ge 1) and empty(iwxxm:windConditions) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( @status = 'IDENTIFIABLE' ) then( (count(iwxxm:ashCloud) ge 1) and empty(iwxxm:windConditions) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>VolcanicAshAdvisory.VolcanicAshObservedOrEstimatedConditions-1: When @status is equal to 'IDENTIFIABLE', iwxxm:ashCloud must exists and iwxxm:windConditions must be empty</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M141"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M141"/>
<xsl:template match="@*|node()" priority="-2" mode="M141">
<xsl:apply-templates select="*" mode="M141"/>
</xsl:template>
<!--PATTERN VolcanicAshAdvisory.VolcanicAshObservedOrEstimatedConditions-2-->
<!--RULE -->
<xsl:template match="//iwxxm:VolcanicAshObservedOrEstimatedConditions"
priority="1000"
mode="M142">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:VolcanicAshObservedOrEstimatedConditions"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( @status = 'NOT IDENTIFIABLE') then( empty(iwxxm:ashCloud) and exists(iwxxm:windConditions) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( @status = 'NOT IDENTIFIABLE') then( empty(iwxxm:ashCloud) and exists(iwxxm:windConditions) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>VolcanicAshAdvisory.VolcanicAshObservedOrEstimatedConditions-2: When @status is equal to 'NOT IDENTIFIABLE', iwxxm:ashCloud must be empty and iwxxm:windConditions shall not be empty</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M142"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M142"/>
<xsl:template match="@*|node()" priority="-2" mode="M142">
<xsl:apply-templates select="*" mode="M142"/>
</xsl:template>
<!--PATTERN SpaceWeatherAdvisory.SpaceWeatherRegion.locationIndicator-->
<!--RULE -->
<xsl:template match="//*[contains(name(),'SpaceWeatherRegion')]/iwxxm:locationIndicator"
priority="1000"
mode="M143">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//*[contains(name(),'SpaceWeatherRegion')]/iwxxm:locationIndicator"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="@xlink:href = document('codes.wmo.int-49-2-SpaceWxLocation.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="@xlink:href = document('codes.wmo.int-49-2-SpaceWxLocation.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>SpaceWeatherRegion iwxxm:locationIndicator elements should be a member of http://codes.wmo.int/49-2/SpaceWxLocation</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M143"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M143"/>
<xsl:template match="@*|node()" priority="-2" mode="M143">
<xsl:apply-templates select="*" mode="M143"/>
</xsl:template>
<!--PATTERN SpaceWeatherAdvisory.SpaceWeatherAdvisory.phenomenon-->
<!--RULE -->
<xsl:template match="//*[contains(name(),'SpaceWeatherAdvisory')]/iwxxm:phenomenon"
priority="1000"
mode="M144">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//*[contains(name(),'SpaceWeatherAdvisory')]/iwxxm:phenomenon"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="@xlink:href = document('codes.wmo.int-49-2-SpaceWxPhenomena.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="@xlink:href = document('codes.wmo.int-49-2-SpaceWxPhenomena.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>SpaceWeatherAdvisory iwxxm:phenomenon elements should be a member of http://codes.wmo.int/49-2/SpaceWxPhenomena</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M144"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M144"/>
<xsl:template match="@*|node()" priority="-2" mode="M144">
<xsl:apply-templates select="*" mode="M144"/>
</xsl:template>
<!--PATTERN SpaceWeatherAdvisory.SpaceWeatherRegion-1-->
<!--RULE -->
<xsl:template match="//iwxxm:SpaceWeatherRegion" priority="1000" mode="M145">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:SpaceWeatherRegion"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:location//*[self::aixm:horizontalProjection or self::aixm:centreline]) ) then( empty(index-of(iwxxm:location//*[self::aixm:Surface or self::aixm:Curve]/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:location//*[self::aixm:horizontalProjection or self::aixm:centreline]) ) then( empty(index-of(iwxxm:location//*[self::aixm:Surface or self::aixm:Curve]/(ancestor-or-self::*[exists(@srsName)])[last()]/(@srsDimension='2' and exists(@axisLabels)), false())) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>SpaceWeatherAdvisory.SpaceWeatherRegion-1: If a geometry of iwxxm:location is defined with the provision of attribute srsName, attribute srsDimension must equal to 2 and attribute axisLabels must be non-empty</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M145"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M145"/>
<xsl:template match="@*|node()" priority="-2" mode="M145">
<xsl:apply-templates select="*" mode="M145"/>
</xsl:template>
<!--PATTERN SpaceWeatherAdvisory.SpaceWeatherAdvisory-1-->
<!--RULE -->
<xsl:template match="//iwxxm:SpaceWeatherAdvisory" priority="1000" mode="M146">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:SpaceWeatherAdvisory"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( string-length(@translationFailedTAC) gt 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:issuingSpaceWeatherCentre) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( string-length(@translationFailedTAC) gt 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:issuingSpaceWeatherCentre) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>SpaceWeatherAdvisory.SpaceWeatherAdvisory-1: A report that failed translation should have as a minimum appropriately filled elements including Iwxxm:issueTime and iwxxm:issuingSpaceWeatherCentre</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M146"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M146"/>
<xsl:template match="@*|node()" priority="-2" mode="M146">
<xsl:apply-templates select="*" mode="M146"/>
</xsl:template>
<!--PATTERN SpaceWeatherAdvisory.SpaceWeatherAdvisory-2-->
<!--RULE -->
<xsl:template match="//iwxxm:SpaceWeatherAdvisory" priority="1000" mode="M147">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:SpaceWeatherAdvisory"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:issuingSpaceWeatherCentre) and exists(iwxxm:advisoryNumber) and exists(iwxxm:phenomenon) and exists(iwxxm:analysis) and exists(iwxxm:remarks) and exists(iwxxm:nextAdvisoryTime) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( string-length(@translationFailedTAC) eq 0 ) then( exists(iwxxm:issueTime) and exists(iwxxm:issuingSpaceWeatherCentre) and exists(iwxxm:advisoryNumber) and exists(iwxxm:phenomenon) and exists(iwxxm:analysis) and exists(iwxxm:remarks) and exists(iwxxm:nextAdvisoryTime) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>SpaceWeatherAdvisory.SpaceWeatherAdvisory-2: An ordinary report should have appropriately filled elements including Iwxxm:issueTime, iwxxm:issuingSpaceWeatherCentre, iwxxm:advisoryNumber, iwxxm:phenomenon, iwxxm:analysis, iwxxm:remarks and iwxxm:nextAdvisoryTime</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M147"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M147"/>
<xsl:template match="@*|node()" priority="-2" mode="M147">
<xsl:apply-templates select="*" mode="M147"/>
</xsl:template>
<!--PATTERN METAR_SPECI.MeteorologicalAerodromeTrendForecast.weather-->
<!--RULE -->
<xsl:template match="//*[contains(name(),'MeteorologicalAerodromeTrendForecast')]/iwxxm:weather"
priority="1000"
mode="M148">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//*[contains(name(),'MeteorologicalAerodromeTrendForecast')]/iwxxm:weather"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="@xlink:href = document('codes.wmo.int-49-2-AerodromePresentOrForecastWeather.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="@xlink:href = document('codes.wmo.int-49-2-AerodromePresentOrForecastWeather.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>MeteorologicalAerodromeTrendForecast iwxxm:weather elements should be a member of http://codes.wmo.int/49-2/AerodromePresentOrForecastWeather</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M148"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M148"/>
<xsl:template match="@*|node()" priority="-2" mode="M148">
<xsl:apply-templates select="*" mode="M148"/>
</xsl:template>
<!--PATTERN TAF.MeteorologicalAerodromeForecast.weather-->
<!--RULE -->
<xsl:template match="//*[contains(name(),'MeteorologicalAerodromeForecast')]/iwxxm:weather"
priority="1000"
mode="M149">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//*[contains(name(),'MeteorologicalAerodromeForecast')]/iwxxm:weather"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="@xlink:href = document('codes.wmo.int-49-2-AerodromePresentOrForecastWeather.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="@xlink:href = document('codes.wmo.int-49-2-AerodromePresentOrForecastWeather.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>MeteorologicalAerodromeForecast iwxxm:weather elements should be a member of http://codes.wmo.int/49-2/AerodromePresentOrForecastWeather</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M149"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M149"/>
<xsl:template match="@*|node()" priority="-2" mode="M149">
<xsl:apply-templates select="*" mode="M149"/>
</xsl:template>
<!--PATTERN Common.CloudLayer.cloudType-->
<!--RULE -->
<xsl:template match="//*[contains(name(),'CloudLayer')]/iwxxm:cloudType"
priority="1000"
mode="M150">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//*[contains(name(),'CloudLayer')]/iwxxm:cloudType"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="@xlink:href = document('codes.wmo.int-49-2-SigConvectiveCloudType.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="@xlink:href = document('codes.wmo.int-49-2-SigConvectiveCloudType.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>CloudLayer iwxxm:cloudType elements should be a member of http://codes.wmo.int/49-2/SigConvectiveCloudType</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M150"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M150"/>
<xsl:template match="@*|node()" priority="-2" mode="M150">
<xsl:apply-templates select="*" mode="M150"/>
</xsl:template>
<!--PATTERN Common.CloudLayer.amount-->
<!--RULE -->
<xsl:template match="//*[contains(name(),'CloudLayer')]/iwxxm:amount"
priority="1000"
mode="M151">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//*[contains(name(),'CloudLayer')]/iwxxm:amount"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="@xlink:href = document('codes.wmo.int-49-2-CloudAmountReportedAtAerodrome.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="@xlink:href = document('codes.wmo.int-49-2-CloudAmountReportedAtAerodrome.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] or @nilReason">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>CloudLayer iwxxm:amount elements should be a member of http://codes.wmo.int/49-2/CloudAmountReportedAtAerodrome</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M151"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M151"/>
<xsl:template match="@*|node()" priority="-2" mode="M151">
<xsl:apply-templates select="*" mode="M151"/>
</xsl:template>
<!--PATTERN Common.CloudLayer-1-->
<!--RULE -->
<xsl:template match="//iwxxm:CloudLayer" priority="1000" mode="M152">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="//iwxxm:CloudLayer"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:base) and not(iwxxm:base/@xsi:nil = 'true') ) then( (iwxxm:base/@uom = 'm') or (iwxxm:base/@uom = '[ft_i]') ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:base) and not(iwxxm:base/@xsi:nil = 'true') ) then( (iwxxm:base/@uom = 'm') or (iwxxm:base/@uom = '[ft_i]') ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>Common.CloudLayer-1: base shall be reported in metres (m) or feet ([ft_i])</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M152"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M152"/>
<xsl:template match="@*|node()" priority="-2" mode="M152">
<xsl:apply-templates select="*" mode="M152"/>
</xsl:template>
<!--PATTERN Common.Report-5-->
<!--RULE -->
<xsl:template match="//iwxxm:METAR|//iwxxm:SPECI|//iwxxm:TAF|//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET|//iwxxm:AIRMET|//iwxxm:TropicalCycloneAdvisory|//iwxxm:VolcanicAshAdvisory|//iwxxm:SpaceWeatherAdvisory"
priority="1000"
mode="M153">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:METAR|//iwxxm:SPECI|//iwxxm:TAF|//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET|//iwxxm:AIRMET|//iwxxm:TropicalCycloneAdvisory|//iwxxm:VolcanicAshAdvisory|//iwxxm:SpaceWeatherAdvisory"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( //@gml:id[not(matches(.,'uuid\.[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}'))] ) then( false() ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( //@gml:id[not(matches(.,'uuid\.[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}'))] ) then( false() ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>Common.Report-5: All gml:ids in IWXXM reports must be prefixed with 'uuid.' and must be UUID version 4</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M153"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M153"/>
<xsl:template match="@*|node()" priority="-2" mode="M153">
<xsl:apply-templates select="*" mode="M153"/>
</xsl:template>
<!--PATTERN Common.Report-4-->
<!--RULE -->
<xsl:template match="//iwxxm:METAR|//iwxxm:SPECI|//iwxxm:TAF|//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET|//iwxxm:AIRMET|//iwxxm:TropicalCycloneAdvisory|//iwxxm:VolcanicAshAdvisory|//iwxxm:SpaceWeatherAdvisory"
priority="1000"
mode="M154">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:METAR|//iwxxm:SPECI|//iwxxm:TAF|//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET|//iwxxm:AIRMET|//iwxxm:TropicalCycloneAdvisory|//iwxxm:VolcanicAshAdvisory|//iwxxm:SpaceWeatherAdvisory"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(//iwxxm:extension) ) then( sum(//iwxxm:extension/.//text()/string-length(.) ) +sum( //iwxxm:extension/.//element()/( (string-length( name() ) * 2 ) + 5 ) ) +sum( //iwxxm:extension/.//@*/( 1 + string-length(name()) + 3 + string-length(.) ) ) +sum( //iwxxm:extension/.//comment()/( string-length( . ) + 7 )) lt 5000 ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(//iwxxm:extension) ) then( sum(//iwxxm:extension/.//text()/string-length(.) ) +sum( //iwxxm:extension/.//element()/( (string-length( name() ) * 2 ) + 5 ) ) +sum( //iwxxm:extension/.//@*/( 1 + string-length(name()) + 3 + string-length(.) ) ) +sum( //iwxxm:extension/.//comment()/( string-length( . ) + 7 )) lt 5000 ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>Common.Report-4: Total size of extension content must not exceed 5000 characters per report</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M154"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M154"/>
<xsl:template match="@*|node()" priority="-2" mode="M154">
<xsl:apply-templates select="*" mode="M154"/>
</xsl:template>
<!--PATTERN Common.Report-1-->
<!--RULE -->
<xsl:template match="//iwxxm:METAR|//iwxxm:SPECI|//iwxxm:TAF|//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET|//iwxxm:AIRMET|//iwxxm:TropicalCycloneAdvisory|//iwxxm:VolcanicAshAdvisory|//iwxxm:SpaceWeatherAdvisory"
priority="1000"
mode="M155">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:METAR|//iwxxm:SPECI|//iwxxm:TAF|//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET|//iwxxm:AIRMET|//iwxxm:TropicalCycloneAdvisory|//iwxxm:VolcanicAshAdvisory|//iwxxm:SpaceWeatherAdvisory"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( @permissibleUsage = 'NON-OPERATIONAL' ) then( exists(@permissibleUsageReason) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( @permissibleUsage = 'NON-OPERATIONAL' ) then( exists(@permissibleUsageReason) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>Common.Report-1: Non-operational reports must include a permissibleUsageReason</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M155"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M155"/>
<xsl:template match="@*|node()" priority="-2" mode="M155">
<xsl:apply-templates select="*" mode="M155"/>
</xsl:template>
<!--PATTERN Common.Report-2-->
<!--RULE -->
<xsl:template match="//iwxxm:METAR|//iwxxm:SPECI|//iwxxm:TAF|//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET|//iwxxm:AIRMET|//iwxxm:TropicalCycloneAdvisory|//iwxxm:VolcanicAshAdvisory|//iwxxm:SpaceWeatherAdvisory"
priority="1000"
mode="M156">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:METAR|//iwxxm:SPECI|//iwxxm:TAF|//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET|//iwxxm:AIRMET|//iwxxm:TropicalCycloneAdvisory|//iwxxm:VolcanicAshAdvisory|//iwxxm:SpaceWeatherAdvisory"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( @permissibleUsage ='OPERATIONAL') then( empty(@permissibleUsageReason) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( @permissibleUsage ='OPERATIONAL') then( empty(@permissibleUsageReason) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>Common.Report-2: Operational reports should not include a permissibleUsageReason</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M156"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M156"/>
<xsl:template match="@*|node()" priority="-2" mode="M156">
<xsl:apply-templates select="*" mode="M156"/>
</xsl:template>
<!--PATTERN Common.Report-3-->
<!--RULE -->
<xsl:template match="//iwxxm:METAR|//iwxxm:SPECI|//iwxxm:TAF|//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET|//iwxxm:AIRMET|//iwxxm:TropicalCycloneAdvisory|//iwxxm:VolcanicAshAdvisory|//iwxxm:SpaceWeatherAdvisory"
priority="1000"
mode="M157">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:METAR|//iwxxm:SPECI|//iwxxm:TAF|//iwxxm:SIGMET|//iwxxm:VolcanicAshSIGMET|//iwxxm:TropicalCycloneSIGMET|//iwxxm:AIRMET|//iwxxm:TropicalCycloneAdvisory|//iwxxm:VolcanicAshAdvisory|//iwxxm:SpaceWeatherAdvisory"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(@translatedBulletinID) or exists(@translatedBulletinReceptionTime) or exists(@translationCentreDesignator) or exists(@translationCentreName) or exists(@translationTime) or exists(@translationFailedTAC)) then( exists(@translatedBulletinID) and exists(@translatedBulletinReceptionTime) and exists(@translationCentreDesignator) and exists(@translationCentreName) and exists(@translationTime) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(@translatedBulletinID) or exists(@translatedBulletinReceptionTime) or exists(@translationCentreDesignator) or exists(@translationCentreName) or exists(@translationTime) or exists(@translationFailedTAC)) then( exists(@translatedBulletinID) and exists(@translatedBulletinReceptionTime) and exists(@translationCentreDesignator) and exists(@translationCentreName) and exists(@translationTime) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>Common.Report-3: Translated reports must include @translatedBulletinID, @translatedBulletinReceptionTime, @translationCentreDesignator, @translationCentreName, @translationTime and optionally @translationFailedTAC if translation failed</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M157"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M157"/>
<xsl:template match="@*|node()" priority="-2" mode="M157">
<xsl:apply-templates select="*" mode="M157"/>
</xsl:template>
<!--PATTERN Common.AerodromeCloudForecast-2-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeCloudForecast" priority="1000" mode="M158">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeCloudForecast"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="(if( exists(iwxxm:layer) ) then( empty(iwxxm:verticalVisibility) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="(if( exists(iwxxm:layer) ) then( empty(iwxxm:verticalVisibility) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>Common.AerodromeCloudForecast-2: If cloud layers are reported vertical visibility should be empty</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M158"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M158"/>
<xsl:template match="@*|node()" priority="-2" mode="M158">
<xsl:apply-templates select="*" mode="M158"/>
</xsl:template>
<!--PATTERN Common.AerodromeCloudForecast-1-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeCloudForecast" priority="1000" mode="M159">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeCloudForecast"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="(if( exists(iwxxm:verticalVisibility) ) then( empty(iwxxm:layer) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="(if( exists(iwxxm:verticalVisibility) ) then( empty(iwxxm:layer) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>Common.AerodromeCloudForecast-1: If vertical visibility is reported cloud layers should be empty</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M159"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M159"/>
<xsl:template match="@*|node()" priority="-2" mode="M159">
<xsl:apply-templates select="*" mode="M159"/>
</xsl:template>
<!--PATTERN Common.AerodromeCloudForecast-3-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeCloudForecast" priority="1000" mode="M160">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeCloudForecast"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:verticalVisibility) and not(iwxxm:verticalVisibility/@xsi:nil = 'true') ) then( (iwxxm:verticalVisibility/@uom = 'm') or (iwxxm:verticalVisibility/@uom = '[ft_i]') ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:verticalVisibility) and not(iwxxm:verticalVisibility/@xsi:nil = 'true') ) then( (iwxxm:verticalVisibility/@uom = 'm') or (iwxxm:verticalVisibility/@uom = '[ft_i]') ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>Common.AerodromeCloudForecast-3: verticalVisibility shall be reported in metres (m) or feet ([ft_i])</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M160"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M160"/>
<xsl:template match="@*|node()" priority="-2" mode="M160">
<xsl:apply-templates select="*" mode="M160"/>
</xsl:template>
<!--PATTERN Common.AerodromeSurfaceWindForecast-1-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeSurfaceWindForecast"
priority="1000"
mode="M161">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeSurfaceWindForecast"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( @variableDirection = 'true' ) then( empty(iwxxm:meanWindDirection) ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( @variableDirection = 'true' ) then( empty(iwxxm:meanWindDirection) ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>Common.AerodromeSurfaceWindForecast-1: Wind direction is not reported when variable winds are indicated</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M161"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M161"/>
<xsl:template match="@*|node()" priority="-2" mode="M161">
<xsl:apply-templates select="*" mode="M161"/>
</xsl:template>
<!--PATTERN Common.AerodromeSurfaceWindTrendForecast-1-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeSurfaceWindTrendForecast|//iwxxm:AerodromeSurfaceWindForecast"
priority="1000"
mode="M162">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeSurfaceWindTrendForecast|//iwxxm:AerodromeSurfaceWindForecast"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:meanWindDirection) and not(iwxxm:meanWindDirection/@xsi:nil = 'true') ) then( iwxxm:meanWindDirection/@uom = 'deg' ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:meanWindDirection) and not(iwxxm:meanWindDirection/@xsi:nil = 'true') ) then( iwxxm:meanWindDirection/@uom = 'deg' ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>Common.AerodromeSurfaceWindTrendForecast-1: meanWindDirection shall be reported in degrees (deg)</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M162"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M162"/>
<xsl:template match="@*|node()" priority="-2" mode="M162">
<xsl:apply-templates select="*" mode="M162"/>
</xsl:template>
<!--PATTERN Common.AerodromeSurfaceWindTrendForecast-2-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeSurfaceWindTrendForecast|//iwxxm:AerodromeSurfaceWindForecast"
priority="1000"
mode="M163">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeSurfaceWindTrendForecast|//iwxxm:AerodromeSurfaceWindForecast"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:meanWindSpeed) and not(iwxxm:meanWindSpeed/@xsi:nil = 'true') ) then( (iwxxm:meanWindSpeed/@uom = 'm/s') or (iwxxm:meanWindSpeed/@uom = '[kn_i]') ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:meanWindSpeed) and not(iwxxm:meanWindSpeed/@xsi:nil = 'true') ) then( (iwxxm:meanWindSpeed/@uom = 'm/s') or (iwxxm:meanWindSpeed/@uom = '[kn_i]') ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>Common.AerodromeSurfaceWindTrendForecast-2: meanWindSpeed shall be reported in metres per second (m/s) or knots ([kn_i])</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M163"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M163"/>
<xsl:template match="@*|node()" priority="-2" mode="M163">
<xsl:apply-templates select="*" mode="M163"/>
</xsl:template>
<!--PATTERN Common.AerodromeSurfaceWindTrendForecast-3-->
<!--RULE -->
<xsl:template match="//iwxxm:AerodromeSurfaceWindTrendForecast|//iwxxm:AerodromeSurfaceWindForecast"
priority="1000"
mode="M164">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
context="//iwxxm:AerodromeSurfaceWindTrendForecast|//iwxxm:AerodromeSurfaceWindForecast"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(iwxxm:windGustSpeed) and not(iwxxm:windGustSpeed/@xsi:nil = 'true') ) then( (iwxxm:windGustSpeed/@uom = 'm/s') or (iwxxm:windGustSpeed/@uom = '[kn_i]') ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(iwxxm:windGustSpeed) and not(iwxxm:windGustSpeed/@xsi:nil = 'true') ) then( (iwxxm:windGustSpeed/@uom = 'm/s') or (iwxxm:windGustSpeed/@uom = '[kn_i]') ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>Common.AerodromeSurfaceWindTrendForecast-3: windGustSpeed shall be reported in metres per second (m/s) or knots ([kn_i])</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M164"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M164"/>
<xsl:template match="@*|node()" priority="-2" mode="M164">
<xsl:apply-templates select="*" mode="M164"/>
</xsl:template>
<!--PATTERN IWXXM.nilReasonCheck-->
<!--RULE -->
<xsl:template match="//iwxxm:*" priority="1000" mode="M165">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="//iwxxm:*"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="( if( exists(@nilReason) ) then( @nilReason = document('codes.wmo.int-common-nil.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] ) else( true() ) )"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="( if( exists(@nilReason) ) then( @nilReason = document('codes.wmo.int-common-nil.rdf')/rdf:RDF/*/skos:member/*/@*[local-name()='about'] ) else( true() ) )">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>IWXXM.nilReasonCheck: nilReason attributes should be a member of http://codes.wmo.int/common/nil</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M165"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M165"/>
<xsl:template match="@*|node()" priority="-2" mode="M165">
<xsl:apply-templates select="*" mode="M165"/>
</xsl:template>
<!--PATTERN IWXXM.ExtensionAlwaysLast-->
<!--RULE -->
<xsl:template match="//iwxxm:extension" priority="1000" mode="M166">
<svrl:fired-rule xmlns:svrl="http://purl.oclc.org/dsdl/svrl" context="//iwxxm:extension"/>
<!--ASSERT -->
<xsl:choose>
<xsl:when test="following-sibling::*[1][self::iwxxm:extension] or not(following-sibling::*)"/>
<xsl:otherwise>
<svrl:failed-assert xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
test="following-sibling::*[1][self::iwxxm:extension] or not(following-sibling::*)">
<xsl:attribute name="location">
<xsl:apply-templates select="." mode="schematron-select-full-path"/>
</xsl:attribute>
<svrl:text>IWXXM.ExtensionAlwaysLast: Extension elements should be the last elements in their parents</svrl:text>
</svrl:failed-assert>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="*" mode="M166"/>
</xsl:template>
<xsl:template match="text()" priority="-1" mode="M166"/>
<xsl:template match="@*|node()" priority="-2" mode="M166">
<xsl:apply-templates select="*" mode="M166"/>
</xsl:template>
</xsl:stylesheet>
    (1-1/1)