<package xmlns="http://www.occamlab.com/ctl"
         xmlns:ccf="http://www.opengis.net/cite/complex"
         xmlns:cdf="http://www.opengis.net/cite/data"
         xmlns:cgf="http://www.opengis.net/cite/geometry"
         xmlns:ctl="http://www.occamlab.com/ctl"
         xmlns:example="http://www.somehost.com/example"
         xmlns:gml="http://www.occamlab.com/gml"
         xmlns:ogc="http://www.opengis.net/ogc"
         xmlns:functions="http://www.occamlab.com/wms-1.1.1/src/ctl/functions.xml"
         xmlns:parsers="http://www.occamlab.com/te/parsers"
         xmlns:saxon="http://saxon.sf.net/"
         xmlns:wms="http://www.opengis.net/wms"
         xmlns:xlink="http://www.w3.org/1999/xlink"
         xmlns:xs="http://www.w3.org/2001/XMLSchema"
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   <parser name="wms:CustomTransformer">
      <java class="com.occamlab.te.parsers.CustomTransformer" method="parse"/>
   </parser>
   <parser name="parsers:HeadersParser">
      <java class="com.occamlab.te.parsers.HeadersParser" method="parse"/>
   </parser>
   <parser name="example:ImageStats">
      <java class="org.opengroup.ts.handlers.extensions.ogc.ResponseTransformer"
            initialized="true"
            method="translate">
         <with-param name="class">org.opengis.cite.transformers.ImageStats</with-param>
      </java>
   </parser>
   <parser name="example:StringLength">
      <java class="org.opengroup.ts.handlers.extensions.ogc.ResponseTransformer"
            initialized="true"
            method="translate">
         <with-param name="class">org.opengis.cite.transformers.StringLength</with-param>
      </java>
   </parser>
   <parser name="wms:GMLValidatingParser">
      <java class="com.occamlab.te.parsers.GMLValidatingParser" initialized="true"
            method="parse">
         <with-param name="documentlocations">
            <documentlocations xmlns="">
               <parm>
                  <name>http://www.galdosinc.com/xml/properties/dtdLocation/WMT_MS_Capabilities</name>
                  <value>http://schemas.opengis.net/wms/1.1.1/capabilities_1_1_1.dtd</value>
               </parm>
            </documentlocations>
         </with-param>
      </java>
   </parser>
   <ctl:suite name="wms:main_wms">
      <title>Web Map Service (WMS) 1.1.1 Test Suite</title>
      <description>Validates that a WMS 1.1.1 is compliant with the spec.</description>
      <ctl:link>data/data-wms-1.1.1.zip</ctl:link>
      <starting-test>wms:wms_main</starting-test>
      <ctl:form xmlns="">
         <body>
            <h3>Web Map Service</h3>
            <p>The Web Map Service test scripts are designed to test WMS
implementations based on the WMS 1.1.1 specification.</p>
            <p>Detailed information about the test suite is available <a href="index.html" target="otherwindow">here</a>.</p>
            <p>The number of tests
actually executed will depend on the capabilities advertised in the
capabilities URL supplied below as well as the other options
selected below.</p>
            <p>Many of the tests require implementation of the standard dataset.
Implementation of the dataset is required for certification.</p>
            <h4>Capabilities Setup</h4>
            <p>Enter a capabilities document URL below. This may be the URL to
a static capabilities document, or a GetCapabilities request from a
WMS. A typical GetCapabilities request will take this form:</p>
            <pre>
    http://hostname/path?SERVICE=WMS&amp;REQUEST=GetCapabilities&amp;VERSION=1.1.1
        </pre>
            <blockquote>
               <table border="3" padding="3">
                  <tr>
                     <td align="center">
                        <input name="VAR_WMS_CAPABILITIES_URL" size="100" type="text" value=""/>
                     </td>
                     <td align="left">Capabilities URL</td>
                  </tr>
               </table>
            </blockquote>
            <h4>UpdateSequence Values</h4>
            <p>The WMS spec allows servers to use an UpdateSequence value for
maintaining cache consistency as described <a href="http://cite.opengeospatial.org/OGCTestData/wms/1.1.1/spec/wms1.1.1.html#wmsops.getcapabilities.params.updatesequence"
                  target="otherwindow">
here</a>. If the server advertises an UpdateSequence value and the
Automatic option is selected below, the test suite will attempt to
test the UpdateSequence behavior automatically. However, the
lexical ordering of UpdateSequence values is determined by the
server, so the tests may not always be correct. If you suspect a
problem, select the Manual option and enter the updateSequence
values requested below.</p>
            <blockquote>
               <table border="3" padding="3">
                  <tr>
                     <td align="center">
                        <input checked="checked" name="updatesequence" type="radio"
                               value="auto_updatesequence"/>
                     </td>
                     <td align="left">Automatic - The updateSequence tests will use
automatically generated updateSequence values</td>
                  </tr>
                  <tr>
                     <td align="center">
                        <input name="updatesequence" type="radio" value="manual_updatesequence"/>
                     </td>
                     <td align="left">Manual - The updateSequence tests will use the
values supplied below</td>
                  </tr>
               </table>
            </blockquote>
            <p>(Fill in these boxes only if the Manual option is selected
above)</p>
            <blockquote>
               <table border="3" padding="3">
                  <tr>
                     <td align="center">
                        <input name="VAR_HIGH_UPDATESEQUENCE" size="25" type="text" value=""/>
                     </td>
                     <td align="left">A value that is lexically higher than the current
updateSequence value</td>
                  </tr>
                  <tr>
                     <td align="center">
                        <input name="VAR_LOW_UPDATESEQUENCE" size="25" type="text" value=""/>
                     </td>
                     <td align="left">A value that is lexically lower than the current
updateSequence value</td>
                  </tr>
               </table>
            </blockquote>
            <h4>Certification Profile</h4>
            <p>Certification is available for servers that implement either the
BASIC profile or the QUERYABLE profile. In order to be certified,
the server must implement the requirements for the profile as
described <a href="/tsOGC/ViewTestSpec?SPEC=Web_Map_Server.html&amp;TYPE=AVAILABLE&amp;sesstype=OGC#A.-Certification%20Requirements"
                  target="otherwindow">
here</a>. Select which profile you want to test below.</p>
            <blockquote>
               <table border="3" padding="3">
                  <tr>
                     <td align="center">
                        <input name="CERT_PROFILE" type="radio" value="no_profile"/>
                     </td>
                     <td align="left">NONE - Do not certify that the server meets
requirements for any test profile</td>
                  </tr>
                  <tr>
                     <td align="center">
                        <input name="CERT_PROFILE" type="radio" value="basic_profile"/>
                     </td>
                     <td align="left">BASIC - Certify that the server meets all
requirements for the BASIC profile</td>
                  </tr>
                  <tr>
                     <td align="center">
                        <input checked="checked" name="CERT_PROFILE" type="radio" value="queryable_profile"/>
                     </td>
                     <td align="left">QUERYABLE - Certify that the server meets all
requirements for the QUERYABLE profile</td>
                  </tr>
               </table>
            </blockquote>
            <h4>Optional Tests</h4>
            <p>The remaining tests are not required for certification, but may
prove informative or be useful as a debugging aid.</p>
            <p>Recommendation Support</p>
            <blockquote>
               <table border="3" padding="3">
                  <tr>
                     <td align="center">
                        <input name="recommended" type="checkbox" value="recommended"/>
                     </td>
                     <td align="left">Verify that the server supports fuctionality which
is recommended in the spec, but not required</td>
                  </tr>
               </table>
            </blockquote>
            <p>GML FeatureInfo</p>
            <blockquote>
               <table border="3" padding="3">
                  <tr>
                     <td align="center">
                        <input name="testgml" type="checkbox" value="testgml"/>
                     </td>
                     <td align="left">Verify that the server supports the
application/vnd.ogc.gml GetFeatureInfo format. This test will pass
only if the GML instance document returned contains a
schemaLocation attribute to reference its schema, and validates
correctly.</td>
                  </tr>
               </table>
            </blockquote>
            <p>Fees and Access Constraints</p>
            <blockquote>
               <table border="3" padding="3">
                  <tr>
                     <td align="center">
                        <input name="free" type="checkbox" value="free"/>
                     </td>
                     <td align="left">Verify that the server advertises that it does not
require any fees or access constraints</td>
                  </tr>
               </table>
            </blockquote>
            <p>BoundingBox Constraints</p>
            <blockquote>
               <table border="3" padding="3">
                  <tr>
                     <td align="center">
                        <input name="B_BOX_CONSTRAINT" type="radio" value="loosebboxconstraints"/>
                     </td>
                     <td align="left">LOOSE - Verify that the server returns map data
from the western hemisphere for area beyond 180 degrees east
longitude</td>
                  </tr>
                  <tr>
                     <td align="center">
                        <input name="B_BOX_CONSTRAINT" type="radio" value="strictbboxconstraints"/>
                     </td>
                     <td align="left">STRICT - Verify that the server does not return
map data from the western hemisphere for area beyond 180 degrees
east longitude</td>
                  </tr>
                  <tr>
                     <td align="center">
                        <input checked="checked" name="B_BOX_CONSTRAINT" type="radio"
                               value="eitherbboxconstraint"/>
                     </td>
                     <td align="left">EITHER - Do not test area beyond 180 degrees east
longitude</td>
                  </tr>
               </table>
            </blockquote>
            <p/>
            <input type="submit" value="OK"/>
         </body>
      </ctl:form>
   </ctl:suite>
   <test name="wms:wms_main">
      <param name="VAR_WMS_CAPABILITIES_URL"/>
      <param name="updatesequence"/>
      <param name="VAR_HIGH_UPDATESEQUENCE"/>
      <param name="VAR_LOW_UPDATESEQUENCE"/>
      <param name="CERT_PROFILE"/>
      <param name="recommended"/>
      <param name="testgml"/>
      <param name="free"/>
      <param name="B_BOX_CONSTRAINT"/>
      <assertion>This WMS is valid</assertion>
      <code>
         <xsl:variable name="VAR_WMS_CAPABILITIES">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_CAPABILITIES_URL"/>
               </url>
               <method>get</method>
            </request>
         </xsl:variable>
         <xsl:variable name="auto_updatesequence" select="$updatesequence='auto_updatesequence'"/>
         <xsl:variable name="manual_updatesequence" select="$updatesequence='manual_updatesequence'"/>
         <xsl:variable name="VAR_HIGH_UPDATESEQUENCE">
            <xsl:value-of select="$VAR_HIGH_UPDATESEQUENCE"/>
         </xsl:variable>
         <xsl:variable name="VAR_LOW_UPDATESEQUENCE">
            <xsl:value-of select="$VAR_LOW_UPDATESEQUENCE"/>
         </xsl:variable>
         <xsl:variable name="no_profile" select="$CERT_PROFILE='no_profile'"/>
         <xsl:variable name="basic_profile" select="$CERT_PROFILE='basic_profile'"/>
         <xsl:variable name="queryable_profile" select="$CERT_PROFILE='queryable_profile'"/>
         <xsl:variable name="recommended" select="$recommended='recommended'"/>
         <xsl:variable name="testgml" select="$testgml='testgml'"/>
         <xsl:variable name="free" select="$free='free'"/>
         <xsl:variable name="loosebboxconstraints" select="$B_BOX_CONSTRAINT='loosebboxconstraints'"/>
         <xsl:variable name="strictbboxconstraints" select="$B_BOX_CONSTRAINT='strictbboxconstraints'"/>
         <xsl:variable name="eitherbboxconstraint" select="$B_BOX_CONSTRAINT='eitherbboxconstraint'"/>
         <xsl:for-each select="$VAR_WMS_CAPABILITIES">
            <xsl:variable name="VAR_WMS_VERSION">
               <xsl:value-of select="string('1.1.1')"/>
            </xsl:variable>
            <xsl:variable name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL">
               <xsl:value-of select="functions:append-kvp(/WMT_MS_Capabilities/Capability/Request/GetCapabilities/DCPType/HTTP/Get/OnlineResource/@*[local-name() = 'href'], '')"/>
            </xsl:variable>
            <xsl:variable name="VAR_WMS_GET_MAP_HTTP_GET_URL">
               <xsl:value-of select="functions:append-kvp(/WMT_MS_Capabilities/Capability/Request/GetMap/DCPType/HTTP/Get/OnlineResource/@*[local-name() = 'href'], '')"/>
            </xsl:variable>
            <xsl:variable name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL">
               <xsl:value-of select="functions:append-kvp(/WMT_MS_Capabilities/Capability/Request/GetFeatureInfo/DCPType/HTTP/Get/OnlineResource/@*[local-name() = 'href'], '')"/>
            </xsl:variable>
            <xsl:variable name="VAR_CURRENT_UPDATESEQUENCE">
               <xsl:value-of select="string(/WMT_MS_Capabilities/@updateSequence)"/>
            </xsl:variable>
            <xsl:variable name="VAR_AUTO_HIGH_UPDATESEQUENCE">
               <xsl:value-of select="functions:inc(/WMT_MS_Capabilities/@updateSequence, 1)"/>
            </xsl:variable>
            <xsl:variable name="VAR_AUTO_LOW_UPDATESEQUENCE">
               <xsl:value-of select="functions:inc(/WMT_MS_Capabilities/@updateSequence, -1)"/>
            </xsl:variable>
            <xsl:variable name="VAR_IMAGE_FORMAT">
               <xsl:value-of select="string(/WMT_MS_Capabilities/Capability/Request/GetMap/Format[1])"/>
            </xsl:variable>
            <xsl:variable name="VAR_READABLE_IMAGE_FORMAT">
               <xsl:value-of select="string((/WMT_MS_Capabilities/Capability/Request/GetMap/Format[. = 'image/gif' or .='image/png' or .='image/jpeg'])[1])"/>
            </xsl:variable>
            <xsl:variable name="VAR_LOSSLESS_FORMAT">
               <xsl:value-of select="string((/WMT_MS_Capabilities/Capability/Request/GetMap/Format[. = 'image/gif' or .='image/png'])[1])"/>
            </xsl:variable>
            <xsl:variable name="VAR_TRANSPARENT_FORMAT">
               <xsl:value-of select="string((/WMT_MS_Capabilities/Capability/Request/GetMap/Format[. = 'image/gif' or .='image/png'])[1])"/>
            </xsl:variable>
            <xsl:variable name="VAR_INHERENT_STYLE">
               <xsl:value-of select="string(//Layer[starts-with(Title, 'cite') and position()=1]/Style[1]/Name)"/>
            </xsl:variable>
            <xsl:variable name="VAR_LAYER_WITH_INHERENT_STYLE">
               <xsl:value-of select="string(//Layer[starts-with(Title, 'cite') and Style and position()=1]/Name)"/>
            </xsl:variable>
            <xsl:variable name="VAR_INHERITED_STYLE">
               <xsl:value-of select="string(//Layer[starts-with(Title, 'cite') and not(Style)]/ancestor::Layer/Style[1]/Name)"/>
            </xsl:variable>
            <xsl:variable name="VAR_LAYER_WITH_INHERITED_STYLE">
               <xsl:value-of select="string(//Layer[starts-with(Title, 'cite') and not(Style) and ancestor::Layer/Style]/Name)"/>
            </xsl:variable>
            <xsl:variable name="VAR_STYLE">
               <xsl:value-of select="string((//Layer[starts-with(Title, 'cite')]/ancestor-or-self::Layer/Style[1]/Name)[1])"/>
            </xsl:variable>
            <xsl:variable name="VAR_LAYER_WITH_STYLE">
               <xsl:value-of select="string((//Layer[starts-with(Title, 'cite') and ancestor-or-self::Layer/Style]/Name)[1])"/>
            </xsl:variable>
            <xsl:variable name="VAR_LAYER_WITH_INHERENT_SRS">
               <xsl:value-of select="string((//Layer[starts-with(Title, 'cite') and SRS[contains(., 'EPSG:4326')]])[1]/Name)"/>
            </xsl:variable>
            <xsl:variable name="VAR_LAYER_WITH_INHERITED_SRS">
               <xsl:value-of select="string((//Layer[starts-with(Title, 'cite') and not(SRS[contains(., 'EPSG:4326')])])[1]/Name)"/>
            </xsl:variable>
            <xsl:variable name="VAR_UNQUERYABLE_LAYER">
               <xsl:value-of select="string(//Layer[starts-with(Title, 'cite') and @queryable='0'][1]/Name)"/>
            </xsl:variable>
            <xsl:variable name="VAR_STDDATA_EXISTS">
               <xsl:value-of select="count(//Layer[(Title = 'cite:BasicPolygons' or    Title = 'cite:Bridges' or    Title = 'cite:Buildings' or    Title = 'cite:DividedRoutes' or    Title = 'cite:Forests' or    Title = 'cite:Lakes' or    Title = 'cite:MapNeatline' or    Title = 'cite:NamedPlaces' or    Title = 'cite:Ponds' or    Title = 'cite:RoadSegments' or    Title = 'cite:Streams')    and ancestor-or-self::Layer/SRS[contains(., 'EPSG:4326')]    and not(@noSubsets = 1)    and (not(@fixedWidth) or @fixedWidth = 0)    and (not(@fixedHeight) or @fixedHeight = 0)]) = 11   "/>
            </xsl:variable>
            <xsl:variable name="VAR_QUERYABLE_LAYERS_EXIST">
               <xsl:value-of select="count(//Layer[Title = 'cite:BasicPolygons' and @queryable = '1']) &gt;0 and    count(//Layer[Title = 'cite:Forests' and @queryable = '1']) &gt;0 and    count(//Layer[Title = 'cite:Lakes' and @queryable = '1']) &gt;0 and    count(//Layer[Title = 'cite:NamedPlaces' and @queryable = '1']) &gt;0 and    count(//Layer[Title = 'cite:Ponds' and @queryable = '1']) &gt;0 and    count(/WMT_MS_Capabilities/Capability/Request/GetFeatureInfo) &gt;0   "/>
            </xsl:variable>
            <xsl:variable name="VAR_BASIC_POLYGONS">
               <xsl:value-of select="string(//Layer[Title = 'cite:BasicPolygons']/Name)"/>
            </xsl:variable>
            <xsl:variable name="VAR_BRIDGES">
               <xsl:value-of select="string(//Layer[Title = 'cite:Bridges']/Name)"/>
            </xsl:variable>
            <xsl:variable name="VAR_BUILDINGS">
               <xsl:value-of select="string(//Layer[Title = 'cite:Buildings']/Name)"/>
            </xsl:variable>
            <xsl:variable name="VAR_DIVIDED_ROUTES">
               <xsl:value-of select="string(//Layer[Title = 'cite:DividedRoutes']/Name)"/>
            </xsl:variable>
            <xsl:variable name="VAR_FORESTS">
               <xsl:value-of select="string(//Layer[Title = 'cite:Forests']/Name)"/>
            </xsl:variable>
            <xsl:variable name="VAR_LAKES">
               <xsl:value-of select="string(//Layer[Title = 'cite:Lakes']/Name)"/>
            </xsl:variable>
            <xsl:variable name="VAR_MAP_NEATLINE">
               <xsl:value-of select="string(//Layer[Title = 'cite:MapNeatline']/Name)"/>
            </xsl:variable>
            <xsl:variable name="VAR_NAMED_PLACES">
               <xsl:value-of select="string(//Layer[Title = 'cite:NamedPlaces']/Name)"/>
            </xsl:variable>
            <xsl:variable name="VAR_PONDS">
               <xsl:value-of select="string(//Layer[Title = 'cite:Ponds']/Name)"/>
            </xsl:variable>
            <xsl:variable name="VAR_ROAD_SEGMENTS">
               <xsl:value-of select="string(//Layer[Title = 'cite:RoadSegments']/Name)"/>
            </xsl:variable>
            <xsl:variable name="VAR_STREAMS">
               <xsl:value-of select="string(//Layer[Title = 'cite:Streams']/Name)"/>
            </xsl:variable>
            <xsl:variable name="VAR_GET_FEATURE_INFO_FORMAT"><!-- remove white space --><xsl:value-of select="replace((//GetFeatureInfo/Format[(position() = 1 and last() = 1) or . != 'application/vnd.ogc.gml'])[1], '\s+', '')"/>
            </xsl:variable>
            <xsl:variable name="updatesequence" select="string-length($VAR_CURRENT_UPDATESEQUENCE) &gt;0"/>
            <xsl:variable name="expression">
               <xsl:value-of select="$VAR_STDDATA_EXISTS"/>()</xsl:variable>
            <xsl:variable name="stddata" select="saxon:evaluate($expression)"/>
            <xsl:variable name="expression">
               <xsl:value-of select="$VAR_QUERYABLE_LAYERS_EXIST"/>()</xsl:variable>
            <xsl:variable name="queryable" select="saxon:evaluate($expression)"/>
            <xsl:variable name="namedstyle" select="string-length($VAR_STYLE) &gt;0"/>
            <xsl:variable name="inherentstyle" select="string-length($VAR_INHERENT_STYLE) &gt;0"/>
            <xsl:variable name="inheritedstyle" select="string-length($VAR_INHERITED_STYLE) &gt;0"/>
            <xsl:variable name="inherentsrs" select="string-length($VAR_LAYER_WITH_INHERENT_SRS) &gt;0"/>
            <xsl:variable name="inheritedsrs" select="string-length($VAR_LAYER_WITH_INHERITED_SRS) &gt;0"/>
            <xsl:variable name="gif"
                          select="count(/WMT_MS_Capabilities/Capability/Request/GetMap[Format = 'image/gif']) &gt;0"/>
            <xsl:variable name="jpeg"
                          select="count(/WMT_MS_Capabilities/Capability/Request/GetMap[Format = 'image/jpeg']) &gt;0"/>
            <xsl:variable name="png"
                          select="count(/WMT_MS_Capabilities/Capability/Request/GetMap[Format = 'image/png']) &gt;0"/>
            <xsl:variable name="transparency"
                          select="count(/WMT_MS_Capabilities/Capability/Request/GetMap[Format = 'image/gif' or Format = 'image/png']) &gt;0"/>
            <xsl:variable name="readable"
                          select="count(/WMT_MS_Capabilities/Capability/Request/GetMap[Format = 'image/gif' or Format = 'image/png' or Format = 'image/jpeg']) &gt;0"/>
            <xsl:variable name="lossless"
                          select="count(/WMT_MS_Capabilities/Capability/Request/GetMap[Format = 'image/gif' or Format = 'image/png']) &gt;0"/>
            <xsl:variable name="se_inimage"
                          select="count(/WMT_MS_Capabilities/Capability/Exception[Format = 'application/vnd.ogc.se_inimage']) &gt;0"/>
            <xsl:variable name="se_blank"
                          select="count(/WMT_MS_Capabilities/Capability/Exception[Format = 'application/vnd.ogc.se_blank']) &gt;0"/>
            <xsl:variable name="getfeatureinfo"
                          select="count(/WMT_MS_Capabilities/Capability/Request/GetFeatureInfo) &gt;0"/>
            <xsl:variable name="unqueryablelayer" select="string-length($VAR_UNQUERYABLE_LAYER) &gt;0"/>
            <xsl:variable name="gml"
                          select="count(/WMT_MS_Capabilities/Capability/Request/GetFeatureInfo/Format[. = 'application/vnd.ogc.gml']) &gt;0"/>
            <xsl:variable name="hosturl">
               <xsl:value-of select="string('cite.opengeospatial.org')"/>
            </xsl:variable>
            <!--
            <message>
               <xsl:value-of select="concat('auto_updatesequence: ', $auto_updatesequence)"/>
            </message>
            <message>
               <xsl:value-of select="concat('manual_updatesequence: ', $manual_updatesequence)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_HIGH_UPDATESEQUENCE: ', $VAR_HIGH_UPDATESEQUENCE)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_LOW_UPDATESEQUENCE: ', $VAR_LOW_UPDATESEQUENCE)"/>
            </message>
            <message>
               <xsl:value-of select="concat('no_profile: ', $no_profile)"/>
            </message>
            <message>
               <xsl:value-of select="concat('basic_profile: ', $basic_profile)"/>
            </message>
            <message>
               <xsl:value-of select="concat('queryable_profile: ', $queryable_profile)"/>
            </message>
            <message>
               <xsl:value-of select="concat('recommended: ', $recommended)"/>
            </message>
            <message>
               <xsl:value-of select="concat('testgml: ', $testgml)"/>
            </message>
            <message>
               <xsl:value-of select="concat('free: ', $free)"/>
            </message>
            <message>
               <xsl:value-of select="concat('loosebboxconstraints: ', $loosebboxconstraints)"/>
            </message>
            <message>
               <xsl:value-of select="concat('strictbboxconstraints: ', $strictbboxconstraints)"/>
            </message>
            <message>
               <xsl:value-of select="concat('eitherbboxconstraint: ', $eitherbboxconstraint)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_WMS_VERSION: ', $VAR_WMS_VERSION)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL: ', $VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_WMS_GET_MAP_HTTP_GET_URL: ', $VAR_WMS_GET_MAP_HTTP_GET_URL)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL: ', $VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_CURRENT_UPDATESEQUENCE: ', $VAR_CURRENT_UPDATESEQUENCE)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_AUTO_HIGH_UPDATESEQUENCE: ', $VAR_AUTO_HIGH_UPDATESEQUENCE)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_AUTO_LOW_UPDATESEQUENCE: ', $VAR_AUTO_LOW_UPDATESEQUENCE)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_IMAGE_FORMAT: ', $VAR_IMAGE_FORMAT)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_READABLE_IMAGE_FORMAT: ', $VAR_READABLE_IMAGE_FORMAT)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_LOSSLESS_FORMAT: ', $VAR_LOSSLESS_FORMAT)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_TRANSPARENT_FORMAT: ', $VAR_TRANSPARENT_FORMAT)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_INHERENT_STYLE: ', $VAR_INHERENT_STYLE)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_LAYER_WITH_INHERENT_STYLE: ', $VAR_LAYER_WITH_INHERENT_STYLE)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_INHERITED_STYLE: ', $VAR_INHERITED_STYLE)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_LAYER_WITH_INHERITED_STYLE: ', $VAR_LAYER_WITH_INHERITED_STYLE)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_STYLE: ', $VAR_STYLE)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_LAYER_WITH_STYLE: ', $VAR_LAYER_WITH_STYLE)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_LAYER_WITH_INHERENT_SRS: ', $VAR_LAYER_WITH_INHERENT_SRS)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_LAYER_WITH_INHERITED_SRS: ', $VAR_LAYER_WITH_INHERITED_SRS)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_UNQUERYABLE_LAYER: ', $VAR_UNQUERYABLE_LAYER)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_STDDATA_EXISTS: ', $VAR_STDDATA_EXISTS)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_QUERYABLE_LAYERS_EXIST: ', $VAR_QUERYABLE_LAYERS_EXIST)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_BASIC_POLYGONS: ', $VAR_BASIC_POLYGONS)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_BRIDGES: ', $VAR_BRIDGES)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_BUILDINGS: ', $VAR_BUILDINGS)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_DIVIDED_ROUTES: ', $VAR_DIVIDED_ROUTES)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_FORESTS: ', $VAR_FORESTS)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_LAKES: ', $VAR_LAKES)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_MAP_NEATLINE: ', $VAR_MAP_NEATLINE)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_NAMED_PLACES: ', $VAR_NAMED_PLACES)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_PONDS: ', $VAR_PONDS)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_ROAD_SEGMENTS: ', $VAR_ROAD_SEGMENTS)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_STREAMS: ', $VAR_STREAMS)"/>
            </message>
            <message>
               <xsl:value-of select="concat('VAR_GET_FEATURE_INFO_FORMAT: ', $VAR_GET_FEATURE_INFO_FORMAT)"/>
            </message>
            <message>
               <xsl:value-of select="concat('updatesequence: ', $updatesequence)"/>
            </message>
            <message>
               <xsl:value-of select="concat('stddata: ', $stddata)"/>
            </message>
            <message>
               <xsl:value-of select="concat('queryable: ', $queryable)"/>
            </message>
            <message>
               <xsl:value-of select="concat('namedstyle: ', $namedstyle)"/>
            </message>
            <message>
               <xsl:value-of select="concat('inherentstyle: ', $inherentstyle)"/>
            </message>
            <message>
               <xsl:value-of select="concat('inheritedstyle: ', $inheritedstyle)"/>
            </message>
            <message>
               <xsl:value-of select="concat('inherentsrs: ', $inherentsrs)"/>
            </message>
            <message>
               <xsl:value-of select="concat('inheritedsrs: ', $inheritedsrs)"/>
            </message>
            <message>
               <xsl:value-of select="concat('gif: ', $gif)"/>
            </message>
            <message>
               <xsl:value-of select="concat('jpeg: ', $jpeg)"/>
            </message>
            <message>
               <xsl:value-of select="concat('png: ', $png)"/>
            </message>
            <message>
               <xsl:value-of select="concat('transparency: ', $transparency)"/>
            </message>
            <message>
               <xsl:value-of select="concat('readable: ', $readable)"/>
            </message>
            <message>
               <xsl:value-of select="concat('lossless: ', $lossless)"/>
            </message>
            <message>
               <xsl:value-of select="concat('se_inimage: ', $se_inimage)"/>
            </message>
            <message>
               <xsl:value-of select="concat('se_blank: ', $se_blank)"/>
            </message>
            <message>
               <xsl:value-of select="concat('getfeatureinfo: ', $getfeatureinfo)"/>
            </message>
            <message>
               <xsl:value-of select="concat('unqueryablelayer: ', $unqueryablelayer)"/>
            </message>
            <message>
               <xsl:value-of select="concat('gml: ', $gml)"/>
            </message>
            <message>
               <xsl:value-of select="concat('hosturl: ', $hosturl)"/>
            </message>
--><xsl:if test="$stddata and $readable">
               <call-test name="wms:wmsops-getmap-params-bbox-1">
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_BASIC_POLYGONS" select="$VAR_BASIC_POLYGONS"/>
                  <with-param name="VAR_READABLE_IMAGE_FORMAT" select="$VAR_READABLE_IMAGE_FORMAT"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$stddata and $readable">
               <call-test name="wms:wmsops-getmap-params-bbox-2">
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_STREAMS" select="$VAR_STREAMS"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_PONDS" select="$VAR_PONDS"/>
                  <with-param name="VAR_BRIDGES" select="$VAR_BRIDGES"/>
                  <with-param name="VAR_ROAD_SEGMENTS" select="$VAR_ROAD_SEGMENTS"/>
                  <with-param name="VAR_DIVIDED_ROUTES" select="$VAR_DIVIDED_ROUTES"/>
                  <with-param name="VAR_BUILDINGS" select="$VAR_BUILDINGS"/>
                  <with-param name="VAR_MAP_NEATLINE" select="$VAR_MAP_NEATLINE"/>
                  <with-param name="VAR_READABLE_IMAGE_FORMAT" select="$VAR_READABLE_IMAGE_FORMAT"/>
                  <with-param name="hosturl" select="$hosturl"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$se_inimage and $readable">
               <call-test name="wms:wmsops-getmap-params-exceptions-3">
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_READABLE_IMAGE_FORMAT" select="$VAR_READABLE_IMAGE_FORMAT"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$stddata and $readable">
               <call-test name="wms:wmsops-getmap-params-layers-4">
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_FORESTS" select="$VAR_FORESTS"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_NAMED_PLACES" select="$VAR_NAMED_PLACES"/>
                  <with-param name="VAR_READABLE_IMAGE_FORMAT" select="$VAR_READABLE_IMAGE_FORMAT"/>
                  <with-param name="hosturl" select="$hosturl"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$stddata and $readable">
               <call-test name="wms:wmsops-getmap-params-width_height-3">
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_STREAMS" select="$VAR_STREAMS"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_PONDS" select="$VAR_PONDS"/>
                  <with-param name="VAR_BRIDGES" select="$VAR_BRIDGES"/>
                  <with-param name="VAR_ROAD_SEGMENTS" select="$VAR_ROAD_SEGMENTS"/>
                  <with-param name="VAR_DIVIDED_ROUTES" select="$VAR_DIVIDED_ROUTES"/>
                  <with-param name="VAR_BUILDINGS" select="$VAR_BUILDINGS"/>
                  <with-param name="VAR_MAP_NEATLINE" select="$VAR_MAP_NEATLINE"/>
                  <with-param name="VAR_READABLE_IMAGE_FORMAT" select="$VAR_READABLE_IMAGE_FORMAT"/>
               </call-test>
            </xsl:if>
            <call-test name="wms:basic_elements-param_rules-order_and_case-3">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                           select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
            </call-test>
            <xsl:if test="$stddata">
               <call-test name="wms:basic_elements-param_rules-order_and_case-4">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$queryable">
               <call-test name="wms:basic_elements-param_rules-order_and_case-5">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_GET_FEATURE_INFO_FORMAT" select="$VAR_GET_FEATURE_INFO_FORMAT"/>
                  <with-param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"
                              select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <call-test name="wms:basic_elements-version-negotiation-2">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                           select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
            </call-test>
            <call-test name="wms:basic_elements-version-negotiation-4">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                           select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
            </call-test>
            <xsl:if test="$recommended">
               <call-test name="wms:dims-declaring-1">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                              select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <call-test name="wms:dims-declaring-3">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                           select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
            </call-test>
            <call-test name="wms:dims-declaring-4">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                           select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
            </call-test>
            <xsl:if test="$basic_profile">
               <call-test name="wms:profiles-basic-1">
                  <with-param name="VAR_STDDATA_EXISTS" select="$VAR_STDDATA_EXISTS"/>
                  <with-param name="hosturl" select="$hosturl"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$basic_profile">
               <call-test name="wms:profiles-basic-2">
                  <with-param name="VAR_LOSSLESS_FORMAT" select="$VAR_LOSSLESS_FORMAT"/>
                  <with-param name="hosturl" select="$hosturl"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$queryable_profile">
               <call-test name="wms:profiles-queryable-1">
                  <with-param name="VAR_STDDATA_EXISTS" select="$VAR_STDDATA_EXISTS"/>
                  <with-param name="hosturl" select="$hosturl"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$queryable_profile">
               <call-test name="wms:profiles-queryable-2">
                  <with-param name="VAR_LOSSLESS_FORMAT" select="$VAR_LOSSLESS_FORMAT"/>
                  <with-param name="hosturl" select="$hosturl"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$queryable_profile">
               <call-test name="wms:profiles-queryable-3">
                  <with-param name="VAR_QUERYABLE_LAYERS_EXIST" select="$VAR_QUERYABLE_LAYERS_EXIST"/>
                  <with-param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"
                              select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
                  <with-param name="hosturl" select="$hosturl"/>
               </call-test>
            </xsl:if>
            <call-test name="wms:wmsops-getcapabilities-output_formats-1">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                           select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
            </call-test>
            <call-test name="wms:wmsops-getcapabilities-params-request-1">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                           select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
            </call-test>
            <xsl:if test="not($updatesequence)">
               <call-test name="wms:wmsops-getcapabilities-params-updatesequence-1">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                              select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$updatesequence">
               <call-test name="wms:wmsops-getcapabilities-params-updatesequence-2">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_CURRENT_UPDATESEQUENCE" select="$VAR_CURRENT_UPDATESEQUENCE"/>
                  <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                              select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$updatesequence and $manual_updatesequence">
               <call-test name="wms:wmsops-getcapabilities-params-updatesequence-3">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LOW_UPDATESEQUENCE" select="$VAR_LOW_UPDATESEQUENCE"/>
                  <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                              select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$updatesequence and $manual_updatesequence">
               <call-test name="wms:wmsops-getcapabilities-params-updatesequence-4">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_HIGH_UPDATESEQUENCE" select="$VAR_HIGH_UPDATESEQUENCE"/>
                  <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                              select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$updatesequence and $auto_updatesequence">
               <call-test name="wms:wmsops-getcapabilities-params-updatesequence-5">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_AUTO_LOW_UPDATESEQUENCE" select="$VAR_AUTO_LOW_UPDATESEQUENCE"/>
                  <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                              select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$updatesequence and $auto_updatesequence">
               <call-test name="wms:wmsops-getcapabilities-params-updatesequence-6">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_AUTO_HIGH_UPDATESEQUENCE" select="$VAR_AUTO_HIGH_UPDATESEQUENCE"/>
                  <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                              select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <call-test name="wms:wmsops-getcapabilities-params-version-1">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                           select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
            </call-test>
            <call-test name="wms:wmsops-getcapabilities-params-version-2">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                           select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
            </call-test>
            <call-test name="wms:wmsops-getcapabilities-params-version-3">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                           select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
            </call-test>
            <call-test name="wms:wmsops-getcapabilities-params-version-4">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                           select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
            </call-test>
            <call-test name="wms:wmsops-getcapabilities-params-version-5">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                           select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
            </call-test>
            <call-test name="wms:wmsops-getcapabilities-params-version-6">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                           select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
            </call-test>
            <call-test name="wms:wmsops-getcapabilities-response-1">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                           select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
            </call-test>
            <call-test name="wms:wmsops-getcapabilities-response-2">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                           select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
            </call-test>
            <call-test name="wms:wmsops-getcapabilities-response-capability_metadata-1">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                           select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
            </call-test>
            <xsl:if test="$testgml">
               <call-test name="wms:wmsops-getcapabilities-response-capability_metadata-2">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                              select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <call-test name="wms:wmsops-getcapabilities-response-general_metadata-1">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                           select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
            </call-test>
            <xsl:if test="$free">
               <call-test name="wms:wmsops-getcapabilities-response-general_metadata-2">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                              select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <call-test name="wms:wmsops-getcapabilities-response-layer_properties-bbox-1">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                           select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
            </call-test>
            <call-test name="wms:wmsops-getcapabilities-response-layer_properties-dim_and_extent-1">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                           select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
            </call-test>
            <call-test name="wms:wmsops-getcapabilities-response-layer_properties-dim_and_extent-2">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                           select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
            </call-test>
            <call-test name="wms:wmsops-getcapabilities-response-layer_properties-identifier_and_authorityurl-1">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                           select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
            </call-test>
            <call-test name="wms:wmsops-getcapabilities-response-layer_properties-identifier_and_authorityurl-2">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                           select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
            </call-test>
            <call-test name="wms:wmsops-getcapabilities-response-layer_properties-latlonbbox-1">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                           select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
            </call-test>
            <call-test name="wms:wmsops-getcapabilities-response-layer_properties-latlonbbox-2">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                           select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
            </call-test>
            <call-test name="wms:wmsops-getcapabilities-response-layer_properties-srs-1">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                           select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
            </call-test>
            <call-test name="wms:wmsops-getcapabilities-response-layer_properties-style-1">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                           select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
            </call-test>
            <xsl:if test="$queryable_profile">
               <call-test name="wms:wmsops-getfeatureinfo-params-exceptions-1">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_GET_FEATURE_INFO_FORMAT" select="$VAR_GET_FEATURE_INFO_FORMAT"/>
                  <with-param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"
                              select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$queryable_profile">
               <call-test name="wms:wmsops-getfeatureinfo-params-exceptions-2">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_GET_FEATURE_INFO_FORMAT" select="$VAR_GET_FEATURE_INFO_FORMAT"/>
                  <with-param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"
                              select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$queryable_profile">
               <call-test name="wms:wmsops-getfeatureinfo-params-feature_count-1">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_BASIC_POLYGONS" select="$VAR_BASIC_POLYGONS"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_GET_FEATURE_INFO_FORMAT" select="$VAR_GET_FEATURE_INFO_FORMAT"/>
                  <with-param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"
                              select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$queryable_profile">
               <call-test name="wms:wmsops-getfeatureinfo-params-feature_count-2">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_BASIC_POLYGONS" select="$VAR_BASIC_POLYGONS"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_GET_FEATURE_INFO_FORMAT" select="$VAR_GET_FEATURE_INFO_FORMAT"/>
                  <with-param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"
                              select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$queryable_profile">
               <call-test name="wms:wmsops-getfeatureinfo-params-info_format-1">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"
                              select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
                  <with-param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"
                              select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$queryable and $gml and $testgml">
               <call-test name="wms:wmsops-getfeatureinfo-params-info_format-2">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"
                              select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$queryable and $gml and $testgml">
               <call-test name="wms:wmsops-getfeatureinfo-params-info_format-3">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"
                              select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$queryable_profile">
               <call-test name="wms:wmsops-getfeatureinfo-params-query_layers-1">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_GET_FEATURE_INFO_FORMAT" select="$VAR_GET_FEATURE_INFO_FORMAT"/>
                  <with-param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"
                              select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$queryable_profile">
               <call-test name="wms:wmsops-getfeatureinfo-params-query_layers-2">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_NAMED_PLACES" select="$VAR_NAMED_PLACES"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_GET_FEATURE_INFO_FORMAT" select="$VAR_GET_FEATURE_INFO_FORMAT"/>
                  <with-param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"
                              select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$queryable_profile">
               <call-test name="wms:wmsops-getfeatureinfo-params-query_layers-3">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_NAMED_PLACES" select="$VAR_NAMED_PLACES"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_FORESTS" select="$VAR_FORESTS"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_GET_FEATURE_INFO_FORMAT" select="$VAR_GET_FEATURE_INFO_FORMAT"/>
                  <with-param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"
                              select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$queryable_profile">
               <call-test name="wms:wmsops-getfeatureinfo-params-query_layers-4">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_NAMED_PLACES" select="$VAR_NAMED_PLACES"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_STREAMS" select="$VAR_STREAMS"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_GET_FEATURE_INFO_FORMAT" select="$VAR_GET_FEATURE_INFO_FORMAT"/>
                  <with-param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"
                              select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$queryable_profile">
               <call-test name="wms:wmsops-getfeatureinfo-params-query_layers-5">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_GET_FEATURE_INFO_FORMAT" select="$VAR_GET_FEATURE_INFO_FORMAT"/>
                  <with-param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"
                              select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$getfeatureinfo and $unqueryablelayer">
               <call-test name="wms:wmsops-getfeatureinfo-params-query_layers-6">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_UNQUERYABLE_LAYER" select="$VAR_UNQUERYABLE_LAYER"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_GET_FEATURE_INFO_FORMAT" select="$VAR_GET_FEATURE_INFO_FORMAT"/>
                  <with-param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"
                              select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$recommended and $lossless and $stddata">
               <call-test name="wms:wmsops-getmap-params-bbox-10">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_PONDS" select="$VAR_PONDS"/>
                  <with-param name="VAR_LOSSLESS_FORMAT" select="$VAR_LOSSLESS_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$strictbboxconstraints and $lossless and $stddata">
               <call-test name="wms:wmsops-getmap-params-bbox-11">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_PONDS" select="$VAR_PONDS"/>
                  <with-param name="VAR_LOSSLESS_FORMAT" select="$VAR_LOSSLESS_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$loosebboxconstraints and $lossless and $stddata">
               <call-test name="wms:wmsops-getmap-params-bbox-12">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_PONDS" select="$VAR_PONDS"/>
                  <with-param name="VAR_LOSSLESS_FORMAT" select="$VAR_LOSSLESS_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$stddata and $lossless">
               <call-test name="wms:wmsops-getmap-params-bbox-3">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_STREAMS" select="$VAR_STREAMS"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_PONDS" select="$VAR_PONDS"/>
                  <with-param name="VAR_BRIDGES" select="$VAR_BRIDGES"/>
                  <with-param name="VAR_ROAD_SEGMENTS" select="$VAR_ROAD_SEGMENTS"/>
                  <with-param name="VAR_DIVIDED_ROUTES" select="$VAR_DIVIDED_ROUTES"/>
                  <with-param name="VAR_BUILDINGS" select="$VAR_BUILDINGS"/>
                  <with-param name="VAR_MAP_NEATLINE" select="$VAR_MAP_NEATLINE"/>
                  <with-param name="VAR_LOSSLESS_FORMAT" select="$VAR_LOSSLESS_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$stddata and $lossless">
               <call-test name="wms:wmsops-getmap-params-bbox-4">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_LOSSLESS_FORMAT" select="$VAR_LOSSLESS_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$stddata">
               <call-test name="wms:wmsops-getmap-params-bbox-5">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$stddata">
               <call-test name="wms:wmsops-getmap-params-bbox-6">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$stddata">
               <call-test name="wms:wmsops-getmap-params-bbox-7">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$stddata">
               <call-test name="wms:wmsops-getmap-params-bbox-8">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$recommended and $lossless and $stddata">
               <call-test name="wms:wmsops-getmap-params-bbox-9">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_PONDS" select="$VAR_PONDS"/>
                  <with-param name="VAR_LOSSLESS_FORMAT" select="$VAR_LOSSLESS_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$lossless and $stddata">
               <call-test name="wms:wmsops-getmap-params-bgcolor-1">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_LOSSLESS_FORMAT" select="$VAR_LOSSLESS_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$lossless and $stddata">
               <call-test name="wms:wmsops-getmap-params-bgcolor-2">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_LOSSLESS_FORMAT" select="$VAR_LOSSLESS_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <call-test name="wms:wmsops-getmap-params-exceptions-1">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
               <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
            </call-test>
            <call-test name="wms:wmsops-getmap-params-exceptions-2">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
               <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
            </call-test>
            <xsl:if test="$se_inimage">
               <call-test name="wms:wmsops-getmap-params-exceptions-4">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$se_blank and $lossless">
               <call-test name="wms:wmsops-getmap-params-exceptions-5">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LOSSLESS_FORMAT" select="$VAR_LOSSLESS_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$se_blank and $transparency">
               <call-test name="wms:wmsops-getmap-params-exceptions-6">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_TRANSPARENT_FORMAT" select="$VAR_TRANSPARENT_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$se_blank">
               <call-test name="wms:wmsops-getmap-params-exceptions-7">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$stddata">
               <call-test name="wms:wmsops-getmap-params-format-1">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$gif and $stddata">
               <call-test name="wms:wmsops-getmap-params-format-2">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$jpeg and $stddata">
               <call-test name="wms:wmsops-getmap-params-format-3">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$png and $stddata">
               <call-test name="wms:wmsops-getmap-params-format-4">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$stddata">
               <call-test name="wms:wmsops-getmap-params-layers-1">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$stddata">
               <call-test name="wms:wmsops-getmap-params-layers-2">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_STREAMS" select="$VAR_STREAMS"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$stddata">
               <call-test name="wms:wmsops-getmap-params-layers-3">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_MAP_NEATLINE" select="$VAR_MAP_NEATLINE"/>
                  <with-param name="VAR_ROAD_SEGMENTS" select="$VAR_ROAD_SEGMENTS"/>
                  <with-param name="VAR_DIVIDED_ROUTES" select="$VAR_DIVIDED_ROUTES"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <call-test name="wms:wmsops-getmap-params-layers-5">
               <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
               <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
               <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
            </call-test>
            <xsl:if test="$stddata">
               <call-test name="wms:wmsops-getmap-params-layers-6">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$stddata">
               <call-test name="wms:wmsops-getmap-params-layers-7">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$recommended and $stddata">
               <call-test name="wms:wmsops-getmap-params-request-1">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$inherentsrs and $stddata">
               <call-test name="wms:wmsops-getmap-params-srs-1">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAYER_WITH_INHERENT_SRS" select="$VAR_LAYER_WITH_INHERENT_SRS"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$inheritedsrs and $stddata">
               <call-test name="wms:wmsops-getmap-params-srs-2">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAYER_WITH_INHERITED_SRS" select="$VAR_LAYER_WITH_INHERITED_SRS"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$stddata">
               <call-test name="wms:wmsops-getmap-params-srs-3">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$inherentstyle and $stddata">
               <call-test name="wms:wmsops-getmap-params-styles-1">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAYER_WITH_INHERENT_STYLE" select="$VAR_LAYER_WITH_INHERENT_STYLE"/>
                  <with-param name="VAR_INHERENT_STYLE" select="$VAR_INHERENT_STYLE"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$namedstyle and $stddata">
               <call-test name="wms:wmsops-getmap-params-styles-10">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAYER_WITH_STYLE" select="$VAR_LAYER_WITH_STYLE"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_STYLE" select="$VAR_STYLE"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$inheritedstyle and $stddata">
               <call-test name="wms:wmsops-getmap-params-styles-2">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAYER_WITH_INHERITED_STYLE" select="$VAR_LAYER_WITH_INHERITED_STYLE"/>
                  <with-param name="VAR_INHERITED_STYLE" select="$VAR_INHERITED_STYLE"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$namedstyle and $stddata">
               <call-test name="wms:wmsops-getmap-params-styles-3">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAYER_WITH_STYLE" select="$VAR_LAYER_WITH_STYLE"/>
                  <with-param name="VAR_STYLE" select="$VAR_STYLE"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$namedstyle and $stddata">
               <call-test name="wms:wmsops-getmap-params-styles-4">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAYER_WITH_STYLE" select="$VAR_LAYER_WITH_STYLE"/>
                  <with-param name="VAR_STYLE" select="$VAR_STYLE"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$stddata">
               <call-test name="wms:wmsops-getmap-params-styles-5">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$stddata">
               <call-test name="wms:wmsops-getmap-params-styles-6">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_PONDS" select="$VAR_PONDS"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$namedstyle and $stddata">
               <call-test name="wms:wmsops-getmap-params-styles-7">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAYER_WITH_STYLE" select="$VAR_LAYER_WITH_STYLE"/>
                  <with-param name="VAR_BRIDGES" select="$VAR_BRIDGES"/>
                  <with-param name="VAR_ROAD_SEGMENTS" select="$VAR_ROAD_SEGMENTS"/>
                  <with-param name="VAR_DIVIDED_ROUTES" select="$VAR_DIVIDED_ROUTES"/>
                  <with-param name="VAR_STYLE" select="$VAR_STYLE"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$stddata">
               <call-test name="wms:wmsops-getmap-params-styles-8">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_BRIDGES" select="$VAR_BRIDGES"/>
                  <with-param name="VAR_ROAD_SEGMENTS" select="$VAR_ROAD_SEGMENTS"/>
                  <with-param name="VAR_DIVIDED_ROUTES" select="$VAR_DIVIDED_ROUTES"/>
                  <with-param name="VAR_BUILDINGS" select="$VAR_BUILDINGS"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$stddata">
               <call-test name="wms:wmsops-getmap-params-styles-9">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_BRIDGES" select="$VAR_BRIDGES"/>
                  <with-param name="VAR_ROAD_SEGMENTS" select="$VAR_ROAD_SEGMENTS"/>
                  <with-param name="VAR_DIVIDED_ROUTES" select="$VAR_DIVIDED_ROUTES"/>
                  <with-param name="VAR_BUILDINGS" select="$VAR_BUILDINGS"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$transparency and $stddata">
               <call-test name="wms:wmsops-getmap-params-transparent-1">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_TRANSPARENT_FORMAT" select="$VAR_TRANSPARENT_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$transparency and $stddata">
               <call-test name="wms:wmsops-getmap-params-transparent-2">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_TRANSPARENT_FORMAT" select="$VAR_TRANSPARENT_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$transparency and $stddata">
               <call-test name="wms:wmsops-getmap-params-transparent-3">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_TRANSPARENT_FORMAT" select="$VAR_TRANSPARENT_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$recommended and $stddata">
               <call-test name="wms:wmsops-getmap-params-version-1">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_IMAGE_FORMAT" select="$VAR_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$stddata and $readable">
               <call-test name="wms:wmsops-getmap-params-width_height-1">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_LAKES" select="$VAR_LAKES"/>
                  <with-param name="VAR_STREAMS" select="$VAR_STREAMS"/>
                  <with-param name="VAR_PONDS" select="$VAR_PONDS"/>
                  <with-param name="VAR_READABLE_IMAGE_FORMAT" select="$VAR_READABLE_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <xsl:if test="$stddata and $readable">
               <call-test name="wms:wmsops-getmap-params-width_height-2">
                  <with-param name="VAR_WMS_VERSION" select="$VAR_WMS_VERSION"/>
                  <with-param name="VAR_BASIC_POLYGONS" select="$VAR_BASIC_POLYGONS"/>
                  <with-param name="VAR_READABLE_IMAGE_FORMAT" select="$VAR_READABLE_IMAGE_FORMAT"/>
                  <with-param name="VAR_WMS_GET_MAP_HTTP_GET_URL" select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </call-test>
            </xsl:if>
            <!-- Extended tests --><xsl:if test="$queryable_profile">
               <ctl:for-each select="$VAR_WMS_CAPABILITIES//Capability/Request/GetFeatureInfo/Format">
                  <ctl:call-test name="wms:wmsops-getfeatureinfo-each-info_format">
                     <ctl:with-param name="WMS_CAPABILITIES" select="$VAR_WMS_CAPABILITIES/*"/>
                     <ctl:with-param name="FORMAT" select="." label="each GetFeatureInfo format"
                                     label-expr="concat('format &#34;', ., '&#34;')"/>
                  </ctl:call-test>
               </ctl:for-each>
            </xsl:if>
            <ctl:for-each select="$VAR_WMS_CAPABILITIES//Layer/Style[not(Name=../ancestor::Layer/Style/Name)]">
               <ctl:call-test name="wms:wmsops-getmap-each-style">
                  <ctl:with-param name="capabilities" select="$VAR_WMS_CAPABILITIES/*"/>
                  <ctl:with-param name="style" select="./Name" label="each style"
                                  label-expr="concat('style &#34;', ./Name, '&#34;')"/>
                  <ctl:with-param name="layer" select="../Name"/>
               </ctl:call-test>
            </ctl:for-each>
            <ctl:for-each select="$VAR_WMS_CAPABILITIES//Layer/Name">
               <ctl:call-test name="wms:wmsops-getmap-each-layer">
                  <ctl:with-param name="WMS_CAPABILITIES" select="$VAR_WMS_CAPABILITIES/*"/>
                  <ctl:with-param name="layer" select="string(.)" label="each named layer"
                                  label-expr="concat('layer &#34;', ., '&#34;')"/>
               </ctl:call-test>
            </ctl:for-each>
            <ctl:for-each select="$VAR_WMS_CAPABILITIES//Layer//SRS[not(. = ../preceding::Layer/SRS) and not(. = ../ancestor::Layer/SRS) and not(starts-with(., 'AUTO'))]">
               <ctl:call-test name="wms:wmsops-getmap-each-srs">
                  <ctl:with-param name="WMS_CAPABILITIES" select="$VAR_WMS_CAPABILITIES/*"/>
                  <ctl:with-param name="srs" select="." label="each SRS" label-expr="concat('SRS &#34;', ., '&#34;')"/>
               </ctl:call-test>
            </ctl:for-each>
            <ctl:for-each select="$VAR_WMS_CAPABILITIES/Request/GetMap/Format">
               <ctl:call-test name="wms:wmsops-getmap-each-format">
                  <ctl:with-param name="WMS_CAPABILITIES" select="$VAR_WMS_CAPABILITIES/*"/>
                  <ctl:with-param name="format" select="." label="each GetMap format"
                                  label-expr="concat('format &#34;', ., '&#34;')"/>
               </ctl:call-test>
            </ctl:for-each>
            <ctl:for-each select="$VAR_WMS_CAPABILITIES/Request/GetMap/Format">
               <ctl:call-test name="wms:wmsops-getmap-each-format-transparent">
                  <ctl:with-param name="WMS_CAPABILITIES" select="$VAR_WMS_CAPABILITIES/*"/>
                  <ctl:with-param name="format" select="." label="each GetMap format"
                                  label-expr="concat('format &#34;', ., '&#34;')"/>
               </ctl:call-test>
            </ctl:for-each>
            <call-test name="wms:wmsops-getmap-layer-encoded-name">
               <with-param name="WMS_CAPABILITIES" select="$VAR_WMS_CAPABILITIES/*"/>
            </call-test>
            <call-test name="wms:basic_elements-validate-exception">
               <with-param name="WMS_CAPABILITIES" select="$VAR_WMS_CAPABILITIES/*"/>
            </call-test>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:basic_elements-param_rules-order_and_case-3">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>When a GetCapabilities request contains a parameter which is not defined by the spec, the result is valid.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
            <tr align="left">
               <td>BOGUS = ignored</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where /WMT_MS_Capabilities exists.</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#basic_elements.param_rules.order_and_case</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="SeRvIcE">WMS</param>
               <param name="BoGuS">ignored</param>
               <param name="ReQuEsT">GetCapabilities</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(boolean(/WMT_MS_Capabilities))</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:basic_elements-param_rules-order_and_case-4">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request contains a parameter which is not defined by the spec, the result is valid.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 0, -0.0020, 0.0040, 0</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 200</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>BOGUS = ignored</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = [[VAR_IMAGE_FORMAT]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#basic_elements.param_rules.order_and_case</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="WiDtH">200</param>
               <param name="SrS">EPSG:4326</param>
               <param name="HeIgHt">100</param>
               <param name="BoGuS">ignored</param>
               <param name="ReQuEsT">GetMap</param>
               <param name="StYlEs"/>
               <param name="BbOx">0,-0.0020,0.0040,0</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(normalize-space(substring-before(concat(/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value, ';'), ';'))=$VAR_IMAGE_FORMAT)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:basic_elements-param_rules-order_and_case-5">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_GET_FEATURE_INFO_FORMAT"/>
      <param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
      <assertion>When a GetFeatureInfo request contains a parameter which is not defined by the spec, the result is valid.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetFeatureInfo</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 0, -0.0020, 0.0040, 0</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 200</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>QUERY_LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>INFO_FORMAT = [[VAR_GET_FEATURE_INFO_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>X = 60</td>
            </tr>
            <tr align="left">
               <td>Y = 60</td>
            </tr>
            <tr align="left">
               <td>BOGUS = ignored</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = [[VAR_GET_FEATURE_INFO_FORMAT]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#basic_elements.param_rules.order_and_case</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="SrS">EPSG:4326</param>
               <param name="X">60</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="InFo_fOrMaT">
                  <xsl:value-of select="functions:encode($VAR_GET_FEATURE_INFO_FORMAT)"/>
               </param>
               <param name="Y">60</param>
               <param name="WiDtH">200</param>
               <param name="QuErY_LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="BoGuS">ignored</param>
               <param name="BbOx">0,-0.0020,0.0040,0</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="HeIgHt">100</param>
               <param name="StYlEs"/>
               <param name="ReQuEsT">GetFeatureInfo</param>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(contains((/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value), $VAR_GET_FEATURE_INFO_FORMAT))">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:basic_elements-version-negotiation-2">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>When a GetCapabilities request is made for a supported version, then the response is the requested version.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where /WMT_MS_Capabilities/@version = [[VAR_WMS_VERSION]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#basic_elements.version.negotiation</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="SeRvIcE">WMS</param>
               <param name="ReQuEsT">GetCapabilities</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(string(/WMT_MS_Capabilities/@version)=$VAR_WMS_VERSION)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:basic_elements-version-negotiation-4">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>When a GetCapabilities request is made for version 0.0.0, the response is between 0.0.0 and [[VAR_WMS_VERSION]], inclusive.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = 0.0.0</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where /WMT_MS_Capabilities/@version &lt;= [[VAR_WMS_VERSION]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#basic_elements.version.negotiation</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="SeRvIcE">WMS</param>
               <param name="VeRsIoN">0.0.0</param>
               <param name="ReQuEsT">GetCapabilities</param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(functions:version-as-integer(string(/WMT_MS_Capabilities/@version)) &lt;= functions:version-as-integer('<xsl:value-of select="$VAR_WMS_VERSION"/>'))</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:dims-declaring-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>No dimension name values in the capabilities document contain whitespace.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where no //Layer/Dimension/@name contains whitespace</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#dims.declaring</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="SeRvIcE">WMS</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="ReQuEsT">GetCapabilities</param>
            </request>
         </xsl:variable>
         <xsl:variable name="expression">//Layer/Dimension[translate(normalize-space(@name), ' ', 'X') != @name]/@name</xsl:variable>
         <xsl:variable name="VAR_DIMS_WITH_WHITESPACE">
            <xsl:for-each select="$request1">
               <xsl:value-of select="saxon:evaluate($expression)"/>
            </xsl:for-each>
         </xsl:variable>
         <message>VAR_DIMS_WITH_WHITESPACE: <xsl:value-of select="$VAR_DIMS_WITH_WHITESPACE"/>
         </message>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(count(//Layer/Dimension[translate(normalize-space(@name), ' ', 'X') != @name]) = 0)</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:dims-declaring-3">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>All declarations for the time dimension use 'ISO8601' for units.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where count(//Layer/Dimension[@name = 'time' and @units != 'ISO8601']) = 0</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#dims.declaring</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="SeRvIcE">WMS</param>
               <param name="ReQuEsT">GetCapabilities</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
            </request>
         </xsl:variable>
         <xsl:variable name="expression">//Layer/Dimension[translate(@name, 'TIME', 'time') = 'time' and @units != 'ISO8601']/../Name</xsl:variable>
         <xsl:variable name="VAR_LAYERS_WITH_NONSTANDARD_TIME_UNITS">
            <xsl:for-each select="$request1">
               <xsl:value-of select="saxon:evaluate($expression)"/>
            </xsl:for-each>
         </xsl:variable>
         <message>VAR_LAYERS_WITH_NONSTANDARD_TIME_UNITS: <xsl:value-of select="$VAR_LAYERS_WITH_NONSTANDARD_TIME_UNITS"/>
         </message>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(count(//Layer/Dimension[translate(@name, 'TIME', 'time') = 'time' and @units != 'ISO8601']) = 0)</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:dims-declaring-4">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>All declarations for the elevation dimension use an EPSG vertical datum for units.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where count(//Layer/Dimension[@name = 'elevation' and not(starts-with(@units,'EPSG:'))]) = 0</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#dims.declaring</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="ReQuEsT">GetCapabilities</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="SeRvIcE">WMS</param>
            </request>
         </xsl:variable>
         <xsl:variable name="expression">//Layer/Dimension[translate(@name, 'ELVATION', 'elvation') = 'elevation' and not(starts-with(@units, 'EPSG:'))]/../Name</xsl:variable>
         <xsl:variable name="VAR_LAYERS_WITH_NON_EPSG_VERTICAL_DATUM">
            <xsl:for-each select="$request1">
               <xsl:value-of select="saxon:evaluate($expression)"/>
            </xsl:for-each>
         </xsl:variable>
         <message>VAR_LAYERS_WITH_NON_EPSG_VERTICAL_DATUM: <xsl:value-of select="$VAR_LAYERS_WITH_NON_EPSG_VERTICAL_DATUM"/>
         </message>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(count(//Layer/Dimension[translate(@name, 'ELVATION', 'elvation') = 'elevation' and not(starts-with(@units, 'EPSG:'))]) = 0)</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:profiles-basic-1">
      <param name="VAR_STDDATA_EXISTS"/>
      <param name="hosturl"/>
      <assertion>The server implements the CITE standard dataset in subsettable, resizable layers that support EPSG:4326.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>boolean([[VAR_STDDATA_EXISTS]]())</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#profiles.basic</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>http://<xsl:value-of select="$hosturl"/>/OGCTestData/wms/1.1.1/null.xml</url>
               <method>get</method>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(<xsl:value-of select="$VAR_STDDATA_EXISTS"/>())</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:profiles-basic-2">
      <param name="VAR_LOSSLESS_FORMAT"/>
      <param name="hosturl"/>
      <assertion>The server supports GetMap format image/gif and/or image/png.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>string-length("[[VAR_LOSSLESS_FORMAT]]") &gt; 0</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#profiles.basic</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>http://<xsl:value-of select="$hosturl"/>/OGCTestData/wms/1.1.1/null.xml</url>
               <method>get</method>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(string-length('<xsl:value-of select="$VAR_LOSSLESS_FORMAT"/>') &gt; 0)</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:profiles-queryable-1">
      <param name="VAR_STDDATA_EXISTS"/>
      <param name="hosturl"/>
      <assertion>The server implements the CITE standard dataset in subsettable, resizable layers that support EPSG:4326.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>boolean([[VAR_STDDATA_EXISTS]]())</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#profiles.queryable</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>http://<xsl:value-of select="$hosturl"/>/OGCTestData/wms/1.1.1/null.xml</url>
               <method>get</method>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(<xsl:value-of select="$VAR_STDDATA_EXISTS"/>())</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:profiles-queryable-2">
      <param name="VAR_LOSSLESS_FORMAT"/>
      <param name="hosturl"/>
      <assertion>The server supports GetMap format image/gif and/or image/png.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>string-length("[[VAR_LOSSLESS_FORMAT]]") &gt; 0</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#profiles.queryable</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>http://<xsl:value-of select="$hosturl"/>/OGCTestData/wms/1.1.1/null.xml</url>
               <method>get</method>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(string-length('<xsl:value-of select="$VAR_LOSSLESS_FORMAT"/>') &gt; 0)</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:profiles-queryable-3">
      <param name="VAR_QUERYABLE_LAYERS_EXIST"/>
      <param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
      <param name="hosturl"/>
      <assertion>The server supports GetFeatureInfo requests and the CITE standard dataset layers containing polygons are queryable.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>boolean([[VAR_QUERYABLE_LAYERS_EXIST]]() and string-length("[[VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL]]") &gt; 0)</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#.profiles.queryable</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>http://<xsl:value-of select="$hosturl"/>/OGCTestData/wms/1.1.1/null.xml</url>
               <method>get</method>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(<xsl:value-of select="$VAR_QUERYABLE_LAYERS_EXIST"/>() and string-length('<xsl:value-of select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>') &gt; 0)</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-output_formats-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>The application/vnd.ogc.se_xml exception format is listed in the capabilities document.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where a /WMT_MS_Capabilities/Capability/Exception/Format = "application/vnd.ogc.se_xml"</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.output_formats</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="SeRvIcE">WMS</param>
               <param name="ReQuEsT">GetCapabilities</param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(count(/WMT_MS_Capabilities/Capability/Exception[Format = 'application/vnd.ogc.se_xml']) &gt; 0)</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-params-request-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>When REQUEST is "capabilities", then the response is capabilities XML.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = capabilities</td>
            </tr>
            <tr align="left">
               <td>WMTVER = 1.1.1</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where /WMT_MS_Capabilities exists</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.params.request</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="SeRvIcE">WMS</param>
               <param name="ReQuEsT">capabilities</param>
               <param name="WmTvEr">1.1.1</param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(string(/WMT_MS_Capabilities/@version)=$VAR_WMS_VERSION)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-params-updatesequence-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>When a GetCapabilities request is made with an UPDATESEQUENCE parameter, then the UPDATESEQUENCE parameter is ignored.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
            <tr align="left">
               <td>UPDATESEQUENCE = ignored</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where /WMT_MS_Capabilities exists</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.params.updatesequence</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="ReQuEsT">GetCapabilities</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="SeRvIcE">WMS</param>
               <param name="UpDaTeSeQuEnCe">ignored</param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(boolean(/WMT_MS_Capabilities))</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-params-updatesequence-2">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_CURRENT_UPDATESEQUENCE"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>When a GetCapabilities request is made with an UPDATESEQUENCE parameter set to the current update sequence value, then  the server returns a valid exception (code=CurrentUpdateSequence).</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
            <tr align="left">
               <td>UPDATESEQUENCE = [[VAR_CURRENT_UPDATESEQUENCE]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Valid XML where /ServiceExceptionReport/ServiceException[@code="CurrentUpdateSequence"] exists</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.params.updatesequence</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="ReQuEsT">GetCapabilities</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="UpDaTeSeQuEnCe">
                  <xsl:value-of select="$VAR_CURRENT_UPDATESEQUENCE"/>
               </param>
               <param name="SeRvIcE">WMS</param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(boolean(/ServiceExceptionReport/ServiceException[@code='CurrentUpdateSequence']))</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-params-updatesequence-3">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LOW_UPDATESEQUENCE"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>When a GetCapabilities request is made with an UPDATESEQUENCE parameter set to a value lower than the current update sequence value, then the server returns capabilities XML.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
            <tr align="left">
               <td>UPDATESEQUENCE = [[VAR_LOW_UPDATESEQUENCE]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where /WMT_MS_Capabilities exists</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.params.updatesequence</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="ReQuEsT">GetCapabilities</param>
               <param name="SeRvIcE">WMS</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="UpDaTeSeQuEnCe">
                  <xsl:value-of select="$VAR_LOW_UPDATESEQUENCE"/>
               </param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(boolean(/WMT_MS_Capabilities))</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-params-updatesequence-4">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_HIGH_UPDATESEQUENCE"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>When a GetCapabilities request is made with an UPDATESEQUENCE parameter set to a value higher than the current update sequence value, then the server returns an InvalidUpdateSequence exception.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
            <tr align="left">
               <td>UPDATESEQUENCE = [[VAR_HIGH_UPDATESEQUENCE]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Valid XML where /ServiceExceptionReport/ServiceException[@code="InvalidUpdateSequence"] exists</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.params.updatesequence</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="ReQuEsT">GetCapabilities</param>
               <param name="UpDaTeSeQuEnCe">
                  <xsl:value-of select="$VAR_HIGH_UPDATESEQUENCE"/>
               </param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="SeRvIcE">WMS</param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(boolean(/ServiceExceptionReport/ServiceException[@code='InvalidUpdateSequence']))</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-params-updatesequence-5">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_AUTO_LOW_UPDATESEQUENCE"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>When a GetCapabilities request is made with an UPDATESEQUENCE parameter set to a value lower than the current update sequence value, then the server returns capabilities XML.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
            <tr align="left">
               <td>UPDATESEQUENCE = [[VAR_AUTO_LOW_UPDATESEQUENCE]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where /WMT_MS_Capabilities exists</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.params.updatesequence</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="SeRvIcE">WMS</param>
               <param name="UpDaTeSeQuEnCe">
                  <xsl:value-of select="$VAR_AUTO_LOW_UPDATESEQUENCE"/>
               </param>
               <param name="ReQuEsT">GetCapabilities</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(boolean(/WMT_MS_Capabilities))</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-params-updatesequence-6">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_AUTO_HIGH_UPDATESEQUENCE"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>When a GetCapabilities request is made with an UPDATESEQUENCE parameter set to a value higher than the current update sequence value, then the server returns an InvalidUpdateSequence exception.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
            <tr align="left">
               <td>UPDATESEQUENCE = [[VAR_AUTO_HIGH_UPDATESEQUENCE]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Valid XML where /ServiceExceptionReport/ServiceException[@code="InvalidUpdateSequence"] exists</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.params.updatesequence</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="SeRvIcE">WMS</param>
               <param name="UpDaTeSeQuEnCe">
                  <xsl:value-of select="$VAR_AUTO_HIGH_UPDATESEQUENCE"/>
               </param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="ReQuEsT">GetCapabilities</param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(boolean(/ServiceExceptionReport/ServiceException[@code='InvalidUpdateSequence']))</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-params-version-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>When a GetCapabilities request is made for the version in test using WMTVER instead of VERSION, then the response is the requested version.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>WMTVER = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where /WMT_MS_Capabilities/@version = [[VAR_WMS_VERSION]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.params.version</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="SeRvIcE">WMS</param>
               <param name="ReQuEsT">GetCapabilities</param>
               <param name="WmTvEr">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(string(/WMT_MS_Capabilities/@version)=$VAR_WMS_VERSION)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-params-version-2">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>When a GetCapabilities request is made for a supported version other than [[VAR_WMS_VERSION]] using WMTVER instead of VERSION, then the version returned is the version requested.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request#1:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = 0.0.0</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Request#2:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 2">
            <tr align="left">
               <td>VERSION = 100.0.0</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Request#3:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 3">
            <tr align="left">
               <td>WMTVER = [[VAR_OTHER_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = [[VAR_REQUEST_NAME]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>VAR_OTHER_VERSION will be set to the version returned from request 1 if it is not the version in test.  Otherwise, it will be set to the version returned from request 2.  The result from request 3 must be XML where the version attribute on the root element is [[VAR_OTHER_VERSION]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.params.version</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="ReQuEsT">GetCapabilities</param>
               <param name="SeRvIcE">WMS</param>
               <param name="VeRsIoN">0.0.0</param>
            </request>
         </xsl:variable>
         <xsl:variable name="expression">string(/*/@version)</xsl:variable>
         <xsl:variable name="VAR_VERSION_1">
            <xsl:for-each select="$request1">
               <xsl:value-of select="saxon:evaluate($expression)"/>
            </xsl:for-each>
         </xsl:variable>
         <message>VAR_VERSION_1: <xsl:value-of select="$VAR_VERSION_1"/>
         </message>
         <xsl:variable name="request2">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="SeRvIcE">WMS</param>
               <param name="VeRsIoN">100.0.0</param>
               <param name="ReQuEsT">GetCapabilities</param>
            </request>
         </xsl:variable>
         <xsl:variable name="expression">functions:iif("<xsl:value-of select="$VAR_VERSION_1"/>" != "<xsl:value-of select="$VAR_WMS_VERSION"/>", "<xsl:value-of select="$VAR_VERSION_1"/>", string(/*/@version))</xsl:variable>
         <xsl:variable name="VAR_OTHER_VERSION">
            <xsl:for-each select="$request2">
               <xsl:value-of select="saxon:evaluate($expression)"/>
            </xsl:for-each>
         </xsl:variable>
         <message>VAR_OTHER_VERSION: <xsl:value-of select="$VAR_OTHER_VERSION"/>
         </message>
         <xsl:variable name="expression">functions:iif(functions:version-as-integer("<xsl:value-of select="$VAR_VERSION_1"/>") &lt; functions:version-as-integer("1.1.0"), "capabilities", "GetCapabilities")</xsl:variable>
         <xsl:variable name="VAR_REQUEST_NAME">
            <xsl:for-each select="$request2">
               <xsl:value-of select="saxon:evaluate($expression)"/>
            </xsl:for-each>
         </xsl:variable>
         <message>VAR_REQUEST_NAME: <xsl:value-of select="$VAR_REQUEST_NAME"/>
         </message>
         <xsl:variable name="request3">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="WmTvEr">
                  <xsl:value-of select="$VAR_OTHER_VERSION"/>
               </param>
               <param name="SeRvIcE">WMS</param>
               <param name="ReQuEsT">
                  <xsl:value-of select="$VAR_REQUEST_NAME"/>
               </param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request3">
            <xsl:if test="not(string(/*/@version)=$VAR_OTHER_VERSION)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-params-version-3">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>When a GetCapabilities request is made with VERSION set to [[VAR_WMS_VERSION]] and WMTVER set to 0.0.0 and VERSION precedes WMTVER, then the version returned is [[VAR_WMS_VERSION]].</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>WMTVER = 0.0.0</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where /WMT_MS_Capabilities/@version = [[VAR_WMS_VERSION]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.params.version</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>VERSION=<xsl:value-of select="$VAR_WMS_VERSION"/>&amp;</url>
               <method>get</method>
               <param name="SeRvIcE">WMS</param>
               <param name="WmTvEr">0.0.0</param>
               <param name="ReQuEsT">GetCapabilities</param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(string(/WMT_MS_Capabilities/@version)=$VAR_WMS_VERSION)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-params-version-4">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>When a GetCapabilities request is made with VERSION set to [[VAR_WMS_VERSION]] and WMTVER set to 100.0.0 and VERSION precedes WMTVER, then the version returned is [[VAR_WMS_VERSION]].</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>WMTVER = 100.0.0</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where /WMT_MS_Capabilities/@version = [[VAR_WMS_VERSION]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.params.version</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>VERSION=<xsl:value-of select="$VAR_WMS_VERSION"/>&amp;</url>
               <method>get</method>
               <param name="WmTvEr">100.0.0</param>
               <param name="SeRvIcE">WMS</param>
               <param name="ReQuEsT">GetCapabilities</param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(string(/WMT_MS_Capabilities/@version)=$VAR_WMS_VERSION)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-params-version-5">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>When a GetCapabilities request is made with VERSION set to [[VAR_WMS_VERSION]] and WMTVER set to 0.0.0 and WMTVER precedes VERSION, then the version returned is [[VAR_WMS_VERSION]].</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>WMTVER = 0.0.0</td>
            </tr>
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where /WMT_MS_Capabilities/@version = [[VAR_WMS_VERSION]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.params.version</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>WMTVER=0.0.0&amp;</url>
               <method>get</method>
               <param name="SeRvIcE">WMS</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="ReQuEsT">GetCapabilities</param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(string(/WMT_MS_Capabilities/@version)=$VAR_WMS_VERSION)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-params-version-6">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>When a GetCapabilities request is made with VERSION set to [[VAR_WMS_VERSION]] and WMTVER set to 100.0.0 and WMTVER precedes VERSION, then the version returned is [[VAR_WMS_VERSION]].</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>WMTVER = 100.0.0</td>
            </tr>
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where /WMT_MS_Capabilities/@version = [[VAR_WMS_VERSION]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.params.version</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>WMTVER=100.0.0&amp;</url>
               <method>get</method>
               <param name="SeRvIcE">WMS</param>
               <param name="ReQuEsT">GetCapabilities</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(string(/WMT_MS_Capabilities/@version)=$VAR_WMS_VERSION)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-response-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>When a GetCapabilities request is made, then the content-type header of the response is application/vnd.ogc.wms_xml</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = application/vnd.ogc.wms_xml</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.response</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="SeRvIcE">WMS</param>
               <param name="ReQuEsT">GetCapabilities</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(normalize-space(substring-before(concat(/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value, ';'), ';'))='application/vnd.ogc.wms_xml')">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-response-2">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>The response to a GetCapabilities request references a valid copy of the DTD in Annex A.1 at a fully-qualified and accessible location and validates with the DTD.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML that validates with the properly configured Galdos validator</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.response</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="ReQuEsT">GetCapabilities</param>
               <param name="SeRvIcE">WMS</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <parsers:XMLValidatingParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(*)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-response-capability_metadata-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>Each OnlineResource URL intended for HTTP Get requests in the capabilities document is a URL prefix</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where each /WMT_MS_Capabilities/Capability/Request//OnlineResource@xlink:href ends in a ? or both contains a ? and ends in an &amp;.</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.response.capability_metadata</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="SeRvIcE">WMS</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="ReQuEsT">GetCapabilities</param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(count(/WMT_MS_Capabilities/Capability/Request//HTTP/Get/OnlineResource/@*[local-name() = 'href' and contains(., '?') and (substring-after(., '?') = '' or substring(., string-length(.)) = '&amp;')]) = count(/WMT_MS_Capabilities/Capability/Request//HTTP/Get))</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-response-capability_metadata-2">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>The output format application/vnd.ogc.gml is listed for the GetFeatureInfo operation.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where count(/WMT_MS_Capabilities/Capability/Request/GetFeatureInfo/Format[. = 'application/vnd.ogc.gml']) &gt; 0</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.response.capability_metadata</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="ReQuEsT">GetCapabilities</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="SeRvIcE">WMS</param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(count(/WMT_MS_Capabilities/Capability/Request/GetFeatureInfo/Format[. = 'application/vnd.ogc.gml']) &gt; 0)</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-response-general_metadata-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>The Service Name element in the capabilities document has the value "OGC:WMS".</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where /WMT_MS_Capabilities/Service/Name = "OGC:WMS"</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.response.general_metadata</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="SeRvIcE">WMS</param>
               <param name="ReQuEsT">GetCapabilities</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(string(/WMT_MS_Capabilities/Service/Name)='OGC:WMS')">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-response-general_metadata-2">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>The word "none" (case-insensitive) is used in the content of the Fees element and the AccessConstraints element of the capabilities document.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where LowerCase(/WMT_MS_Capabilities/Service/Fees) = "none" and LowerCase(/WMT_MS_Capabilities/Service/AccessConstraints) = "none"</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.response.general_metadata</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="SeRvIcE">WMS</param>
               <param name="ReQuEsT">GetCapabilities</param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(translate(/WMT_MS_Capabilities/Service/Fees, 'NOE', 'noe') = 'none' and translate(/WMT_MS_Capabilities/Service/AccessConstraints, 'NOE', 'noe') = 'none')</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-response-layer_properties-bbox-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>For each of the layer elements in the capabilities document, each BoundingBox on the layer states a different SRS.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where count(//Layer/BoundingBox[@SRS = following-sibling::*/@SRS]) = 0</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.response.layer_properties.bbox</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="SeRvIcE">WMS</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="ReQuEsT">GetCapabilities</param>
            </request>
         </xsl:variable>
         <xsl:variable name="expression">//Layer/BoundingBox[@SRS = following-sibling::*/@SRS]/@SRS</xsl:variable>
         <xsl:variable name="VAR_DUPLICATE_SRS_BBOXES">
            <xsl:for-each select="$request1">
               <xsl:value-of select="saxon:evaluate($expression)"/>
            </xsl:for-each>
         </xsl:variable>
         <message>VAR_DUPLICATE_SRS_BBOXES: <xsl:value-of select="$VAR_DUPLICATE_SRS_BBOXES"/>
         </message>
         <xsl:variable name="expression">//Layer/BoundingBox[@SRS = following-sibling::*/@SRS]/../Name</xsl:variable>
         <xsl:variable name="VAR_LAYERS_WITH_DUPLICATE_SRS">
            <xsl:for-each select="$request1">
               <xsl:value-of select="saxon:evaluate($expression)"/>
            </xsl:for-each>
         </xsl:variable>
         <message>VAR_LAYERS_WITH_DUPLICATE_SRS: <xsl:value-of select="$VAR_LAYERS_WITH_DUPLICATE_SRS"/>
         </message>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(count(//Layer/BoundingBox[@SRS = following-sibling::*/@SRS]) = 0)</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-response-layer_properties-dim_and_extent-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>There are no child Dimension elements in the capabilities document that use a name attribute that is defined in a parent layer.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where no //Layer/Dimension/@name is redefined</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.response.layer_properties.dim_and_extent</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="ReQuEsT">GetCapabilities</param>
               <param name="SeRvIcE">WMS</param>
            </request>
         </xsl:variable>
         <xsl:variable name="expression">//Layer/Dimension[translate(@name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = translate(../ancestor::Layer/Dimension/@name | following-sibling::Dimension/@name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')]/@name</xsl:variable>
         <xsl:variable name="VAR_REDEFINED_DIMS">
            <xsl:for-each select="$request1">
               <xsl:value-of select="saxon:evaluate($expression)"/>
            </xsl:for-each>
         </xsl:variable>
         <message>VAR_REDEFINED_DIMS: <xsl:value-of select="$VAR_REDEFINED_DIMS"/>
         </message>
         <xsl:variable name="expression">//Layer/Dimension[translate(@name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = translate(../ancestor::Layer/Dimension/@name | following-sibling::Dimension/@name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')]/../Name</xsl:variable>
         <xsl:variable name="VAR_LAYERS_WITH_REDEFINED_DIMS">
            <xsl:for-each select="$request1">
               <xsl:value-of select="saxon:evaluate($expression)"/>
            </xsl:for-each>
         </xsl:variable>
         <message>VAR_LAYERS_WITH_REDEFINED_DIMS: <xsl:value-of select="$VAR_LAYERS_WITH_REDEFINED_DIMS"/>
         </message>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(count(//Layer/Dimension[translate(@name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz') = translate(../ancestor::Layer/Dimension/@name | following-sibling::Dimension/@name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')]) = 0)</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-response-layer_properties-dim_and_extent-2">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>Each Extent element in the capabilities document uses a name that has been declared or inherited in a corresponding Dimension element.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where every //Layer/Extent/@name has a corresponding Layer/Dimension/@name</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.response.layer_properties.dim_and_extent</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="ReQuEsT">GetCapabilities</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="SeRvIcE">WMS</param>
            </request>
         </xsl:variable>
         <xsl:variable name="expression">//Layer[Extent and not(Extent/@name = ancestor-or-self::Layer/Dimension/@name)]/Extent/@name</xsl:variable>
         <xsl:variable name="VAR_EXTENTS_WITHOUT_DIMS">
            <xsl:for-each select="$request1">
               <xsl:value-of select="saxon:evaluate($expression)"/>
            </xsl:for-each>
         </xsl:variable>
         <message>VAR_EXTENTS_WITHOUT_DIMS: <xsl:value-of select="$VAR_EXTENTS_WITHOUT_DIMS"/>
         </message>
         <xsl:variable name="expression">//Layer[Extent and not(Extent/@name = ancestor-or-self::Layer/Dimension/@name)]/Name</xsl:variable>
         <xsl:variable name="VAR_LAYERS_WITH_EXTENTS_WITHOUT_DIMS">
            <xsl:for-each select="$request1">
               <xsl:value-of select="saxon:evaluate($expression)"/>
            </xsl:for-each>
         </xsl:variable>
         <message>VAR_LAYERS_WITH_EXTENTS_WITHOUT_DIMS: <xsl:value-of select="$VAR_LAYERS_WITH_EXTENTS_WITHOUT_DIMS"/>
         </message>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(count(//Layer[Extent and not(Extent/@name = ancestor-or-self::Layer/Dimension/@name)]) = 0)</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-response-layer_properties-identifier_and_authorityurl-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>There are no child Layer elements in the capabilities document that define an AuthorityURL with the same name attribute as one inherited from a parent layer.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where no //Layer/AuthorityURL/@name is redefined</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.response.layer_properties.identifier_and_authorityurl</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="ReQuEsT">GetCapabilities</param>
               <param name="SeRvIcE">WMS</param>
            </request>
         </xsl:variable>
         <xsl:variable name="expression">//Layer[AuthorityURL/@name = ancestor::Layer/AuthorityURL/@name]/AuthorityURL/@name</xsl:variable>
         <xsl:variable name="VAR_REDEFINED_AUTHORITY_URLS">
            <xsl:for-each select="$request1">
               <xsl:value-of select="saxon:evaluate($expression)"/>
            </xsl:for-each>
         </xsl:variable>
         <message>VAR_REDEFINED_AUTHORITY_URLS: <xsl:value-of select="$VAR_REDEFINED_AUTHORITY_URLS"/>
         </message>
         <xsl:variable name="expression">//Layer[AuthorityURL/@name = ancestor::Layer/AuthorityURL/@name]/Name</xsl:variable>
         <xsl:variable name="VAR_LAYERS_WITH_REDEFINED_AUTHORITY_URLS">
            <xsl:for-each select="$request1">
               <xsl:value-of select="saxon:evaluate($expression)"/>
            </xsl:for-each>
         </xsl:variable>
         <message>VAR_LAYERS_WITH_REDEFINED_AUTHORITY_URLS: <xsl:value-of select="$VAR_LAYERS_WITH_REDEFINED_AUTHORITY_URLS"/>
         </message>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(count(//Layer[AuthorityURL/@name = ancestor::Layer/AuthorityURL/@name]) = 0)</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-response-layer_properties-identifier_and_authorityurl-2">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>There are no Layer elements in the capabilities document that declare an Identifier without also declaring or inheriting a corresponding AuthorityURL.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where each //Layer/Identifier/@authority has a corresponding //Layer/AuthorityURL/@name</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.response.layer_properties.identifier_and_authorityurl</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="SeRvIcE">WMS</param>
               <param name="ReQuEsT">GetCapabilities</param>
            </request>
         </xsl:variable>
         <xsl:variable name="expression">//Layer/Identifier[not(@authority = ../ancestor-or-self::Layer/AuthorityURL/@name)]/@authority</xsl:variable>
         <xsl:variable name="VAR_UNDEFINED_AUTHORITIES">
            <xsl:for-each select="$request1">
               <xsl:value-of select="saxon:evaluate($expression)"/>
            </xsl:for-each>
         </xsl:variable>
         <message>VAR_UNDEFINED_AUTHORITIES: <xsl:value-of select="$VAR_UNDEFINED_AUTHORITIES"/>
         </message>
         <xsl:variable name="expression">//Layer/Identifier[not(@authority = ../ancestor-or-self::Layer/AuthorityURL/@name)]/../Name</xsl:variable>
         <xsl:variable name="VAR_LAYERS_WITH_UNDEFINED_AUTHORITIES">
            <xsl:for-each select="$request1">
               <xsl:value-of select="saxon:evaluate($expression)"/>
            </xsl:for-each>
         </xsl:variable>
         <message>VAR_LAYERS_WITH_UNDEFINED_AUTHORITIES: <xsl:value-of select="$VAR_LAYERS_WITH_UNDEFINED_AUTHORITIES"/>
         </message>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(count(//Layer/Identifier[not(@authority = ../ancestor-or-self::Layer/AuthorityURL/@name)]) = 0)</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-response-layer_properties-latlonbbox-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>The root layer in the capabilities document has a LatLonBoundingBox.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where /WMT_MS_Capabilities/Capability/Layer/LatLonBoundingBox exists</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.response.layer_properties.latlonbbox</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="ReQuEsT">GetCapabilities</param>
               <param name="SeRvIcE">WMS</param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(boolean(/WMT_MS_Capabilities/Capability/Layer/LatLonBoundingBox))</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-response-layer_properties-latlonbbox-2">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>The minx, miny, maxx, and maxy attributes on each LatLonBoundingBox are expressed in decimal degrees.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where the attributes on each //LatLonBoundingBox are numeric (scientific notation is OK).</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.response.layer_properties.latlonbbox</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="SeRvIcE">WMS</param>
               <param name="ReQuEsT">GetCapabilities</param>
            </request>
         </xsl:variable>
         <xsl:variable name="expression">//Layer/LatLonBoundingBox[contains(concat(number(@minx), number(@miny), number(@maxx), number(@maxy)), 'NaN')]/../Name</xsl:variable>
         <xsl:variable name="VAR_LAYERS_WITH_INVALID_LAT_LON_BBOX">
            <xsl:for-each select="$request1">
               <xsl:value-of select="saxon:evaluate($expression)"/>
            </xsl:for-each>
         </xsl:variable>
         <message>VAR_LAYERS_WITH_INVALID_LAT_LON_BBOX: <xsl:value-of select="$VAR_LAYERS_WITH_INVALID_LAT_LON_BBOX"/>
         </message>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(count(//Layer/LatLonBoundingBox[contains(concat(number(@minx), number(@miny), number(@maxx), number(@maxy)), 'NaN')]) = 0)</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-response-layer_properties-srs-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>The root layer in the capabilities document has at least one SRS element.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where at least one /WMT_MS_Capabilities/Capability/Layer/SRS exists</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.response.layer_properties.srs</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="ReQuEsT">GetCapabilities</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="SeRvIcE">WMS</param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(count(/WMT_MS_Capabilities/Capability/Layer/SRS) &gt; 0)</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getcapabilities-response-layer_properties-style-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>There are no child layers in the capabilities document that redefine a Style with the same name as one inherited from one of its parents.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>XML where no //Layer/Style/Name is redefined</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getcapabilities.response.layer_properties.style</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="SeRvIcE">WMS</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="ReQuEsT">GetCapabilities</param>
            </request>
         </xsl:variable>
         <xsl:variable name="expression">//Layer/Style[Name = ../ancestor::Layer/Style/Name]/../Name</xsl:variable>
         <xsl:variable name="VAR_LAYERS_WITH_REDEFINED_STYLES">
            <xsl:for-each select="$request1">
               <xsl:value-of select="saxon:evaluate($expression)"/>
            </xsl:for-each>
         </xsl:variable>
         <message>VAR_LAYERS_WITH_REDEFINED_STYLES: <xsl:value-of select="$VAR_LAYERS_WITH_REDEFINED_STYLES"/>
         </message>
         <xsl:variable name="expression">//Layer/Style[Name = ../ancestor::Layer/Style/Name]/Name</xsl:variable>
         <xsl:variable name="VAR_REDEFINED_STYLES">
            <xsl:for-each select="$request1">
               <xsl:value-of select="saxon:evaluate($expression)"/>
            </xsl:for-each>
         </xsl:variable>
         <message>VAR_REDEFINED_STYLES: <xsl:value-of select="$VAR_REDEFINED_STYLES"/>
         </message>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(count(//Layer/Style[Name = ../ancestor::Layer/Style/Name]) = 0)</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getfeatureinfo-params-exceptions-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_GET_FEATURE_INFO_FORMAT"/>
      <param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
      <assertion>When an exception is raised and the EXCEPTIONS parameter is absent from the request, then the Content-type header of the response is application/vnd.ogc.se_xml.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetFeatureInfo</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 0, -0.0020, 0.0040, 0</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 200</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>QUERY_LAYERS = UndefinedLayer</td>
            </tr>
            <tr align="left">
               <td>INFO_FORMAT = [[VAR_GET_FEATURE_INFO_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>X = 100</td>
            </tr>
            <tr align="left">
               <td>Y = 50</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = "application/vnd.ogc.se_xml"</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getfeatureinfo.params.exceptions</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="ReQuEsT">GetFeatureInfo</param>
               <param name="InFo_fOrMaT">
                  <xsl:value-of select="functions:encode($VAR_GET_FEATURE_INFO_FORMAT)"/>
               </param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="X">100</param>
               <param name="HeIgHt">100</param>
               <param name="QuErY_LaYeRs">UndefinedLayer</param>
               <param name="BbOx">0,-0.0020,0.0040,0</param>
               <param name="StYlEs"/>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="SrS">EPSG:4326</param>
               <param name="Y">50</param>
               <param name="WiDtH">200</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(normalize-space(substring-before(concat(/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value, ';'), ';')) = 'application/vnd.ogc.se_xml')</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getfeatureinfo-params-exceptions-2">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_GET_FEATURE_INFO_FORMAT"/>
      <param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
      <assertion>When an exception is raised and EXCEPTIONS=application/vnd.ogc.se_xml, then the Content-type header of the response is application/vnd.ogc.se_xml.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetFeatureInfo</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 0, -0.0020, 0.0040, 0</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 200</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>QUERY_LAYERS = UndefinedLayer</td>
            </tr>
            <tr align="left">
               <td>INFO_FORMAT = [[VAR_GET_FEATURE_INFO_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>X = 100</td>
            </tr>
            <tr align="left">
               <td>Y = 50</td>
            </tr>
            <tr align="left">
               <td>EXCEPTIONS = application/vnd.ogc.se_xml</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = "application/vnd.ogc.se_xml"</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getfeatureinfo.params.exceptions</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="InFo_fOrMaT">
                  <xsl:value-of select="functions:encode($VAR_GET_FEATURE_INFO_FORMAT)"/>
               </param>
               <param name="Y">50</param>
               <param name="QuErY_LaYeRs">UndefinedLayer</param>
               <param name="SrS">EPSG:4326</param>
               <param name="StYlEs"/>
               <param name="ReQuEsT">GetFeatureInfo</param>
               <param name="HeIgHt">100</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="X">100</param>
               <param name="BbOx">0,-0.0020,0.0040,0</param>
               <param name="WiDtH">200</param>
               <param name="ExCePtIoNs">application/vnd.ogc.se_xml</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(normalize-space(substring-before(concat(/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value, ';'), ';')) = 'application/vnd.ogc.se_xml')</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getfeatureinfo-params-feature_count-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_BASIC_POLYGONS"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_GET_FEATURE_INFO_FORMAT"/>
      <param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
      <assertion>When the FEATURE_COUNT parameter is not specified, then less data is returned than when FEATURE_COUNT is 2.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request#1:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetFeatureInfo</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_BASIC_POLYGONS]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -2, 2, 2, 6</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 100</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>QUERY_LAYERS = [[VAR_BASIC_POLYGONS]]</td>
            </tr>
            <tr align="left">
               <td>INFO_FORMAT = [[VAR_GET_FEATURE_INFO_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>X = 50</td>
            </tr>
            <tr align="left">
               <td>Y = 50</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Request#2:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 2">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetFeatureInfo</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_BASIC_POLYGONS]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -2, 2, 2, 6</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 100</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>QUERY_LAYERS = [[VAR_BASIC_POLYGONS]]</td>
            </tr>
            <tr align="left">
               <td>INFO_FORMAT = [[VAR_GET_FEATURE_INFO_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>FEATURE_COUNT = 2</td>
            </tr>
            <tr align="left">
               <td>X = 50</td>
            </tr>
            <tr align="left">
               <td>Y = 50</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Request 2 returns more bytes than request 1</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getfeatureinfo.params.feature_count</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="ReQuEsT">GetFeatureInfo</param>
               <param name="WiDtH">100</param>
               <param name="X">50</param>
               <param name="Y">50</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="HeIgHt">100</param>
               <param name="QuErY_LaYeRs">
                  <xsl:value-of select="$VAR_BASIC_POLYGONS"/>
               </param>
               <param name="BbOx">-2,2,2,6</param>
               <param name="StYlEs"/>
               <param name="InFo_fOrMaT">
                  <xsl:value-of select="functions:encode($VAR_GET_FEATURE_INFO_FORMAT)"/>
               </param>
               <param name="SrS">EPSG:4326</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_BASIC_POLYGONS"/>
               </param>
               <example:StringLength/>
            </request>
         </xsl:variable>
         <xsl:variable name="expression">string(/length)</xsl:variable>
         <xsl:variable name="VAR_SIZE_1">
            <xsl:for-each select="$request1">
               <xsl:value-of select="saxon:evaluate($expression)"/>
            </xsl:for-each>
         </xsl:variable>
         <message>VAR_SIZE_1: <xsl:value-of select="$VAR_SIZE_1"/>
         </message>
         <xsl:variable name="request2">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="Y">50</param>
               <param name="QuErY_LaYeRs">
                  <xsl:value-of select="$VAR_BASIC_POLYGONS"/>
               </param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="ReQuEsT">GetFeatureInfo</param>
               <param name="FeAtUrE_CoUnT">2</param>
               <param name="StYlEs"/>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_BASIC_POLYGONS"/>
               </param>
               <param name="BbOx">-2,2,2,6</param>
               <param name="SrS">EPSG:4326</param>
               <param name="WiDtH">100</param>
               <param name="X">50</param>
               <param name="HeIgHt">100</param>
               <param name="InFo_fOrMaT">
                  <xsl:value-of select="functions:encode($VAR_GET_FEATURE_INFO_FORMAT)"/>
               </param>
               <example:StringLength/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request2">
            <xsl:variable name="expression">not(/length &gt; <xsl:value-of select="$VAR_SIZE_1"/>)</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getfeatureinfo-params-feature_count-2">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_BASIC_POLYGONS"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_GET_FEATURE_INFO_FORMAT"/>
      <param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
      <assertion>When the FEATURE_COUNT parameter is 1, then less data is returned than when FEATURE_COUNT is 2.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request#1:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetFeatureInfo</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_BASIC_POLYGONS]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -2, 2, 2, 6</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 100</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>QUERY_LAYERS = [[VAR_BASIC_POLYGONS]]</td>
            </tr>
            <tr align="left">
               <td>INFO_FORMAT = [[VAR_GET_FEATURE_INFO_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>FEATURE_COUNT = 1</td>
            </tr>
            <tr align="left">
               <td>X = 50</td>
            </tr>
            <tr align="left">
               <td>Y = 50</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Request#2:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 2">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetFeatureInfo</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_BASIC_POLYGONS]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -2, 2, 2, 6</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 100</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>QUERY_LAYERS = [[VAR_BASIC_POLYGONS]]</td>
            </tr>
            <tr align="left">
               <td>INFO_FORMAT = [[VAR_GET_FEATURE_INFO_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>FEATURE_COUNT = 2</td>
            </tr>
            <tr align="left">
               <td>X = 50</td>
            </tr>
            <tr align="left">
               <td>Y = 50</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Request 2 returns more bytes than request 1</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getfeatureinfo.params.feature_count</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="FeAtUrE_CoUnT">1</param>
               <param name="Y">50</param>
               <param name="StYlEs"/>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="HeIgHt">100</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_BASIC_POLYGONS"/>
               </param>
               <param name="WiDtH">100</param>
               <param name="QuErY_LaYeRs">
                  <xsl:value-of select="$VAR_BASIC_POLYGONS"/>
               </param>
               <param name="InFo_fOrMaT">
                  <xsl:value-of select="functions:encode($VAR_GET_FEATURE_INFO_FORMAT)"/>
               </param>
               <param name="X">50</param>
               <param name="ReQuEsT">GetFeatureInfo</param>
               <param name="BbOx">-2,2,2,6</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="SrS">EPSG:4326</param>
               <example:StringLength/>
            </request>
         </xsl:variable>
         <xsl:variable name="expression">string(/length)</xsl:variable>
         <xsl:variable name="VAR_SIZE_1">
            <xsl:for-each select="$request1">
               <xsl:value-of select="saxon:evaluate($expression)"/>
            </xsl:for-each>
         </xsl:variable>
         <message>VAR_SIZE_1: <xsl:value-of select="$VAR_SIZE_1"/>
         </message>
         <xsl:variable name="request2">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="Y">50</param>
               <param name="ReQuEsT">GetFeatureInfo</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="SrS">EPSG:4326</param>
               <param name="FeAtUrE_CoUnT">2</param>
               <param name="WiDtH">100</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_BASIC_POLYGONS"/>
               </param>
               <param name="HeIgHt">100</param>
               <param name="InFo_fOrMaT">
                  <xsl:value-of select="functions:encode($VAR_GET_FEATURE_INFO_FORMAT)"/>
               </param>
               <param name="QuErY_LaYeRs">
                  <xsl:value-of select="$VAR_BASIC_POLYGONS"/>
               </param>
               <param name="BbOx">-2,2,2,6</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="StYlEs"/>
               <param name="X">50</param>
               <example:StringLength/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request2">
            <xsl:variable name="expression">not(/length &gt; <xsl:value-of select="$VAR_SIZE_1"/>)</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getfeatureinfo-params-info_format-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
      <param name="VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
      <assertion>When the INFO_FORMAT parameter is missing, then the Content-type header returned is one of the formats advertised.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request#1:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetFeatureInfo</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 0, -0.0020, 0.0040, 0</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 200</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>QUERY_LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>X = 60</td>
            </tr>
            <tr align="left">
               <td>Y = 60</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Request#2:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 2">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>SERVICE = WMS</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetCapabilities</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>The response from request #2 is XML where one of the /WMT_MS_Capabilities//Capability/Request/GetFeatureInfo/Format values = the content-type header for request #1</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getfeatureinfo.params.info_format</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="HeIgHt">100</param>
               <param name="StYlEs"/>
               <param name="WiDtH">200</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="Y">60</param>
               <param name="BbOx">0,-0.0020,0.0040,0</param>
               <param name="SrS">EPSG:4326</param>
               <param name="X">60</param>
               <param name="ReQuEsT">GetFeatureInfo</param>
               <param name="QuErY_LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:variable name="expression">normalize-space(substring-before(concat(/headers/header[translate(name, "CONTYPE", "contype") = "content-type"]/value, ';'), ';'))</xsl:variable>
         <xsl:variable name="VAR_DEFAULT_INFO_FORMAT">
            <xsl:for-each select="$request1">
               <xsl:value-of select="saxon:evaluate($expression)"/>
            </xsl:for-each>
         </xsl:variable>
         <message>VAR_DEFAULT_INFO_FORMAT: <xsl:value-of select="$VAR_DEFAULT_INFO_FORMAT"/>
         </message>
         <xsl:for-each select="$request1">
            <xsl:if test="not(*)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
         <xsl:variable name="request2">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_CAPABILITIES_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="SeRvIcE">WMS</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="ReQuEsT">GetCapabilities</param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request2">
            <xsl:variable name="expression">not(count(/WMT_MS_Capabilities//Capability/Request/GetFeatureInfo/Format[. = '<xsl:value-of select="$VAR_DEFAULT_INFO_FORMAT"/>']) &gt; 0)</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getfeatureinfo-params-info_format-2">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
      <assertion>When the INFO_FORMAT parameter is application/vnd.ogc.gml, then the Content-type header returned is the same.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetFeatureInfo</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 0, -0.0020, 0.0040, 0</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 200</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>QUERY_LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>INFO_FORMAT = application/vnd.ogc.gml</td>
            </tr>
            <tr align="left">
               <td>X = 60</td>
            </tr>
            <tr align="left">
               <td>Y = 60</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = "application/vnd.ogc.gml"</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getfeatureinfo.params.info_format</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="QuErY_LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="BbOx">0,-0.0020,0.0040,0</param>
               <param name="WiDtH">200</param>
               <param name="InFo_fOrMaT">application/vnd.ogc.gml</param>
               <param name="HeIgHt">100</param>
               <param name="X">60</param>
               <param name="SrS">EPSG:4326</param>
               <param name="Y">60</param>
               <param name="ReQuEsT">GetFeatureInfo</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="StYlEs"/>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(normalize-space(substring-before(concat(/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value, ';'), ';'))='application/vnd.ogc.gml')">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getfeatureinfo-params-info_format-3">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
      <assertion>When the INFO_FORMAT parameter is application/vnd.ogc.gml, then the response validates with the Galdos GML instance document validator.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetFeatureInfo</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 0, -0.0020, 0.0040, 0</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 200</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>QUERY_LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>INFO_FORMAT = application/vnd.ogc.gml</td>
            </tr>
            <tr align="left">
               <td>X = 60</td>
            </tr>
            <tr align="left">
               <td>Y = 60</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Valid GML</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getfeatureinfo.params.info_format</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="QuErY_LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="BbOx">0,-0.0020,0.0040,0</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="ReQuEsT">GetFeatureInfo</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="InFo_fOrMaT">application/vnd.ogc.gml</param>
               <param name="X">60</param>
               <param name="StYlEs"/>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="SrS">EPSG:4326</param>
               <param name="WiDtH">200</param>
               <param name="HeIgHt">100</param>
               <param name="Y">60</param>
               <wms:GMLValidatingParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(*)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getfeatureinfo-params-query_layers-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_GET_FEATURE_INFO_FORMAT"/>
      <param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
      <assertion>When a GetFeatureInfo request contains a single layer, then the response is valid.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetFeatureInfo</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 0, -0.0020, 0.0040, 0</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 200</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>QUERY_LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>INFO_FORMAT = [[VAR_GET_FEATURE_INFO_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>X = 60</td>
            </tr>
            <tr align="left">
               <td>Y = 60</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = [[VAR_GET_FEATURE_INFO_FORMAT]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getfeatureinfo.params.query_layers</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="ReQuEsT">GetFeatureInfo</param>
               <param name="QuErY_LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="BbOx">0,-0.0020,0.0040,0</param>
               <param name="X">60</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="InFo_fOrMaT">
                  <xsl:value-of select="functions:encode($VAR_GET_FEATURE_INFO_FORMAT)"/>
               </param>
               <param name="WiDtH">200</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="SrS">EPSG:4326</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="StYlEs"/>
               <param name="HeIgHt">100</param>
               <param name="Y">60</param>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="contentType" select=".//header[matches(name,'Content-Type','i')]/value"/>
            <xsl:if test="not(contains($contentType, $VAR_GET_FEATURE_INFO_FORMAT))">
               <ctl:message>[FAIL] Expected Content-Type '<xsl:value-of select="$VAR_GET_FEATURE_INFO_FORMAT"/>', 
	but received '<xsl:value-of select=".//header[matches(name,'Content-Type','i')]/value"/>'.</ctl:message>
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getfeatureinfo-params-query_layers-2">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_NAMED_PLACES"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_GET_FEATURE_INFO_FORMAT"/>
      <param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
      <assertion>When a GetFeatureInfo request contains two layers, then the response is valid.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetFeatureInfo</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_NAMED_PLACES]], [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 0, -0.0020, 0.0040, 0</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 200</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>QUERY_LAYERS = [[VAR_NAMED_PLACES]], [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>INFO_FORMAT = [[VAR_GET_FEATURE_INFO_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>X = 60</td>
            </tr>
            <tr align="left">
               <td>Y = 60</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = [[VAR_GET_FEATURE_INFO_FORMAT]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getfeatureinfo.params.query_layers</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="WiDtH">200</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="HeIgHt">100</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_NAMED_PLACES"/>,<xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="Y">60</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="QuErY_LaYeRs">
                  <xsl:value-of select="$VAR_NAMED_PLACES"/>,<xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="SrS">EPSG:4326</param>
               <param name="StYlEs"/>
               <param name="X">60</param>
               <param name="ReQuEsT">GetFeatureInfo</param>
               <param name="InFo_fOrMaT">
                  <xsl:value-of select="functions:encode($VAR_GET_FEATURE_INFO_FORMAT)"/>
               </param>
               <param name="BbOx">0,-0.0020,0.0040,0</param>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="contentType" select=".//header[matches(name,'Content-Type','i')]/value"/>
            <xsl:if test="not(contains($contentType, $VAR_GET_FEATURE_INFO_FORMAT))">
               <ctl:message>[FAIL] Expected Content-Type '<xsl:value-of select="$VAR_GET_FEATURE_INFO_FORMAT"/>', 
	but received '<xsl:value-of select=".//header[matches(name,'Content-Type','i')]/value"/>'.</ctl:message>
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getfeatureinfo-params-query_layers-3">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_NAMED_PLACES"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_FORESTS"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_GET_FEATURE_INFO_FORMAT"/>
      <param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
      <assertion>When a GetFeatureInfo request contains three layers, then the response is valid.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetFeatureInfo</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_NAMED_PLACES]], [[VAR_LAKES]], [[VAR_FORESTS]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 0, -0.0020, 0.0040, 0</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 200</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>QUERY_LAYERS = [[VAR_NAMED_PLACES]], [[VAR_LAKES]], [[VAR_FORESTS]]</td>
            </tr>
            <tr align="left">
               <td>INFO_FORMAT = [[VAR_GET_FEATURE_INFO_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>X = 60</td>
            </tr>
            <tr align="left">
               <td>Y = 60</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = [[VAR_GET_FEATURE_INFO_FORMAT]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getfeatureinfo.params.query_layers</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="QuErY_LaYeRs">
                  <xsl:value-of select="$VAR_NAMED_PLACES"/>,<xsl:value-of select="$VAR_LAKES"/>,<xsl:value-of select="$VAR_FORESTS"/>
               </param>
               <param name="WiDtH">200</param>
               <param name="StYlEs"/>
               <param name="HeIgHt">100</param>
               <param name="InFo_fOrMaT">
                  <xsl:value-of select="functions:encode($VAR_GET_FEATURE_INFO_FORMAT)"/>
               </param>
               <param name="Y">60</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_NAMED_PLACES"/>,<xsl:value-of select="$VAR_LAKES"/>,<xsl:value-of select="$VAR_FORESTS"/>
               </param>
               <param name="SrS">EPSG:4326</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="X">60</param>
               <param name="ReQuEsT">GetFeatureInfo</param>
               <param name="BbOx">0,-0.0020,0.0040,0</param>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(contains((/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value), $VAR_GET_FEATURE_INFO_FORMAT))">
               <ctl:message>[FAIL] Expected Content-Type '<xsl:value-of select="$VAR_GET_FEATURE_INFO_FORMAT"/>', but received '<xsl:value-of select=".//header[matches(name,'Content-Type','i')]/value"/>'.</ctl:message>
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getfeatureinfo-params-query_layers-4">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_NAMED_PLACES"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_STREAMS"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_GET_FEATURE_INFO_FORMAT"/>
      <param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
      <assertion>When a GetFeatureInfo request contains fewer layers in the QUERY_LAYERS parameter than it does in the LAYERS parameter, then the response is valid.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetFeatureInfo</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_NAMED_PLACES]], [[VAR_LAKES]], [[VAR_STREAMS]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 0, -0.0020, 0.0040, 0</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 200</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>QUERY_LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>INFO_FORMAT = [[VAR_GET_FEATURE_INFO_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>X = 60</td>
            </tr>
            <tr align="left">
               <td>Y = 60</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = [[VAR_GET_FEATURE_INFO_FORMAT]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getfeatureinfo.params.query_layers</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="SrS">EPSG:4326</param>
               <param name="ReQuEsT">GetFeatureInfo</param>
               <param name="InFo_fOrMaT">
                  <xsl:value-of select="functions:encode($VAR_GET_FEATURE_INFO_FORMAT)"/>
               </param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_NAMED_PLACES"/>,<xsl:value-of select="$VAR_LAKES"/>,<xsl:value-of select="$VAR_STREAMS"/>
               </param>
               <param name="WiDtH">200</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="HeIgHt">100</param>
               <param name="Y">60</param>
               <param name="StYlEs"/>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="QuErY_LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="BbOx">0,-0.0020,0.0040,0</param>
               <param name="X">60</param>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(contains((/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value), $VAR_GET_FEATURE_INFO_FORMAT))">
               <ctl:message>[FAIL] Expected Content-Type '<xsl:value-of select="$VAR_GET_FEATURE_INFO_FORMAT"/>', but received '<xsl:value-of select=".//header[matches(name,'Content-Type','i')]/value"/>'.</ctl:message>
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getfeatureinfo-params-query_layers-5">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_GET_FEATURE_INFO_FORMAT"/>
      <param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
      <assertion>When a layer requested is not contained in the Capabilities XML of the WMS, then the server issues a Service Exception.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetFeatureInfo</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 0, -0.0020, 0.0040, 0</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 200</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>QUERY_LAYERS = UndefinedLayer</td>
            </tr>
            <tr align="left">
               <td>INFO_FORMAT = [[VAR_GET_FEATURE_INFO_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>X = 60</td>
            </tr>
            <tr align="left">
               <td>Y = 60</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Valid XML where /ServiceExceptionReport/ServiceException exists</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getfeatureinfo.params.query_layers</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="BbOx">0,-0.0020,0.0040,0</param>
               <param name="X">60</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="InFo_fOrMaT">
                  <xsl:value-of select="functions:encode($VAR_GET_FEATURE_INFO_FORMAT)"/>
               </param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="Y">60</param>
               <param name="ReQuEsT">GetFeatureInfo</param>
               <param name="QuErY_LaYeRs">UndefinedLayer</param>
               <param name="StYlEs"/>
               <param name="SrS">EPSG:4326</param>
               <param name="HeIgHt">100</param>
               <param name="WiDtH">200</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(boolean(/ServiceExceptionReport/ServiceException))</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getfeatureinfo-params-query_layers-6">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_UNQUERYABLE_LAYER"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_GET_FEATURE_INFO_FORMAT"/>
      <param name="VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
      <assertion>When GetFeatureInfo is requested on a Layer that is not queryable, then the server issues a Service Exception (code="LayerNotQueryable").</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetFeatureInfo</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_UNQUERYABLE_LAYER]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -1, -1, 1, 1</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 100</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>QUERY_LAYERS = [[VAR_UNQUERYABLE_LAYER]]</td>
            </tr>
            <tr align="left">
               <td>INFO_FORMAT = [[VAR_GET_FEATURE_INFO_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>X = 50</td>
            </tr>
            <tr align="left">
               <td>Y = 50</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Valid XML where /ServiceExceptionReport/ServiceException[code='LayerNotQueryable'] exists</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getfeatureinfo.params.query_layers</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_FEATURE_INFO_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="QuErY_LaYeRs">
                  <xsl:value-of select="$VAR_UNQUERYABLE_LAYER"/>
               </param>
               <param name="Y">50</param>
               <param name="ReQuEsT">GetFeatureInfo</param>
               <param name="HeIgHt">100</param>
               <param name="InFo_fOrMaT">
                  <xsl:value-of select="functions:encode($VAR_GET_FEATURE_INFO_FORMAT)"/>
               </param>
               <param name="WiDtH">100</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_UNQUERYABLE_LAYER"/>
               </param>
               <param name="BbOx">-1,-1,1,1</param>
               <param name="X">50</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="StYlEs"/>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="SrS">EPSG:4326</param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(boolean(/ServiceExceptionReport/ServiceException[@code='LayerNotQueryable']))</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-bbox-1">
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_BASIC_POLYGONS"/>
      <param name="VAR_READABLE_IMAGE_FORMAT"/>
      <assertion>When a GetMap request uses integer values for the BBOX parameter, then the response is valid.</assertion>
      <comment><![CDATA[<table xmlns:cite="http://www.opengis.net/cite/testNotation" summary="Details">
   <tr align="left" valign="top">
      <td>The user will be asked to manually verify that the image contains a diamond polygon that fills the picture.</td>
   </tr>
</table>]]></comment>
      <link/>
      <code>
         <xsl:variable name="form-values">
            <ctl:form width="900" height="700">
               <img border="1"
                    src="{$VAR_WMS_GET_MAP_HTTP_GET_URL}VERSION={$VAR_WMS_VERSION}&amp;REQUEST=GetMap&amp;LAYERS={$VAR_BASIC_POLYGONS}&amp;STYLES=&amp;SRS=EPSG:4326&amp;BBOX=-1,-1,1,+1&amp;WIDTH=400&amp;HEIGHT=400&amp;FORMAT={$VAR_READABLE_IMAGE_FORMAT}"/>
               <p>
                  Does the image above depict a large diamond that fills the frame?
          </p>
               <p>
                  <input type="submit" name="submit" value="yes"/>
                  <input type="submit" name="submit" value="no"/>
               </p>
            </ctl:form>
         </xsl:variable>
         <xsl:if test="not($form-values/values/value[@key='submit']='yes')">
            <fail/>
         </xsl:if>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-bbox-2">
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_STREAMS"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_PONDS"/>
      <param name="VAR_BRIDGES"/>
      <param name="VAR_ROAD_SEGMENTS"/>
      <param name="VAR_DIVIDED_ROUTES"/>
      <param name="VAR_BUILDINGS"/>
      <param name="VAR_MAP_NEATLINE"/>
      <param name="VAR_READABLE_IMAGE_FORMAT"/>
      <param name="hosturl"/>
      <assertion>When a GetMap request uses decimal values for the BBOX parameter, then the response is valid.</assertion>
      <comment><![CDATA[<table xmlns:cite="http://www.opengis.net/cite/testNotation" summary="Details">
   <tr align="left" valign="top">
      <td>The user will be asked to manually verify that image #1 contains a map of the Blue Lake vicinity with a surrounding neatline and image #2 contains a slightly closer view of the same area where the surrounding neatline is not visible.</td>
   </tr>
</table>]]></comment>
      <link/>
      <code>
         <xsl:variable name="form-values">
            <ctl:form width="900" height="700">
               <table>
                  <tr>
                     <td>
                        <img src="{$VAR_WMS_GET_MAP_HTTP_GET_URL}VERSION={$VAR_WMS_VERSION}&amp;REQUEST=GetMap&amp;LAYERS={$VAR_STREAMS},{$VAR_LAKES},{$VAR_PONDS},{$VAR_BRIDGES},{$VAR_ROAD_SEGMENTS},{$VAR_DIVIDED_ROUTES},{$VAR_BUILDINGS},{$VAR_MAP_NEATLINE}&amp;STYLES=&amp;SRS=EPSG:4326&amp;BBOX=-0.005,-0.0025,.005,0.0025&amp;WIDTH=400&amp;HEIGHT=200&amp;FORMAT={$VAR_READABLE_IMAGE_FORMAT}"/>
                     </td>
                     <td>
                        <img src="{$VAR_WMS_GET_MAP_HTTP_GET_URL}VERSION={$VAR_WMS_VERSION}&amp;REQUEST=GetMap&amp;LAYERS={$VAR_STREAMS},{$VAR_LAKES},{$VAR_PONDS},{$VAR_BRIDGES},{$VAR_ROAD_SEGMENTS},{$VAR_DIVIDED_ROUTES},{$VAR_BUILDINGS},{$VAR_MAP_NEATLINE}&amp;STYLES=&amp;SRS=EPSG:4326&amp;BBOX=-.004,-0.002,+.004,+0.002&amp;WIDTH=400&amp;HEIGHT=200&amp;FORMAT={$VAR_READABLE_IMAGE_FORMAT}"/>
                     </td>
                  </tr>
               </table>
               <p>
                                        The picture on the left should show a map of the Blue Lake vicinity with a surrounding neatline.
                                        The picture on the right should show a slightly closer view of the same area where the surrounding neatline is not visible.
                                        Are the pictures correct?
          </p>
               <p>
                  <input xmlns="" type="submit" name="submit" value="yes"/>
                  <input xmlns="" type="submit" name="submit" value="no"/>
               </p>
               <p>
                                        Refer to the <a href="{$hosturl}/OGCTestData/wms/1.1.1/data/WmsTestData_files/bluelake_features.gif"
                     target="_blank">Overview of Blue Lake vicinity features</a>
                                        for a diagram of the Blue Lake vicinity features.
          </p>
            </ctl:form>
         </xsl:variable>
         <xsl:if test="not($form-values/values/value[@key='submit']='yes')">
            <fail/>
         </xsl:if>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-bbox-10">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_PONDS"/>
      <param name="VAR_LOSSLESS_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a request contains a Bounding Box with y values that are beyond 90 degrees, then the server returns empty content for the area beyond 90 degrees.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_PONDS]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -5, 90, 5, 100</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 100</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_LOSSLESS_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Image where all pixels are white</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.bbox</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="StYlEs"/>
               <param name="HeIgHt">100</param>
               <param name="WiDtH">100</param>
               <param name="SrS">EPSG:4326</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_PONDS"/>
               </param>
               <param name="BbOx">-5,90,5,100</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_LOSSLESS_FORMAT)"/>
               </param>
               <param name="ReQuEsT">GetMap</param>
               <example:ImageStats>

                                                &lt;image_stats&gt;
                                                        &lt;model value="RGB"&gt;
                                                                &lt;count bands="RGB" sample="all"&gt;&lt;/count&gt;
                                                        &lt;/model&gt;
                                                &lt;/image_stats&gt;

          </example:ImageStats>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(count(/image_stats/model/count[@sample != '0xffffff']) = 0)</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-bbox-11">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_PONDS"/>
      <param name="VAR_LOSSLESS_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a request contains a Bounding Box with x values that are beyond 180 degrees, then the server returns empty content for the area beyond 180 degrees.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_PONDS]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 359.9978, 0.0014, 359.9988, 0.0022</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 100</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_LOSSLESS_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Image where all pixels are white</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.bbox</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_LOSSLESS_FORMAT)"/>
               </param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_PONDS"/>
               </param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="WiDtH">100</param>
               <param name="StYlEs"/>
               <param name="HeIgHt">100</param>
               <param name="SrS">EPSG:4326</param>
               <param name="ReQuEsT">GetMap</param>
               <param name="BbOx">359.9978,0.0014,359.9988,0.0022</param>
               <example:ImageStats>

                                                &lt;image_stats&gt;
                                                        &lt;model value="RGB"&gt;
                                                                &lt;count bands="RGB" sample="all"&gt;&lt;/count&gt;
                                                        &lt;/model&gt;
                                                &lt;/image_stats&gt;

          </example:ImageStats>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(count(/image_stats/model/count[@sample != '0xffffff']) = 0)</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-bbox-12">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_PONDS"/>
      <param name="VAR_LOSSLESS_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a request contains a Bounding Box with x values that are beyond 180 degrees, then the server returns content that spans the anti-meridian.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request#1:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_PONDS]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -0.0022, 0.0014, -0.0012, 0.0022</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 100</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_LOSSLESS_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Request#2:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 2">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_PONDS]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 359.9978, 0.0014, 359.9988, 0.0022</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 100</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_LOSSLESS_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Two identical images</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.bbox</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="StYlEs"/>
               <param name="SrS">EPSG:4326</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="BbOx">-0.0022,0.0014,-0.0012,0.0022</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_LOSSLESS_FORMAT)"/>
               </param>
               <param name="WiDtH">100</param>
               <param name="HeIgHt">100</param>
               <param name="ReQuEsT">GetMap</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_PONDS"/>
               </param>
               <example:ImageStats>

                                                &lt;image_stats&gt;
                                                        &lt;model value="ARGB"&gt;
                                                                &lt;checksum&gt;&lt;/checksum&gt;
                                                        &lt;/model&gt;
                                                &lt;/image_stats&gt;

          </example:ImageStats>
            </request>
         </xsl:variable>
         <xsl:variable name="expression">string(/image_stats/model/checksum)</xsl:variable>
         <xsl:variable name="VAR_CHECKSUM_1">
            <xsl:for-each select="$request1">
               <xsl:value-of select="saxon:evaluate($expression)"/>
            </xsl:for-each>
         </xsl:variable>
         <message>VAR_CHECKSUM_1: <xsl:value-of select="$VAR_CHECKSUM_1"/>
         </message>
         <xsl:variable name="request2">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="StYlEs"/>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_PONDS"/>
               </param>
               <param name="WiDtH">100</param>
               <param name="ReQuEsT">GetMap</param>
               <param name="SrS">EPSG:4326</param>
               <param name="BbOx">359.9978,0.0014,359.9988,0.0022</param>
               <param name="HeIgHt">100</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_LOSSLESS_FORMAT)"/>
               </param>
               <example:ImageStats>

                                                &lt;image_stats&gt;
                                                        &lt;model value="ARGB"&gt;
                                                                &lt;checksum&gt;&lt;/checksum&gt;
                                                        &lt;/model&gt;
                                                &lt;/image_stats&gt;

          </example:ImageStats>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request2">
            <xsl:variable name="expression">not(/image_stats/model/checksum = '<xsl:value-of select="$VAR_CHECKSUM_1"/>')</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-bbox-3">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_STREAMS"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_PONDS"/>
      <param name="VAR_BRIDGES"/>
      <param name="VAR_ROAD_SEGMENTS"/>
      <param name="VAR_DIVIDED_ROUTES"/>
      <param name="VAR_BUILDINGS"/>
      <param name="VAR_MAP_NEATLINE"/>
      <param name="VAR_LOSSLESS_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request uses scientific notation values for the BBOX parameter, then the response is valid.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request#1:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_STREAMS]], [[VAR_LAKES]], [[VAR_PONDS]], [[VAR_BRIDGES]], [[VAR_ROAD_SEGMENTS]], [[VAR_DIVIDED_ROUTES]], [[VAR_BUILDINGS]], [[VAR_MAP_NEATLINE]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -0.005, -0.0025, 0.005, 0.0025</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 400</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 200</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_LOSSLESS_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Request#2:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 2">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_STREAMS]], [[VAR_LAKES]], [[VAR_PONDS]], [[VAR_BRIDGES]], [[VAR_ROAD_SEGMENTS]], [[VAR_DIVIDED_ROUTES]], [[VAR_BUILDINGS]], [[VAR_MAP_NEATLINE]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -.0005E1, -25E-4, +05E-3, .00025E+1</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 400</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 200</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_LOSSLESS_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Images where checksum(image#1) = checksum(image#2)</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.bbox</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="BbOx">-0.005,-0.0025,0.005,0.0025</param>
               <param name="StYlEs"/>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_LOSSLESS_FORMAT)"/>
               </param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_STREAMS"/>,<xsl:value-of select="$VAR_LAKES"/>,<xsl:value-of select="$VAR_PONDS"/>,<xsl:value-of select="$VAR_BRIDGES"/>,<xsl:value-of select="$VAR_ROAD_SEGMENTS"/>,<xsl:value-of select="$VAR_DIVIDED_ROUTES"/>,<xsl:value-of select="$VAR_BUILDINGS"/>,<xsl:value-of select="$VAR_MAP_NEATLINE"/>
               </param>
               <param name="ReQuEsT">GetMap</param>
               <param name="WiDtH">400</param>
               <param name="HeIgHt">200</param>
               <param name="SrS">EPSG:4326</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <example:ImageStats>

                                                &lt;image_stats&gt;
                                                        &lt;model value="ARGB"&gt;
                                                                &lt;checksum&gt;&lt;/checksum&gt;
                                                        &lt;/model&gt;
                                                &lt;/image_stats&gt;

          </example:ImageStats>
            </request>
         </xsl:variable>
         <xsl:variable name="expression">string(/image_stats/model/checksum)</xsl:variable>
         <xsl:variable name="VAR_CHECKSUM_1">
            <xsl:for-each select="$request1">
               <xsl:value-of select="saxon:evaluate($expression)"/>
            </xsl:for-each>
         </xsl:variable>
         <message>VAR_CHECKSUM_1: <xsl:value-of select="$VAR_CHECKSUM_1"/>
         </message>
         <xsl:variable name="request2">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="StYlEs"/>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_STREAMS"/>,<xsl:value-of select="$VAR_LAKES"/>,<xsl:value-of select="$VAR_PONDS"/>,<xsl:value-of select="$VAR_BRIDGES"/>,<xsl:value-of select="$VAR_ROAD_SEGMENTS"/>,<xsl:value-of select="$VAR_DIVIDED_ROUTES"/>,<xsl:value-of select="$VAR_BUILDINGS"/>,<xsl:value-of select="$VAR_MAP_NEATLINE"/>
               </param>
               <param name="WiDtH">400</param>
               <param name="BbOx">-.0005E1,-25E-4,%2B05E-3,.00025E%2B1</param>
               <param name="HeIgHt">200</param>
               <param name="SrS">EPSG:4326</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_LOSSLESS_FORMAT)"/>
               </param>
               <param name="ReQuEsT">GetMap</param>
               <example:ImageStats>

                                                &lt;image_stats&gt;
                                                        &lt;model value="ARGB"&gt;
                                                                &lt;checksum&gt;&lt;/checksum&gt;
                                                        &lt;/model&gt;
                                                &lt;/image_stats&gt;

          </example:ImageStats>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request2">
            <xsl:variable name="expression">not(/image_stats/model/checksum = '<xsl:value-of select="$VAR_CHECKSUM_1"/>')</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-bbox-4">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_LOSSLESS_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>The server interprets the bounding box as going around the "outside" of the pixels of the image rather than through the centers of the border pixels.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 0.0016, -0.0012, 0.0026, -0.0005</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 10</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 7</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_LOSSLESS_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>The test verifies that none of the border pixels in the image returned are white</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.bbox</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_LOSSLESS_FORMAT)"/>
               </param>
               <param name="StYlEs"/>
               <param name="HeIgHt">7</param>
               <param name="WiDtH">10</param>
               <param name="ReQuEsT">GetMap</param>
               <param name="BbOx">0.0016,-0.0012,0.0026,-0.0005</param>
               <param name="SrS">EPSG:4326</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <example:ImageStats>

                                                &lt;image_stats&gt;
                                                        &lt;model value="RGB"&gt;
                                                                &lt;subimage x="0" y="0" width="10" height="1"&gt;
                                                                        &lt;count bands="RGB" sample="0xffffff"&gt;&lt;/count&gt;
                                                                &lt;/subimage&gt;
                                                                &lt;subimage x="0" y="6" width="10" height="1"&gt;
                                                                        &lt;count bands="RGB" sample="0xffffff"&gt;&lt;/count&gt;
                                                                &lt;/subimage&gt;
                                                                &lt;subimage x="0" y="1" width="1" height="5"&gt;
                                                                        &lt;count bands="RGB" sample="0xffffff"&gt;&lt;/count&gt;
                                                                &lt;/subimage&gt;
                                                                &lt;subimage x="9" y="1" width="1" height="5"&gt;
                                                                        &lt;count bands="RGB" sample="0xffffff"&gt;&lt;/count&gt;
                                                                &lt;/subimage&gt;
                                                        &lt;/model&gt;
                                                &lt;/image_stats&gt;

          </example:ImageStats>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(count(/image_stats/model/subimage[count = 0]) = 4)</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-bbox-5">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When the BBOX parameter's minimum X is greater than the maximum X, then the server throws an exception.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 1, -1, -1, 1</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 100</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Valid XML where /ServiceExceptionReport/ServiceException exists</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.bbox</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="WiDtH">100</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="BbOx">1,-1,-1,1</param>
               <param name="HeIgHt">100</param>
               <param name="SrS">EPSG:4326</param>
               <param name="ReQuEsT">GetMap</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="StYlEs"/>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(boolean(/ServiceExceptionReport/ServiceException))</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-bbox-6">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When the BBOX parameter's minimum X is equal to the maximum X, then the server throws an exception.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 1, -1, 1, 1</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 100</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Valid XML where /ServiceExceptionReport/ServiceException exists</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.bbox</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="SrS">EPSG:4326</param>
               <param name="BbOx">1,-1,1,1</param>
               <param name="ReQuEsT">GetMap</param>
               <param name="StYlEs"/>
               <param name="WiDtH">100</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="HeIgHt">100</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(boolean(/ServiceExceptionReport/ServiceException))</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-bbox-7">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When the BBOX parameter's minimum Y is greater than the maximum Y, then the server throws an exception.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -1, 1, 1, -1</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 100</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Valid XML where /ServiceExceptionReport/ServiceException exists</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.bbox</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="SrS">EPSG:4326</param>
               <param name="ReQuEsT">GetMap</param>
               <param name="BbOx">-1,1,1,-1</param>
               <param name="WiDtH">100</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="StYlEs"/>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="HeIgHt">100</param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(boolean(/ServiceExceptionReport/ServiceException))</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-bbox-8">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When the BBOX parameter's minimum Y is equal to the maximum Y, then the server throws an exception.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -1, 1, 1, 1</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 100</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Valid XML where /ServiceExceptionReport/ServiceException exists</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.bbox</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="StYlEs"/>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="SrS">EPSG:4326</param>
               <param name="ReQuEsT">GetMap</param>
               <param name="WiDtH">100</param>
               <param name="HeIgHt">100</param>
               <param name="BbOx">-1,1,1,1</param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(boolean(/ServiceExceptionReport/ServiceException))</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-bbox-9">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_PONDS"/>
      <param name="VAR_LOSSLESS_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a request contains a Bounding Box whose area does not overlap at all with the BoundingBox advertised, then the server returns empty content.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_PONDS]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -180, -90, -179, -89</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 100</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_LOSSLESS_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Image where all pixels are white</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.bbox</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="StYlEs"/>
               <param name="BbOx">-180,-90,-179,-89</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_PONDS"/>
               </param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_LOSSLESS_FORMAT)"/>
               </param>
               <param name="HeIgHt">100</param>
               <param name="SrS">EPSG:4326</param>
               <param name="WiDtH">100</param>
               <param name="ReQuEsT">GetMap</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <example:ImageStats>

                                                &lt;image_stats&gt;
                                                        &lt;model value="RGB"&gt;
                                                                &lt;count bands="RGB" sample="all"&gt;&lt;/count&gt;
                                                        &lt;/model&gt;
                                                &lt;/image_stats&gt;

          </example:ImageStats>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(count(/image_stats/model/count[@sample != '0xffffff']) = 0)</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-bgcolor-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_LOSSLESS_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request is made with no BGCOLOR parameter, then areas which are not covered contain white (0xFFFFFF) pixels.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 0, -0.0020, 0.0040, 0</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 200</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_LOSSLESS_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>An image with white pixels in the background of the image</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.bgcolor</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="HeIgHt">100</param>
               <param name="SrS">EPSG:4326</param>
               <param name="BbOx">0,-0.0020,0.0040,0</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="ReQuEsT">GetMap</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="WiDtH">200</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_LOSSLESS_FORMAT)"/>
               </param>
               <param name="StYlEs"/>
               <parsers:ImageParser>
                  <parsers:model value="RGB">
                     <parsers:subimage x="0" y="0" width="25" height="100">
                        <parsers:count bands="RGB" sample="0xffffff"/>
                     </parsers:subimage>
                     <parsers:subimage x="150" y="0" width="50" height="50">
                        <parsers:count bands="RGB" sample="0xffffff"/>
                     </parsers:subimage>
                  </parsers:model>
               </parsers:ImageParser>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(count(//parsers:subimage[parsers:count = 2500]) = 2)</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <ctl:message>[FAILED] not(count(//parsers:subimage[parsers:count = 2500]) = 2) is true.</ctl:message>
               <ctl:message>Selected image regions should be filled with white (#FFFFFF) pixels.</ctl:message>
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-bgcolor-2">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_LOSSLESS_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request is made with a BGCOLOR parameter, then areas which are not covered are set to the value of BGCOLOR.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 0, -0.0020, 0.0040, 0</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 200</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_LOSSLESS_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>BGCOLOR = 0x0000FF</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>An image with white pixels in the background of the image</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.bgcolor</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="HeIgHt">100</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="WiDtH">200</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_LOSSLESS_FORMAT)"/>
               </param>
               <param name="ReQuEsT">GetMap</param>
               <param name="BbOx">0,-0.0020,0.0040,0</param>
               <param name="BgCoLoR">0x0000FF</param>
               <param name="StYlEs"/>
               <param name="SrS">EPSG:4326</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <parsers:ImageParser>
                  <parsers:model value="RGB">
                     <parsers:subimage x="0" y="0" width="25" height="100">
                        <parsers:count bands="RGB" sample="0x0000ff"/>
                     </parsers:subimage>
                     <parsers:subimage x="150" y="0" width="50" height="50">
                        <parsers:count bands="RGB" sample="0x0000ff"/>
                     </parsers:subimage>
                  </parsers:model>
               </parsers:ImageParser>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(count(//parsers:subimage[parsers:count = 2500]) = 2)</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <ctl:message>[FAILED] not(count(//parsers:subimage[parsers:count = 2500]) = 2) is true.</ctl:message>
               <ctl:message>Selected image regions should be filled with blue (#0000FF) pixels.</ctl:message>
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-exceptions-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When an exception is raised without specifying the EXCEPTIONS parameter, then the Content-type of the return header is application/vnd.ogc.se_xml.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = NonExistant</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -1, -1, 1, 1</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 100</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = "application/vnd.ogc.se_xml"</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.exceptions</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="SrS">EPSG:4326</param>
               <param name="WiDtH">100</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="BbOx">-1,-1,1,1</param>
               <param name="LaYeRs">NonExistant</param>
               <param name="StYlEs"/>
               <param name="HeIgHt">100</param>
               <param name="ReQuEsT">GetMap</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(normalize-space(substring-before(concat(/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value, ';'), ';')) = 'application/vnd.ogc.se_xml')</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-exceptions-2">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When an exception is raised and EXCEPTIONS=application/vnd.ogc.se_xml, then the Content-type of the return header is application/vnd.ogc.se_xml.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = NonExistant</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -1, -1, 1, 1</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 100</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>EXCEPTIONS = application/vnd.ogc.se_xml</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = "application/vnd.ogc.se_xml"</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.exceptions</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="ReQuEsT">GetMap</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="StYlEs"/>
               <param name="BbOx">-1,-1,1,1</param>
               <param name="WiDtH">100</param>
               <param name="ExCePtIoNs">application/vnd.ogc.se_xml</param>
               <param name="LaYeRs">NonExistant</param>
               <param name="SrS">EPSG:4326</param>
               <param name="HeIgHt">100</param>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(normalize-space(substring-before(concat(/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value, ';'), ';')) = 'application/vnd.ogc.se_xml')</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-exceptions-3">
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_READABLE_IMAGE_FORMAT"/>
      <assertion>When an exception is raised and EXCEPTIONS=application/vnd.ogc.se_inimage, then the error messages are graphically returned as part of the content.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>The user will be asked to verify that an image containing an error message indicating that the layer requested was not defined is returned.</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.exceptions</link>
      <code>
         <xsl:variable name="form-values">
            <ctl:form width="900" height="700">
               <img border="1"
                    src="{$VAR_WMS_GET_MAP_HTTP_GET_URL}VERSION={$VAR_WMS_VERSION}&amp;REQUEST=GetMap&amp;LAYERS=NonExistant&amp;STYLES=&amp;SRS=EPSG:4326&amp;BBOX=-1,-1,1,1&amp;WIDTH=400&amp;HEIGHT=400&amp;FORMAT={$VAR_READABLE_IMAGE_FORMAT}&amp;EXCEPTIONS=application/vnd.ogc.se_inimage"/>
               <p>
                                        Does the image above contain an error message indicating that the layer requested was not defined?
          </p>
               <p>
                  <input xmlns="" type="submit" name="submit" value="yes"/>
                  <input xmlns="" type="submit" name="submit" value="no"/>
               </p>
            </ctl:form>
         </xsl:variable>
         <xsl:if test="not($form-values/values/value[@key='submit']='yes')">
            <fail/>
         </xsl:if>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-exceptions-4">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When an exception is raised and EXCEPTIONS=application/vnd.ogc.se_inimage, then the Content-type of the return header is the same as the FORMAT requested.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = NonExistant</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -1, -1, 1, 1</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 100</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>EXCEPTIONS = application/vnd.ogc.se_inimage</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = "[[VAR_IMAGE_FORMAT]]"</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.exceptions</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="WiDtH">100</param>
               <param name="SrS">EPSG:4326</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="HeIgHt">100</param>
               <param name="ExCePtIoNs">application/vnd.ogc.se_inimage</param>
               <param name="ReQuEsT">GetMap</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="LaYeRs">NonExistant</param>
               <param name="BbOx">-1,-1,1,1</param>
               <param name="StYlEs"/>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(normalize-space(substring-before(concat(/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value, ';'), ';')) = '<xsl:value-of select="$VAR_IMAGE_FORMAT"/>')</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-exceptions-5">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LOSSLESS_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When an exception is raised and EXCEPTIONS=application/vnd.ogc.se_blank, TRANSPRENT=FALSE, and BGCOLOR=0xFF0000, then the image returned contains only red pixels.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = NonExistant</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -1, -1, 1, 1</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 100</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_LOSSLESS_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>BGCOLOR = 0xFF0000</td>
            </tr>
            <tr align="left">
               <td>EXCEPTIONS = application/vnd.ogc.se_blank</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Image where all the pixels are red</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.exceptions</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_LOSSLESS_FORMAT)"/>
               </param>
               <param name="WiDtH">100</param>
               <param name="ReQuEsT">GetMap</param>
               <param name="ExCePtIoNs">application/vnd.ogc.se_blank</param>
               <param name="LaYeRs">NonExistant</param>
               <param name="BgCoLoR">0xFF0000</param>
               <param name="StYlEs"/>
               <param name="SrS">EPSG:4326</param>
               <param name="HeIgHt">100</param>
               <param name="BbOx">-1,-1,1,1</param>
               <parsers:ImageParser>
                  <parsers:model value="RGB">
                     <parsers:count bands="RGB" sample="0xff0000"/>
                  </parsers:model>
               </parsers:ImageParser>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">//parsers:count ne '10000'</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <ctl:message>[FAILED] //parsers:count ne '10000' is true.</ctl:message>
               <ctl:message>All pixels of the image returned should be red</ctl:message>
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-exceptions-6">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_TRANSPARENT_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When an exception is raised and EXCEPTIONS=application/vnd.ogc.se_blank and TRANSPRENT=TRUE, then the image returned contains only transparent pixels.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = NonExistant</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -1, -1, 1, 1</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 100</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_TRANSPARENT_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>TRANSPARENT = TRUE</td>
            </tr>
            <tr align="left">
               <td>EXCEPTIONS = application/vnd.ogc.se_blank</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Image where all the pixels are transparent</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.exceptions</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="BbOx">-1,-1,1,1</param>
               <param name="TrAnSpArEnT">TRUE</param>
               <param name="LaYeRs">NonExistant</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_TRANSPARENT_FORMAT)"/>
               </param>
               <param name="StYlEs"/>
               <param name="ExCePtIoNs">application/vnd.ogc.se_blank</param>
               <param name="SrS">EPSG:4326</param>
               <param name="ReQuEsT">GetMap</param>
               <param name="WiDtH">100</param>
               <param name="HeIgHt">100</param>
               <parsers:ImageParser>
                  <parsers:metadata/>
                  <parsers:model value="ARGB">
                     <parsers:count bands="A" sample="0x00"/>
                  </parsers:model>
               </parsers:ImageParser>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:choose><!-- if alpha channel exists, check for transparent pixels in channel --><xsl:when test="exists(//IHDR/@colorType[contains(.,'RGBAlpha')])">
                  <xsl:variable name="expression">xs:integer(//parsers:count) eq 0</xsl:variable>
                  <xsl:if test="saxon:evaluate($expression)">
                     <ctl:message>[FAILED] xs:integer(//parsers:count) eq 0 is true.</ctl:message>
                     <ctl:message>Expected some pixels with an alpha value of 0 (fully transparent).</ctl:message>
                     <fail/>
                  </xsl:if>
               </xsl:when>
               <!-- if tRNS chunk exists, check tRNS metadata for transparent color value --><xsl:when test="exists(//tRNS)">
                  <xsl:variable name="expression">((//tRNS/tRNS_RGB/@blue/text()) != '255') and ((//tRNS/tRNS_RGB/@green/text()) != '255') and ((//tRNS/tRNS_RGB/@red/text()) != '255')</xsl:variable>
                  <xsl:if test="saxon:evaluate($expression)">
                     <ctl:message>[FAILED] ((//tRNS/tRNS_RGB/@blue/text()) != '255') and ((//tRNS/tRNS_RGB/@green/text()) != '255') and ((//tRNS/tRNS_RGB/@red/text()) != '255') is true.</ctl:message>
                     <ctl:message>Expected some pixels with an alpha value of 0 (fully transparent).</ctl:message>
                     <fail/>
                  </xsl:if>
               </xsl:when>
               <xsl:otherwise>
                  <xsl:variable name="expression">xs:integer(//parsers:count) eq 0</xsl:variable>
                  <xsl:if test="saxon:evaluate($expression)">
                     <ctl:message>Neither alpha channel exists nor tRNS chunk exists and xs:integer(//parsers:count) eq 0 is true.</ctl:message>
                     <ctl:message>Expected some pixels with an alpha value of 0 (fully transparent).</ctl:message>
                     <fail/>
                  </xsl:if>
               </xsl:otherwise>
            </xsl:choose>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-exceptions-7">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When an exception is raised and EXCEPTIONS=application/vnd.ogc.se_blank, then the Content-type of the return header is the same as the FORMAT requested.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = NonExistant</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -1, -1, 1, 1</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 100</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>EXCEPTIONS = application/vnd.ogc.se_blank</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = "[[VAR_IMAGE_FORMAT]]"</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.exceptions</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="WiDtH">100</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="SrS">EPSG:4326</param>
               <param name="StYlEs"/>
               <param name="ExCePtIoNs">application/vnd.ogc.se_blank</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="HeIgHt">100</param>
               <param name="ReQuEsT">GetMap</param>
               <param name="LaYeRs">NonExistant</param>
               <param name="BbOx">-1,-1,1,1</param>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(normalize-space(substring-before(concat(/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value, ';'), ';')) = '<xsl:value-of select="$VAR_IMAGE_FORMAT"/>')</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-format-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request contains a Format that is not advertised, then the server throws a Service Exception (code="InvalidFormat").</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -1, -1, 1, 1</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 100</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = UnknownFormat</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Valid XML where /ServiceExceptionReport/ServiceException[@code="InvalidFormat"] exists</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.format</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="SrS">EPSG:4326</param>
               <param name="ReQuEsT">GetMap</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="BbOx">-1,-1,1,1</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="StYlEs"/>
               <param name="HeIgHt">100</param>
               <param name="WiDtH">100</param>
               <param name="FoRmAt">UnknownFormat</param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(boolean(/ServiceExceptionReport/ServiceException[@code='InvalidFormat']))</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-format-2">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request is made using format=image/gif, then the response is a valid gif.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 0, -0.0020, 0.0040, 0</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 200</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = image/gif</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = "image/gif" and response is a genuine image</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.format</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="FoRmAt">image/gif</param>
               <param name="StYlEs"/>
               <param name="WiDtH">200</param>
               <param name="SrS">EPSG:4326</param>
               <param name="BbOx">0,-0.0020,0.0040,0</param>
               <param name="ReQuEsT">GetMap</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="HeIgHt">100</param>
               <wms:CustomTransformer class="org.opengis.cite.transformers.ImageStats">&lt;image_stats&gt;&lt;type&gt;&lt;/type&gt;&lt;/image_stats&gt;</wms:CustomTransformer>
            </request>
         </xsl:variable>
         <xsl:variable name="custom">
            <xsl:copy-of select="$request1/response/custom/*"/>
         </xsl:variable>
         <xsl:variable name="headers">
            <xsl:copy-of select="$request1/response/headers"/>
         </xsl:variable>
         <xsl:variable name="expression">string(/image_stats/type)</xsl:variable>
         <xsl:variable name="VAR_IMAGE_TYPE">
            <xsl:for-each select="$custom">
               <xsl:value-of select="saxon:evaluate($expression)"/>
            </xsl:for-each>
         </xsl:variable>
         <message>VAR_IMAGE_TYPE: <xsl:value-of select="$VAR_IMAGE_TYPE"/>
         </message>
         <xsl:for-each select="$headers">
            <xsl:variable name="expression">not(boolean('<xsl:value-of select="$VAR_IMAGE_TYPE"/>' = 'gif' and normalize-space(substring-before(concat(/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value, ';'), ';')) = 'image/gif'))</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-format-3">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request is made using format=image/jpeg, then the response is a valid jpeg.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 0, -0.0020, 0.0040, 0</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 200</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = image/jpeg</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = "image/jpeg" and response is a genuine image</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.format</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="StYlEs"/>
               <param name="WiDtH">200</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="SrS">EPSG:4326</param>
               <param name="ReQuEsT">GetMap</param>
               <param name="BbOx">0,-0.0020,0.0040,0</param>
               <param name="FoRmAt">image/jpeg</param>
               <param name="HeIgHt">100</param>
               <wms:CustomTransformer class="org.opengis.cite.transformers.ImageStats">&lt;image_stats&gt;&lt;type&gt;&lt;/type&gt;&lt;/image_stats&gt;</wms:CustomTransformer>
            </request>
         </xsl:variable>
         <xsl:variable name="custom">
            <xsl:copy-of select="$request1/response/custom/*"/>
         </xsl:variable>
         <xsl:variable name="headers">
            <xsl:copy-of select="$request1/response/headers"/>
         </xsl:variable>
         <xsl:variable name="expression">string(/image_stats/type)</xsl:variable>
         <xsl:variable name="VAR_IMAGE_TYPE">
            <xsl:for-each select="$custom">
               <xsl:value-of select="saxon:evaluate($expression)"/>
            </xsl:for-each>
         </xsl:variable>
         <message>VAR_IMAGE_TYPE: <xsl:value-of select="$VAR_IMAGE_TYPE"/>
         </message>
         <xsl:for-each select="$headers">
            <xsl:variable name="expression">not(boolean('<xsl:value-of select="$VAR_IMAGE_TYPE"/>' = 'jpeg' and normalize-space(substring-before(concat(/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value, ';'), ';')) = 'image/jpeg'))</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-format-4">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request is made using format=image/png, then the response is a valid png.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 0, -0.0020, 0.0040, 0</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 200</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = image/png</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = "image/png" and response is a genuine image</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.format</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="HeIgHt">100</param>
               <param name="ReQuEsT">GetMap</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="WiDtH">200</param>
               <param name="StYlEs"/>
               <param name="FoRmAt">image/png</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="BbOx">0,-0.0020,0.0040,0</param>
               <param name="SrS">EPSG:4326</param>
               <wms:CustomTransformer class="org.opengis.cite.transformers.ImageStats">&lt;image_stats&gt;&lt;type&gt;&lt;/type&gt;&lt;/image_stats&gt;</wms:CustomTransformer>
            </request>
         </xsl:variable>
         <xsl:variable name="custom">
            <xsl:copy-of select="$request1/response/custom/*"/>
         </xsl:variable>
         <xsl:variable name="headers">
            <xsl:copy-of select="$request1/response/headers"/>
         </xsl:variable>
         <xsl:variable name="expression">string(/image_stats/type)</xsl:variable>
         <xsl:variable name="VAR_IMAGE_TYPE">
            <xsl:for-each select="$custom">
               <xsl:value-of select="saxon:evaluate($expression)"/>
            </xsl:for-each>
         </xsl:variable>
         <message>VAR_IMAGE_TYPE: <xsl:value-of select="$VAR_IMAGE_TYPE"/>
         </message>
         <xsl:for-each select="$headers">
            <xsl:variable name="expression">not(boolean('<xsl:value-of select="$VAR_IMAGE_TYPE"/>' = 'png' and normalize-space(substring-before(concat(/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value, ';'), ';')) = 'image/png'))</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-layers-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request contains a single layer name, then the response is valid.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 0, -0.0020, 0.0040, 0</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 200</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = [[VAR_IMAGE_FORMAT]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.layers</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="HeIgHt">100</param>
               <param name="SrS">EPSG:4326</param>
               <param name="ReQuEsT">GetMap</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="BbOx">0,-0.0020,0.0040,0</param>
               <param name="StYlEs"/>
               <param name="WiDtH">200</param>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(normalize-space(substring-before(concat(/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value, ';'), ';'))=$VAR_IMAGE_FORMAT)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-layers-2">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_STREAMS"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request contains two layer names (separated by a comma), then the response is valid.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]], [[VAR_STREAMS]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -0.0042, -0.0024, 0.0042, 0.0024</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 168</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 96</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = [[VAR_IMAGE_FORMAT]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.layers</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>,<xsl:value-of select="$VAR_STREAMS"/>
               </param>
               <param name="ReQuEsT">GetMap</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="HeIgHt">96</param>
               <param name="WiDtH">168</param>
               <param name="StYlEs"/>
               <param name="BbOx">-0.0042,-0.0024,0.0042,0.0024</param>
               <param name="SrS">EPSG:4326</param>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(normalize-space(substring-before(concat(/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value, ';'), ';'))=$VAR_IMAGE_FORMAT)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-layers-3">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_MAP_NEATLINE"/>
      <param name="VAR_ROAD_SEGMENTS"/>
      <param name="VAR_DIVIDED_ROUTES"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request contains three layer names (separated by commas), then the response is valid.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_MAP_NEATLINE]], [[VAR_ROAD_SEGMENTS]], [[VAR_DIVIDED_ROUTES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -0.0042, -0.0024, 0.0042, 0.0024</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 168</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 96</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = [[VAR_IMAGE_FORMAT]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.layers</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="BbOx">-0.0042,-0.0024,0.0042,0.0024</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_MAP_NEATLINE"/>,<xsl:value-of select="$VAR_ROAD_SEGMENTS"/>,<xsl:value-of select="$VAR_DIVIDED_ROUTES"/>
               </param>
               <param name="SrS">EPSG:4326</param>
               <param name="WiDtH">168</param>
               <param name="HeIgHt">96</param>
               <param name="StYlEs"/>
               <param name="ReQuEsT">GetMap</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(normalize-space(substring-before(concat(/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value, ';'), ';'))=$VAR_IMAGE_FORMAT)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-layers-4">
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_FORESTS"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_NAMED_PLACES"/>
      <param name="VAR_READABLE_IMAGE_FORMAT"/>
      <param name="hosturl"/>
      <assertion>When a GetMap request contains multiple layers, then the response renders the requested layers by drawing the leftmost in the list bottommost, and the next one over that.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>The user will be asked to manually verify that for request #1, Goose Island, Blue Lake, and Ashton are above State Forest.  For request #2, State Forest is above Ashton, and Blue Lake and Goose Island are not visible.  If it is not be possible to tell which feature is on top of another, the test will pass.</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.layers</link>
      <code>
         <xsl:variable name="form-values">
            <ctl:form width="900" height="700">
               <table>
                  <tr>
                     <td>
                        <img src="{$VAR_WMS_GET_MAP_HTTP_GET_URL}VERSION={$VAR_WMS_VERSION}&amp;REQUEST=GetMap&amp;LAYERS={$VAR_FORESTS},{$VAR_LAKES},{$VAR_NAMED_PLACES}&amp;STYLES=&amp;SRS=EPSG:4326&amp;BBOX=-0.0042,-0.0024,0.0042,0.0024&amp;WIDTH=168&amp;HEIGHT=96&amp;FORMAT={$VAR_READABLE_IMAGE_FORMAT}"/>
                     </td>
                     <td>
                        <img src="{$VAR_WMS_GET_MAP_HTTP_GET_URL}VERSION={$VAR_WMS_VERSION}&amp;REQUEST=GetMap&amp;LAYERS={$VAR_NAMED_PLACES},{$VAR_LAKES},{$VAR_FORESTS}&amp;STYLES=&amp;SRS=EPSG:4326&amp;BBOX=-0.0042,-0.0024,0.0042,0.0024&amp;WIDTH=168&amp;HEIGHT=96&amp;FORMAT={$VAR_READABLE_IMAGE_FORMAT}"/>
                     </td>
                  </tr>
               </table>
               <p>
                                        In the picture on the left, Goose Island, Blue Lake, and Ashton should be above State Forest.
                                        In the picture on the right, State Forest should be above Ashton, Blue Lake, and Goose Island.
                                        Are the pictures correct?
          </p>
               <p>
                  <input xmlns="" type="submit" name="submit" value="yes"/>
                  <input xmlns="" type="submit" name="submit" value="no"/>
               </p>
               <p>
                                        Refer to the <a href="{$hosturl}/OGCTestData/wms/1.1.1/data/WmsTestData_files/bluelake_features.gif"
                     target="_blank">Overview of Blue Lake vicinity features</a>
                                        for a diagram of the relevant features.
          </p>
            </ctl:form>
         </xsl:variable>
         <xsl:if test="not($form-values/values/value[@key='submit']='yes')">
            <fail/>
         </xsl:if>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-layers-5">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When the layer in a GetMap request is invalid, then the response is an exception (code="LayerNotDefined").</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = NonExistant</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -0.0042, -0.0024, 0.0042, 0.0024</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 168</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 96</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Valid XML where /ServiceExceptionReport/ServiceException[@code="LayerNotDefined"] exists</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.layers</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="SrS">EPSG:4326</param>
               <param name="LaYeRs">NonExistant</param>
               <param name="StYlEs"/>
               <param name="ReQuEsT">GetMap</param>
               <param name="HeIgHt">96</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="BbOx">-0.0042,-0.0024,0.0042,0.0024</param>
               <param name="WiDtH">168</param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(boolean(/ServiceExceptionReport/ServiceException[@code='LayerNotDefined']))</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-layers-6">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request contains two layers where the first is valid and the second is invalid, then the response is an exception (code="LayerNotDefined").</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]], NonExistant</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -0.0042, -0.0024, 0.0042, 0.0024</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 168</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 96</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Valid XML where /ServiceExceptionReport/ServiceException[@code="LayerNotDefined"] exists</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.layers</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="WiDtH">168</param>
               <param name="ReQuEsT">GetMap</param>
               <param name="BbOx">-0.0042,-0.0024,0.0042,0.0024</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="SrS">EPSG:4326</param>
               <param name="HeIgHt">96</param>
               <param name="StYlEs"/>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>,NonExistant</param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(boolean(/ServiceExceptionReport/ServiceException[@code='LayerNotDefined']))</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-layers-7">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request contains two layers where the first is invalid and the second is valid, then the response is an exception (code="LayerNotDefined").</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = NonExistant, [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -0.0042, -0.0024, 0.0042, 0.0024</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 168</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 96</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Valid XML where /ServiceExceptionReport/ServiceException[@code="LayerNotDefined"] exists</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.layers</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="WiDtH">168</param>
               <param name="HeIgHt">96</param>
               <param name="ReQuEsT">GetMap</param>
               <param name="SrS">EPSG:4326</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="BbOx">-0.0042,-0.0024,0.0042,0.0024</param>
               <param name="StYlEs"/>
               <param name="LaYeRs">NonExistant,<xsl:value-of select="$VAR_LAKES"/>
               </param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(boolean(/ServiceExceptionReport/ServiceException[@code='LayerNotDefined']))</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-request-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion> When a GetMap request is made using REQUEST=map instead of REQUEST=GetMap, the response is valid.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = map</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 0, -0.0020, 0.0040, 0</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 200</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = [[VAR_IMAGE_FORMAT]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.request</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="WiDtH">200</param>
               <param name="BbOx">0,-0.0020,0.0040,0</param>
               <param name="HeIgHt">100</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="ReQuEsT">map</param>
               <param name="SrS">EPSG:4326</param>
               <param name="StYlEs"/>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(normalize-space(substring-before(concat(/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value, ';'), ';'))=$VAR_IMAGE_FORMAT)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-srs-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAYER_WITH_INHERENT_SRS"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request contains a single layer and a SRS where the SRS is contained directly in the layer in the capabilities document, then the response is valid.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAYER_WITH_INHERENT_SRS]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -0.0042, -0.0024, 0.0042, 0.0024</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 168</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 96</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = [[VAR_IMAGE_FORMAT]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.srs</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="WiDtH">168</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAYER_WITH_INHERENT_SRS"/>
               </param>
               <param name="StYlEs"/>
               <param name="ReQuEsT">GetMap</param>
               <param name="HeIgHt">96</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="BbOx">-0.0042,-0.0024,0.0042,0.0024</param>
               <param name="SrS">EPSG:4326</param>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(normalize-space(substring-before(concat(/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value, ';'), ';'))=$VAR_IMAGE_FORMAT)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-srs-2">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAYER_WITH_INHERITED_SRS"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request contains a single layer and a SRS where the SRS is inherited by the layer in the capabilities document, then the response is valid.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAYER_WITH_INHERITED_SRS]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -0.0042, -0.0024, 0.0042, 0.0024</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 168</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 96</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = [[VAR_IMAGE_FORMAT]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.srs</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="ReQuEsT">GetMap</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="StYlEs"/>
               <param name="BbOx">-0.0042,-0.0024,0.0042,0.0024</param>
               <param name="SrS">EPSG:4326</param>
               <param name="HeIgHt">96</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAYER_WITH_INHERITED_SRS"/>
               </param>
               <param name="WiDtH">168</param>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(normalize-space(substring-before(concat(/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value, ';'), ';'))=$VAR_IMAGE_FORMAT)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-srs-3">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When the SRS parameter in a GetMap request contains a SRS that is not valid for any of the layers being requested, then the server shall throw a Service Exception (code = "InvalidSRS").</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = UndefinedSRS</td>
            </tr>
            <tr align="left">
               <td>BBOX = -0.0042, -0.0024, 0.0042, 0.0024</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 168</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 96</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Valid XML where /ServiceExceptionReport/ServiceException[@code="InvalidSRS"] exists</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.srs</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="WiDtH">168</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="BbOx">-0.0042,-0.0024,0.0042,0.0024</param>
               <param name="HeIgHt">96</param>
               <param name="StYlEs"/>
               <param name="SrS">UndefinedSRS</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="ReQuEsT">GetMap</param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(boolean(/ServiceExceptionReport/ServiceException[@code='InvalidSRS']))</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-styles-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAYER_WITH_INHERENT_STYLE"/>
      <param name="VAR_INHERENT_STYLE"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request contains a single layer and a single style where the style is contained directly in the layer in the capabilities document, then the response is valid.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAYER_WITH_INHERENT_STYLE]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = [[VAR_INHERENT_STYLE]]</td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -0.0042, -0.0024, 0.0042, 0.0024</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 168</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 96</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = [[VAR_IMAGE_FORMAT]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.styles</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="SrS">EPSG:4326</param>
               <param name="ReQuEsT">GetMap</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="WiDtH">168</param>
               <param name="HeIgHt">96</param>
               <param name="BbOx">-0.0042,-0.0024,0.0042,0.0024</param>
               <param name="StYlEs">
                  <xsl:value-of select="$VAR_INHERENT_STYLE"/>
               </param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAYER_WITH_INHERENT_STYLE"/>
               </param>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(normalize-space(substring-before(concat(/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value, ';'), ';'))=$VAR_IMAGE_FORMAT)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-styles-10">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAYER_WITH_STYLE"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_STYLE"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request contains two layers, where one of the styles is valid and one is not, then the response is an exception (code=StyleNotDefined).</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAYER_WITH_STYLE]], [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = [[VAR_STYLE]], UndefinedStyle</td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -0.0042, -0.0024, 0.0042, 0.0024</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 168</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 96</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Valid XML where /ServiceExceptionReport/ServiceException[@code="StyleNotDefined"] exists</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.styles</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="WiDtH">168</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="BbOx">-0.0042,-0.0024,0.0042,0.0024</param>
               <param name="StYlEs">
                  <xsl:value-of select="$VAR_STYLE"/>,UndefinedStyle</param>
               <param name="SrS">EPSG:4326</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAYER_WITH_STYLE"/>,<xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="HeIgHt">96</param>
               <param name="ReQuEsT">GetMap</param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(boolean(/ServiceExceptionReport/ServiceException[@code='StyleNotDefined']))</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-styles-2">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAYER_WITH_INHERITED_STYLE"/>
      <param name="VAR_INHERITED_STYLE"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request contains a single layer and a single style where the style is inherited by the layer in the capabilities document, then the response is valid.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAYER_WITH_INHERITED_STYLE]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = [[VAR_INHERITED_STYLE]]</td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -0.0042, -0.0024, 0.0042, 0.0024</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 168</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 96</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = [[VAR_IMAGE_FORMAT]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.styles</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="HeIgHt">96</param>
               <param name="StYlEs">
                  <xsl:value-of select="$VAR_INHERITED_STYLE"/>
               </param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="ReQuEsT">GetMap</param>
               <param name="SrS">EPSG:4326</param>
               <param name="WiDtH">168</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAYER_WITH_INHERITED_STYLE"/>
               </param>
               <param name="BbOx">-0.0042,-0.0024,0.0042,0.0024</param>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(normalize-space(substring-before(concat(/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value, ';'), ';'))=$VAR_IMAGE_FORMAT)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-styles-3">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAYER_WITH_STYLE"/>
      <param name="VAR_STYLE"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request contains two layers and two styles (separated by a comma), then the response is valid.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAYER_WITH_STYLE]], [[VAR_LAYER_WITH_STYLE]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = [[VAR_STYLE]], [[VAR_STYLE]]</td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -0.0042, -0.0024, 0.0042, 0.0024</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 168</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 96</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = [[VAR_IMAGE_FORMAT]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.styles</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="BbOx">-0.0042,-0.0024,0.0042,0.0024</param>
               <param name="HeIgHt">96</param>
               <param name="ReQuEsT">GetMap</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAYER_WITH_STYLE"/>,<xsl:value-of select="$VAR_LAYER_WITH_STYLE"/>
               </param>
               <param name="SrS">EPSG:4326</param>
               <param name="WiDtH">168</param>
               <param name="StYlEs">
                  <xsl:value-of select="$VAR_STYLE"/>,<xsl:value-of select="$VAR_STYLE"/>
               </param>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(normalize-space(substring-before(concat(/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value, ';'), ';'))=$VAR_IMAGE_FORMAT)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-styles-4">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAYER_WITH_STYLE"/>
      <param name="VAR_STYLE"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request contains three layers and three styles (separated by commas), then the response is valid.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAYER_WITH_STYLE]], [[VAR_LAYER_WITH_STYLE]], [[VAR_LAYER_WITH_STYLE]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = [[VAR_STYLE]], [[VAR_STYLE]], [[VAR_STYLE]]</td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -0.0042, -0.0024, 0.0042, 0.0024</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 168</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 96</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = [[VAR_IMAGE_FORMAT]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.styles</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="BbOx">-0.0042,-0.0024,0.0042,0.0024</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="WiDtH">168</param>
               <param name="HeIgHt">96</param>
               <param name="SrS">EPSG:4326</param>
               <param name="StYlEs">
                  <xsl:value-of select="$VAR_STYLE"/>,<xsl:value-of select="$VAR_STYLE"/>,<xsl:value-of select="$VAR_STYLE"/>
               </param>
               <param name="ReQuEsT">GetMap</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAYER_WITH_STYLE"/>,<xsl:value-of select="$VAR_LAYER_WITH_STYLE"/>,<xsl:value-of select="$VAR_LAYER_WITH_STYLE"/>
               </param>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(normalize-space(substring-before(concat(/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value, ';'), ';'))=$VAR_IMAGE_FORMAT)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-styles-5">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request contains an unadvertised Style, then the response is an exception (code=StyleNotDefined).</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = UndefinedStyle</td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -0.0042, -0.0024, 0.0042, 0.0024</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 168</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 96</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Valid XML where /ServiceExceptionReport/ServiceException[@code="StyleNotDefined"] exists</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.styles</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="WiDtH">168</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="BbOx">-0.0042,-0.0024,0.0042,0.0024</param>
               <param name="StYlEs">UndefinedStyle</param>
               <param name="SrS">EPSG:4326</param>
               <param name="ReQuEsT">GetMap</param>
               <param name="HeIgHt">96</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(boolean(/ServiceExceptionReport/ServiceException[@code='StyleNotDefined']))</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-styles-6">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_PONDS"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request contains a single layer and a null style value (as in "STYLES="), then the response is valid.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_PONDS]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -0.0042, -0.0024, 0.0042, 0.0024</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 168</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 96</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = [[VAR_IMAGE_FORMAT]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.styles</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="WiDtH">168</param>
               <param name="BbOx">-0.0042,-0.0024,0.0042,0.0024</param>
               <param name="SrS">EPSG:4326</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_PONDS"/>
               </param>
               <param name="StYlEs"/>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="HeIgHt">96</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="ReQuEsT">GetMap</param>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(normalize-space(substring-before(concat(/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value, ';'), ';'))=$VAR_IMAGE_FORMAT)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-styles-7">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAYER_WITH_STYLE"/>
      <param name="VAR_BRIDGES"/>
      <param name="VAR_ROAD_SEGMENTS"/>
      <param name="VAR_DIVIDED_ROUTES"/>
      <param name="VAR_STYLE"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request contains multiple layers and a mixture of named and default styles (as in "STYLES=style1,,style2,,"), then the response is valid.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAYER_WITH_STYLE]], [[VAR_BRIDGES]], [[VAR_LAYER_WITH_STYLE]], [[VAR_ROAD_SEGMENTS]], [[VAR_DIVIDED_ROUTES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = [[VAR_STYLE]], , [[VAR_STYLE]], , </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -0.0042, -0.0024, 0.0042, 0.0024</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 168</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 96</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = [[VAR_IMAGE_FORMAT]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.styles</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="HeIgHt">96</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="ReQuEsT">GetMap</param>
               <param name="SrS">EPSG:4326</param>
               <param name="StYlEs">
                  <xsl:value-of select="$VAR_STYLE"/>,,<xsl:value-of select="$VAR_STYLE"/>,,</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAYER_WITH_STYLE"/>,<xsl:value-of select="$VAR_BRIDGES"/>,<xsl:value-of select="$VAR_LAYER_WITH_STYLE"/>,<xsl:value-of select="$VAR_ROAD_SEGMENTS"/>,<xsl:value-of select="$VAR_DIVIDED_ROUTES"/>
               </param>
               <param name="BbOx">-0.0042,-0.0024,0.0042,0.0024</param>
               <param name="WiDtH">168</param>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(normalize-space(substring-before(concat(/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value, ';'), ';'))=$VAR_IMAGE_FORMAT)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-styles-8">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_BRIDGES"/>
      <param name="VAR_ROAD_SEGMENTS"/>
      <param name="VAR_DIVIDED_ROUTES"/>
      <param name="VAR_BUILDINGS"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request contains multiple layers and requests all layers to be shown in the default style by using null values between commas (as in "STYLES=,,,"), then the response is valid.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_BRIDGES]], [[VAR_ROAD_SEGMENTS]], [[VAR_DIVIDED_ROUTES]], [[VAR_BUILDINGS]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = , , , </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -0.0042, -0.0024, 0.0042, 0.0024</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 168</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 96</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = [[VAR_IMAGE_FORMAT]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.styles</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="ReQuEsT">GetMap</param>
               <param name="HeIgHt">96</param>
               <param name="BbOx">-0.0042,-0.0024,0.0042,0.0024</param>
               <param name="SrS">EPSG:4326</param>
               <param name="StYlEs">,,,</param>
               <param name="WiDtH">168</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_BRIDGES"/>,<xsl:value-of select="$VAR_ROAD_SEGMENTS"/>,<xsl:value-of select="$VAR_DIVIDED_ROUTES"/>,<xsl:value-of select="$VAR_BUILDINGS"/>
               </param>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(normalize-space(substring-before(concat(/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value, ';'), ';'))=$VAR_IMAGE_FORMAT)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-styles-9">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_BRIDGES"/>
      <param name="VAR_ROAD_SEGMENTS"/>
      <param name="VAR_DIVIDED_ROUTES"/>
      <param name="VAR_BUILDINGS"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request contains multiple layers and requests all layers to be shown in the default style by using a single null value (as in "STYLES="), then the response is valid.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_BRIDGES]], [[VAR_ROAD_SEGMENTS]], [[VAR_DIVIDED_ROUTES]], [[VAR_BUILDINGS]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -0.0042, -0.0024, 0.0042, 0.0024</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 168</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 96</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = [[VAR_IMAGE_FORMAT]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.styles</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="WiDtH">168</param>
               <param name="SrS">EPSG:4326</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="HeIgHt">96</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_BRIDGES"/>,<xsl:value-of select="$VAR_ROAD_SEGMENTS"/>,<xsl:value-of select="$VAR_DIVIDED_ROUTES"/>,<xsl:value-of select="$VAR_BUILDINGS"/>
               </param>
               <param name="ReQuEsT">GetMap</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="BbOx">-0.0042,-0.0024,0.0042,0.0024</param>
               <param name="StYlEs"/>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(normalize-space(substring-before(concat(/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value, ';'), ';'))=$VAR_IMAGE_FORMAT)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-transparent-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_TRANSPARENT_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request is made with no TRANSPARENT parameter and a FORMAT that supports transparency over a BBOX that is not completely covered, then the response contains no transparent pixels.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 0, -0.0020, 0.0040, 0</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 200</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_TRANSPARENT_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>An image with no transparent pixels</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.transparent</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="SrS">EPSG:4326</param>
               <param name="WiDtH">200</param>
               <param name="StYlEs"/>
               <param name="ReQuEsT">GetMap</param>
               <param name="BbOx">0,-0.0020,0.0040,0</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_TRANSPARENT_FORMAT)"/>
               </param>
               <param name="HeIgHt">100</param>
               <parsers:ImageParser>
                  <parsers:model value="ARGB">
                     <parsers:count bands="A" sample="0xff"/>
                  </parsers:model>
               </parsers:ImageParser>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">//parsers:count ne '20000'</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <ctl:message>[FAILED] //parsers:count ne '20000' is true.</ctl:message>
               <ctl:message>All pixels should have an alpha value of 1 (fully opaque).</ctl:message>
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-transparent-2">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_TRANSPARENT_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request is made with TRANSPARENT=fAlSe and a FORMAT that supports transparency over a BBOX that is not completely covered, then the response contains no transparent pixels.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 0, -0.0020, 0.0040, 0</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 200</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_TRANSPARENT_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>TRANSPARENT = FALSE</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>An image with no transparent pixels</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.transparent</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="ReQuEsT">GetMap</param>
               <param name="HeIgHt">100</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_TRANSPARENT_FORMAT)"/>
               </param>
               <param name="BbOx">0,-0.0020,0.0040,0</param>
               <param name="StYlEs"/>
               <param name="TrAnSpArEnT">FALSE</param>
               <param name="WiDtH">200</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="SrS">EPSG:4326</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <parsers:ImageParser>
                  <parsers:model value="ARGB">
                     <parsers:count bands="A" sample="0xff"/>
                  </parsers:model>
               </parsers:ImageParser>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">//parsers:count ne '20000'</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <ctl:message>[FAILED] //parsers:count ne '20000' is true.</ctl:message>
               <ctl:message>All pixels should have an alpha value of 1 (fully opaque).</ctl:message>
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-transparent-3">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_TRANSPARENT_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request is made with TRANSPARENT=TRUE and a FORMAT that supports transparency over a BBOX that is not completely covered, then the response contains transparent pixels.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 0, -0.0020, 0.0040, 0</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 200</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_TRANSPARENT_FORMAT]]</td>
            </tr>
            <tr align="left">
               <td>TRANSPARENT = TRUE</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>An image that contains transparent pixels</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.transparent</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="TrAnSpArEnT">TRUE</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_TRANSPARENT_FORMAT)"/>
               </param>
               <param name="HeIgHt">100</param>
               <param name="WiDtH">200</param>
               <param name="StYlEs"/>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="BbOx">0,-0.0020,0.0040,0</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="ReQuEsT">GetMap</param>
               <param name="SrS">EPSG:4326</param>
               <parsers:ImageParser>
                  <parsers:model value="ARGB">
                     <parsers:count bands="A" sample="0x00"/>
                  </parsers:model>
               </parsers:ImageParser>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">xs:integer(//parsers:count) eq 0</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <ctl:message>[FAILED] xs:integer(//parsers:count) eq 0 is true.</ctl:message>
               <ctl:message>Expected some pixels with an alpha value of 0 (fully transparent).</ctl:message>
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-version-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a GetMap request is made using WMTVER instead of VERSION, the response is valid.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>WMTVER = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = 0, -0.0020, 0.0040, 0</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 200</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 100</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Content-type header = [[VAR_IMAGE_FORMAT]]</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.version</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="WiDtH">200</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_IMAGE_FORMAT)"/>
               </param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>
               </param>
               <param name="StYlEs"/>
               <param name="BbOx">0,-0.0020,0.0040,0</param>
               <param name="ReQuEsT">GetMap</param>
               <param name="HeIgHt">100</param>
               <param name="SrS">EPSG:4326</param>
               <param name="WmTvEr">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <parsers:HeadersParser/>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:if test="not(normalize-space(substring-before(concat(/headers/header[translate(name, 'CONTYPE', 'contype') = 'content-type']/value, ';'), ';'))=$VAR_IMAGE_FORMAT)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-width_height-1">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_STREAMS"/>
      <param name="VAR_PONDS"/>
      <param name="VAR_READABLE_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a request is made with WIDTH=1024 and HEIGHT=768, the image returned is exactly the size requested.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_LAKES]], [[VAR_STREAMS]], [[VAR_PONDS]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -0.0022, -0.0024, 0.0042, 0.0024</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 1024</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 768</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_READABLE_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Image where width=1024 and height=768</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.width_height</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_READABLE_IMAGE_FORMAT)"/>
               </param>
               <param name="HeIgHt">768</param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="ReQuEsT">GetMap</param>
               <param name="StYlEs"/>
               <param name="BbOx">-0.0022,-0.0024,0.0042,0.0024</param>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_LAKES"/>,<xsl:value-of select="$VAR_STREAMS"/>,<xsl:value-of select="$VAR_PONDS"/>
               </param>
               <param name="SrS">EPSG:4326</param>
               <param name="WiDtH">1024</param>
               <example:ImageStats>

                                                &lt;image_stats&gt;
                                                        &lt;height&gt;&lt;/height&gt;
                                                        &lt;width&gt;&lt;/width&gt;
                                                &lt;/image_stats&gt;

          </example:ImageStats>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(/image_stats/width = 1024 and /image_stats/height = 768)</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-width_height-2">
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_BASIC_POLYGONS"/>
      <param name="VAR_READABLE_IMAGE_FORMAT"/>
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <assertion>When a request is made with WIDTH=16 and HEIGHT=16, the image returned is exactly the size requested.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>
         <b>Request:</b>
      </td>
      <td>
         <table cellpadding="0" cellspacing="0" summary="Request 1">
            <tr align="left">
               <td>VERSION = [[VAR_WMS_VERSION]]</td>
            </tr>
            <tr align="left">
               <td>REQUEST = GetMap</td>
            </tr>
            <tr align="left">
               <td>LAYERS = [[VAR_BASIC_POLYGONS]]</td>
            </tr>
            <tr align="left">
               <td>STYLES = </td>
            </tr>
            <tr align="left">
               <td>SRS = EPSG:4326</td>
            </tr>
            <tr align="left">
               <td>BBOX = -1, -1, 1, 1</td>
            </tr>
            <tr align="left">
               <td>WIDTH = 16</td>
            </tr>
            <tr align="left">
               <td>HEIGHT = 16</td>
            </tr>
            <tr align="left">
               <td>FORMAT = [[VAR_READABLE_IMAGE_FORMAT]]</td>
            </tr>
         </table>
      </td>
   </tr>
   <tr align="left" valign="top">
      <td>
         <b>Results:</b>
      </td>
      <td>Image where width=16 and height=16</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.width_height</link>
      <code>
         <xsl:variable name="request1">
            <request>
               <url>
                  <xsl:value-of select="$VAR_WMS_GET_MAP_HTTP_GET_URL"/>
               </url>
               <method>get</method>
               <param name="BbOx">-1,-1,1,1</param>
               <param name="StYlEs"/>
               <param name="LaYeRs">
                  <xsl:value-of select="$VAR_BASIC_POLYGONS"/>
               </param>
               <param name="HeIgHt">16</param>
               <param name="WiDtH">16</param>
               <param name="ReQuEsT">GetMap</param>
               <param name="FoRmAt">
                  <xsl:value-of select="functions:encode($VAR_READABLE_IMAGE_FORMAT)"/>
               </param>
               <param name="VeRsIoN">
                  <xsl:value-of select="$VAR_WMS_VERSION"/>
               </param>
               <param name="SrS">EPSG:4326</param>
               <example:ImageStats>

                                                &lt;image_stats&gt;
                                                        &lt;height&gt;&lt;/height&gt;
                                                        &lt;width&gt;&lt;/width&gt;
                                                &lt;/image_stats&gt;

          </example:ImageStats>
            </request>
         </xsl:variable>
         <xsl:for-each select="$request1">
            <xsl:variable name="expression">not(/image_stats/width = 16 and /image_stats/height = 16)</xsl:variable>
            <xsl:if test="saxon:evaluate($expression)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </code>
   </test>
   <test name="wms:wmsops-getmap-params-width_height-3">
      <param name="VAR_WMS_GET_MAP_HTTP_GET_URL"/>
      <param name="VAR_WMS_VERSION"/>
      <param name="VAR_STREAMS"/>
      <param name="VAR_LAKES"/>
      <param name="VAR_PONDS"/>
      <param name="VAR_BRIDGES"/>
      <param name="VAR_ROAD_SEGMENTS"/>
      <param name="VAR_DIVIDED_ROUTES"/>
      <param name="VAR_BUILDINGS"/>
      <param name="VAR_MAP_NEATLINE"/>
      <param name="VAR_READABLE_IMAGE_FORMAT"/>
      <assertion>When a GetMap request is made where the aspect ratio of the BBOX and the aspect ratio of the WIDTH/HEIGHT parameters is different, then the map returned is stretched.</assertion>
      <comment><![CDATA[<table  summary="Details">
   <tr align="left" valign="top">
      <td>The user will be asked to manually verify that the two images look the same, except that the image #2 is stretched so it is twice as tall as image #1.</td>
   </tr>
</table>]]></comment>
      <link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.width_height</link>
      <code>
         <xsl:variable name="form-values">
            <ctl:form width="900" height="700">
               <table>
                  <tr>
                     <td>
                        <img src="{$VAR_WMS_GET_MAP_HTTP_GET_URL}VERSION={$VAR_WMS_VERSION}&amp;REQUEST=GetMap&amp;LAYERS={$VAR_STREAMS},{$VAR_LAKES},{$VAR_PONDS},{$VAR_BRIDGES},{$VAR_ROAD_SEGMENTS},{$VAR_DIVIDED_ROUTES},{$VAR_BUILDINGS},{$VAR_MAP_NEATLINE}&amp;STYLES=&amp;SRS=EPSG:4326&amp;BBOX=-0.005,-0.0025,0.005,0.0025&amp;WIDTH=200&amp;HEIGHT=100&amp;FORMAT={$VAR_READABLE_IMAGE_FORMAT}"/>
                     </td>
                     <td>
                        <img src="{$VAR_WMS_GET_MAP_HTTP_GET_URL}VERSION={$VAR_WMS_VERSION}&amp;REQUEST=GetMap&amp;LAYERS={$VAR_STREAMS},{$VAR_LAKES},{$VAR_PONDS},{$VAR_BRIDGES},{$VAR_ROAD_SEGMENTS},{$VAR_DIVIDED_ROUTES},{$VAR_BUILDINGS},{$VAR_MAP_NEATLINE}&amp;STYLES=&amp;SRS=EPSG:4326&amp;BBOX=-0.005,-0.0025,0.005,0.0025&amp;WIDTH=200&amp;HEIGHT=200&amp;FORMAT={$VAR_READABLE_IMAGE_FORMAT}"/>
                     </td>
                  </tr>
               </table>
               <p>
                        The two pictures above should depict the same scene, but the picture on the right should be stretched so it is twice as tall as the picture on the left.
                        Are the pictures correct?
          </p>
               <p>
                  <input xmlns="" type="submit" name="submit" value="yes"/>
                  <input xmlns="" type="submit" name="submit" value="no"/>
               </p>
            </ctl:form>
         </xsl:variable>
         <xsl:if test="not($form-values/values/value[@key='submit']='yes')">
            <fail/>
         </xsl:if>
      </code>
   </test>
   <ctl:test name="wms:wmsops-getfeatureinfo-each-info_format">
      <ctl:param name="WMS_CAPABILITIES"/>
      <ctl:param name="FORMAT"/>
      <ctl:assertion>For each advertised GetFeatureInfo format, when a GetFeatureInfo request is made with the INFO_FORMAT parameter set to the format, then the Content-type header returned is the same.</ctl:assertion>
      <ctl:comment/>
      <ctl:link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getfeatureinfo.params.info_format</ctl:link>
      <ctl:code>
         <xsl:variable name="image-format"
                       select="$WMS_CAPABILITIES//Capability/Request/GetMap/Format[1]"/>
         <xsl:variable name="layer-info">
            <ctl:call-function name="functions:queryable-layer-info">
               <ctl:with-param name="root-layer" select="$WMS_CAPABILITIES//Capability/Layer"/>
               <ctl:with-param name="preferred-name"
                               select="$WMS_CAPABILITIES//Capability//Layer[Title = 'cite:Lakes']/Name"/>
               <ctl:with-param name="preferred-srs">EPSG:4326</ctl:with-param>
               <ctl:with-param name="preferred-bbox">0,-0.0020,0.0040,0</ctl:with-param>
               <ctl:with-param name="preferred-width">200</ctl:with-param>
               <ctl:with-param name="preferred-height">100</ctl:with-param>
            </ctl:call-function>
         </xsl:variable>
         <xsl:variable name="response">
            <ctl:request>
               <ctl:url>
                  <xsl:value-of select="$WMS_CAPABILITIES//Capability/Request/GetFeatureInfo/DCPType/HTTP/Get/OnlineResource/@xlink:href"/>
               </ctl:url>
               <ctl:method>get</ctl:method>
               <ctl:param name="LaYeRs">
                  <xsl:value-of select="functions:encode($layer-info/LayerInfo/@name)"/>
               </ctl:param>
               <ctl:param name="ReQuEsT">GetFeatureInfo</ctl:param>
               <ctl:param name="BbOx">
                  <xsl:value-of select="$layer-info/LayerInfo/@bbox"/>
               </ctl:param>
               <ctl:param name="WiDtH">
                  <xsl:value-of select="$layer-info/LayerInfo/@width"/>
               </ctl:param>
               <ctl:param name="SrS">
                  <xsl:value-of select="functions:encode($layer-info/LayerInfo/@srs)"/>
               </ctl:param>
               <ctl:param name="QuErY_LaYeRs">
                  <xsl:value-of select="functions:encode($layer-info/LayerInfo/@name)"/>
               </ctl:param>
               <ctl:param name="VeRsIoN">
                  <xsl:value-of select="functions:version()"/>
               </ctl:param>
               <ctl:param name="StYlEs"/>
               <ctl:param name="X">60</ctl:param>
               <ctl:param name="Y">60</ctl:param>
               <ctl:param name="HeIgHt">
                  <xsl:value-of select="$layer-info/LayerInfo/@height"/>
               </ctl:param>
               <ctl:param name="InFo_fOrMaT">
                  <xsl:value-of select="functions:encode($FORMAT)"/>
               </ctl:param>
               <ctl:param name="FoRmAt">
                  <xsl:value-of select="functions:encode($image-format)"/>
               </ctl:param>
               <parsers:HTTPParser>
                  <parsers:parse>
                     <parsers:NullParser/>
                  </parsers:parse>
               </parsers:HTTPParser>
            </ctl:request>
         </xsl:variable>
         <xsl:if test="functions:mime-match($response/response/headers/header[functions:to-lowercase(@name) = 'content-type'], $FORMAT) = 'false'">
            <ctl:fail/>
         </xsl:if>
      </ctl:code>
   </ctl:test>
   <ctl:test name="wms:wmsops-getmap-each-style">
      <ctl:param name="capabilities"/>
      <ctl:param name="style"/>
      <ctl:param name="layer"/>
      <ctl:assertion>For each of the Styles in the capabilities document, when a GetMap request is made with the STYLES parameter set to the element of the style, then the response is valid.</ctl:assertion>
      <ctl:comment/>
      <ctl:link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.styles</ctl:link>
      <ctl:code>
         <xsl:choose>
            <xsl:when test="$style = ''">
               <ctl:message>No named layers with a style contained directly in the layer.</ctl:message>
            </xsl:when>
            <xsl:otherwise>
               <xsl:variable name="image-format" select="$capabilities/Capability/Request/GetMap/Format[1]"/>
               <xsl:variable name="layer-info">
                  <ctl:call-function name="functions:layer-info">
                     <ctl:with-param name="root-layer" select="$capabilities/Capability/Layer"/>
                     <ctl:with-param name="preferred-name" select="$layer"/>
                     <ctl:with-param name="preferred-srs">EPSG:4326</ctl:with-param>
                     <ctl:with-param name="preferred-bbox">0,-0.0020,0.0040,0</ctl:with-param>
                     <ctl:with-param name="preferred-width">100</ctl:with-param>
                     <ctl:with-param name="preferred-height">100</ctl:with-param>
                  </ctl:call-function>
               </xsl:variable>
               <xsl:variable name="response">
                  <ctl:request>
                     <ctl:url>
                        <xsl:value-of select="$capabilities/Capability/Request/GetMap/DCPType/HTTP/Get/OnlineResource/@xlink:href"/>
                     </ctl:url>
                     <ctl:method>get</ctl:method>
                     <ctl:param name="StYlEs">
                        <xsl:value-of select="functions:encode($style)"/>
                     </ctl:param>
                     <ctl:param name="BbOx">
                        <xsl:value-of select="$layer-info/LayerInfo/@bbox"/>
                     </ctl:param>
                     <ctl:param name="SrS">
                        <xsl:value-of select="functions:encode($layer-info/LayerInfo/@srs)"/>
                     </ctl:param>
                     <ctl:param name="LaYeRs">
                        <xsl:value-of select="functions:encode($layer-info/LayerInfo/@name)"/>
                     </ctl:param>
                     <ctl:param name="WiDtH">
                        <xsl:value-of select="$layer-info/LayerInfo/@width"/>
                     </ctl:param>
                     <ctl:param name="VeRsIoN">
                        <xsl:value-of select="functions:version()"/>
                     </ctl:param>
                     <ctl:param name="FoRmAt">
                        <xsl:value-of select="functions:encode($image-format)"/>
                     </ctl:param>
                     <ctl:param name="HeIgHt">
                        <xsl:value-of select="$layer-info/LayerInfo/@height"/>
                     </ctl:param>
                     <ctl:param name="ReQuEsT">GetMap</ctl:param>
                     <parsers:HTTPParser>
                        <parsers:parse>
                           <parsers:NullParser/>
                        </parsers:parse>
                     </parsers:HTTPParser>
                  </ctl:request>
               </xsl:variable>
               <xsl:if test="functions:mime-match($response/response/headers/header[functions:to-lowercase(@name) = 'content-type'], $image-format) = 'false'">
                  <ctl:message>[FAILED] Expected Content-Type '<xsl:value-of select="$image-format"/>', but received '<xsl:value-of select="$response//header[functions:to-lowercase(@name) = 'content-type']"/>'.</ctl:message>
                  <ctl:fail/>
               </xsl:if>
               <ctl:message>Layer: <xsl:value-of select="$layer"/> Style: <xsl:value-of select="$style"/>
               </ctl:message>
            </xsl:otherwise>
         </xsl:choose>
      </ctl:code>
   </ctl:test>
   <ctl:test name="wms:wmsops-getmap-each-layer">
      <ctl:param name="WMS_CAPABILITIES"/>
      <ctl:param name="layer"/>
      <ctl:assertion>For each of the Layers in the capabilities document, when a GetMap request is made with the LAYERS parameter set to the element of the layer, then the response is valid.</ctl:assertion>
      <ctl:comment/>
      <ctl:link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.layers</ctl:link>
      <ctl:code>
         <xsl:variable name="image-format"
                       select="$WMS_CAPABILITIES/Capability/Request/GetMap/Format[1]"/>
         <xsl:variable name="layer-info">
            <ctl:call-function name="functions:layer-info">
               <ctl:with-param name="root-layer" select="$WMS_CAPABILITIES/Capability/Layer"/>
               <ctl:with-param name="preferred-name" select="$layer"/>
               <ctl:with-param name="preferred-srs">EPSG:4326</ctl:with-param>
               <ctl:with-param name="preferred-bbox">0,-0.0020,0.0040,0</ctl:with-param>
               <ctl:with-param name="preferred-width">100</ctl:with-param>
               <ctl:with-param name="preferred-height">100</ctl:with-param>
            </ctl:call-function>
         </xsl:variable>
         <xsl:variable name="response">
            <ctl:request>
               <ctl:url>
                  <xsl:value-of select="$WMS_CAPABILITIES/Capability/Request/GetMap/DCPType/HTTP/Get/OnlineResource/@xlink:href"/>
               </ctl:url>
               <ctl:method>get</ctl:method>
               <ctl:param name="LaYeRs">
                  <xsl:value-of select="functions:encode($layer-info/LayerInfo/@name)"/>
               </ctl:param>
               <ctl:param name="SrS">
                  <xsl:value-of select="functions:encode($layer-info/LayerInfo/@srs)"/>
               </ctl:param>
               <ctl:param name="BbOx">
                  <xsl:value-of select="$layer-info/LayerInfo/@bbox"/>
               </ctl:param>
               <ctl:param name="WiDtH">100</ctl:param>
               <ctl:param name="ReQuEsT">GetMap</ctl:param>
               <ctl:param name="StYlEs"/>
               <ctl:param name="HeIgHt">100</ctl:param>
               <ctl:param name="FoRmAt">
                  <xsl:value-of select="functions:encode($image-format)"/>
               </ctl:param>
               <ctl:param name="VeRsIoN">
                  <xsl:value-of select="functions:version()"/>
               </ctl:param>
               <parsers:HTTPParser>
                  <parsers:parse>
                     <parsers:NullParser/>
                  </parsers:parse>
               </parsers:HTTPParser>
            </ctl:request>
         </xsl:variable>
         <xsl:if test="functions:mime-match($response/response/headers/header[functions:to-lowercase(@name) = 'content-type'], $image-format) = 'false'">
            <ctl:fail/>
         </xsl:if>
      </ctl:code>
   </ctl:test>
   <ctl:test name="wms:wmsops-getmap-each-srs">
      <ctl:param name="WMS_CAPABILITIES"/>
      <ctl:param name="srs"/>
      <ctl:assertion>For each SRS in the capabilities document, when a GetMap request uses the SRS, then the response is valid.</ctl:assertion>
      <ctl:comment/>
      <ctl:link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.crs</ctl:link>
      <ctl:code>
         <xsl:variable name="image-format"
                       select="$WMS_CAPABILITIES/Capability/Request/GetMap/Format[1]"/>
         <xsl:variable name="layer"
                       select="string($WMS_CAPABILITIES/Capability//Layer[Name and ancestor-or-self::Layer/SRS=$srs][1]/Name)"/>
         <xsl:variable name="layer-info">
            <ctl:call-function name="functions:layer-info">
               <ctl:with-param name="root-layer" select="$WMS_CAPABILITIES/Capability/Layer"/>
               <ctl:with-param name="preferred-name" select="$layer"/>
               <ctl:with-param name="preferred-srs" select="$srs"/>
               <ctl:with-param name="preferred-bbox"/>
               <ctl:with-param name="preferred-width">100</ctl:with-param>
               <ctl:with-param name="preferred-height">100</ctl:with-param>
            </ctl:call-function>
         </xsl:variable>
         <xsl:choose>
            <xsl:when test="$layer = ''">
               <ctl:message>No Named layers for SRS <xsl:value-of select="$srs"/>.</ctl:message>
            </xsl:when>
            <xsl:otherwise>
               <xsl:variable name="response">
                  <ctl:request>
                     <ctl:url>
                        <xsl:value-of select="$WMS_CAPABILITIES/Capability/Request/GetMap/DCPType/HTTP/Get/OnlineResource/@xlink:href"/>
                     </ctl:url>
                     <ctl:method>get</ctl:method>
                     <ctl:param name="LaYeRs">
                        <xsl:value-of select="functions:encode($layer-info/LayerInfo/@name)"/>
                     </ctl:param>
                     <ctl:param name="BbOx">
                        <xsl:value-of select="$layer-info/LayerInfo/@bbox"/>
                     </ctl:param>
                     <ctl:param name="SrS">
                        <xsl:value-of select="functions:encode($layer-info/LayerInfo/@srs)"/>
                     </ctl:param>
                     <ctl:param name="WiDtH">
                        <xsl:value-of select="$layer-info/LayerInfo/@width"/>
                     </ctl:param>
                     <ctl:param name="FoRmAt">
                        <xsl:value-of select="functions:encode($image-format)"/>
                     </ctl:param>
                     <ctl:param name="HeIgHt">
                        <xsl:value-of select="$layer-info/LayerInfo/@height"/>
                     </ctl:param>
                     <ctl:param name="VeRsIoN">
                        <xsl:value-of select="functions:version()"/>
                     </ctl:param>
                     <ctl:param name="StYlEs"/>
                     <ctl:param name="ReQuEsT">GetMap</ctl:param>
                     <parsers:HTTPParser>
                        <parsers:parse>
                           <parsers:NullParser/>
                        </parsers:parse>
                     </parsers:HTTPParser>
                  </ctl:request>
               </xsl:variable>
               <xsl:if test="functions:mime-match($response/response/headers/header[functions:to-lowercase(@name) = 'content-type'], $image-format) = 'false'">
                  <ctl:fail/>
               </xsl:if>
            </xsl:otherwise>
         </xsl:choose>
      </ctl:code>
   </ctl:test>
   <ctl:test name="wms:wmsops-getmap-each-format">
      <ctl:param name="WMS_CAPABILITIES"/>
      <ctl:param name="format"/>
      <ctl:assertion>For each image format advertised in capabilities, When a GetMap request is made using the image format, then the Content-type entity header returned is the format requested.</ctl:assertion>
      <ctl:comment/>
      <ctl:link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.format</ctl:link>
      <ctl:code>
         <xsl:variable name="layer-info">
            <ctl:call-function name="functions:layer-info">
               <ctl:with-param name="root-layer" select="$WMS_CAPABILITIES/Capability/Layer"/>
               <ctl:with-param name="preferred-name"
                               select="string($WMS_CAPABILITIES/Capability//Layer[Title='cite:Lakes']/Name)"/>
               <ctl:with-param name="preferred-srs">CRS:84</ctl:with-param>
               <ctl:with-param name="preferred-bbox">-0.0025,-0.0025,0.0025,0.0025</ctl:with-param>
               <ctl:with-param name="preferred-width">100</ctl:with-param>
               <ctl:with-param name="preferred-height">100</ctl:with-param>
            </ctl:call-function>
         </xsl:variable>
         <xsl:variable name="response">
            <ctl:request>
               <ctl:url>
                  <xsl:value-of select="$WMS_CAPABILITIES/Capability/Request/GetMap/DCPType/HTTP/Get/OnlineResource/@xlink:href"/>
               </ctl:url>
               <ctl:method>get</ctl:method>
               <ctl:param name="HeIgHt">
                  <xsl:value-of select="$layer-info/LayerInfo/@height"/>
               </ctl:param>
               <ctl:param name="LaYeRs">
                  <xsl:value-of select="functions:encode($layer-info/LayerInfo/@name)"/>
               </ctl:param>
               <ctl:param name="FoRmAt">
                  <xsl:value-of select="functions:encode($format)"/>
               </ctl:param>
               <ctl:param name="ReQuEsT">GetMap</ctl:param>
               <ctl:param name="StYlEs"/>
               <ctl:param name="SrS">
                  <xsl:value-of select="functions:encode($layer-info/LayerInfo/@srs)"/>
               </ctl:param>
               <ctl:param name="BbOx">
                  <xsl:value-of select="$layer-info/LayerInfo/@bbox"/>
               </ctl:param>
               <ctl:param name="VeRsIoN">
                  <xsl:value-of select="functions:version()"/>
               </ctl:param>
               <ctl:param name="WiDtH">
                  <xsl:value-of select="$layer-info/LayerInfo/@width"/>
               </ctl:param>
               <parsers:HTTPParser>
                  <parsers:parse>
                     <parsers:NullParser/>
                  </parsers:parse>
               </parsers:HTTPParser>
            </ctl:request>
         </xsl:variable>
         <xsl:if test="functions:mime-match($response/response/headers/header[functions:to-lowercase(@name) = 'content-type'], $format) = 'false'">
            <ctl:fail/>
         </xsl:if>
      </ctl:code>
   </ctl:test>
   <ctl:test name="wms:wmsops-getmap-each-format-transparent">
      <ctl:param name="WMS_CAPABILITIES"/>
      <ctl:param name="format"/>
      <ctl:assertion>For each format a request with TRANSPARENT=TRUE does not return an exception.</ctl:assertion>
      <ctl:comment/>
      <ctl:link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.format</ctl:link>
      <ctl:code>
         <xsl:variable name="layer-info">
            <ctl:call-function name="functions:layer-info">
               <ctl:with-param name="root-layer" select="$WMS_CAPABILITIES/Capability/Layer"/>
               <ctl:with-param name="preferred-name"
                               select="string($WMS_CAPABILITIES/Capability//Layer[Title='cite:Lakes']/Name)"/>
               <ctl:with-param name="preferred-srs">CRS:84</ctl:with-param>
               <ctl:with-param name="preferred-bbox">-0.0025,-0.0025,0.0025,0.0025</ctl:with-param>
               <ctl:with-param name="preferred-width">100</ctl:with-param>
               <ctl:with-param name="preferred-height">100</ctl:with-param>
            </ctl:call-function>
         </xsl:variable>
         <xsl:variable name="response">
            <ctl:request>
               <ctl:url>
                  <xsl:value-of select="$WMS_CAPABILITIES/Capability/Request/GetMap/DCPType/HTTP/Get/OnlineResource/@xlink:href"/>
               </ctl:url>
               <ctl:method>get</ctl:method>
               <ctl:param name="HeIgHt">
                  <xsl:value-of select="$layer-info/LayerInfo/@height"/>
               </ctl:param>
               <ctl:param name="LaYeRs">
                  <xsl:value-of select="functions:encode($layer-info/LayerInfo/@name)"/>
               </ctl:param>
               <ctl:param name="FoRmAt">
                  <xsl:value-of select="functions:encode($format)"/>
               </ctl:param>
               <ctl:param name="ReQuEsT">GetMap</ctl:param>
               <ctl:param name="StYlEs"/>
               <ctl:param name="SrS">
                  <xsl:value-of select="functions:encode($layer-info/LayerInfo/@srs)"/>
               </ctl:param>
               <ctl:param name="BbOx">
                  <xsl:value-of select="$layer-info/LayerInfo/@bbox"/>
               </ctl:param>
               <ctl:param name="VeRsIoN">
                  <xsl:value-of select="functions:version()"/>
               </ctl:param>
               <ctl:param name="WiDtH">
                  <xsl:value-of select="$layer-info/LayerInfo/@width"/>
               </ctl:param>
               <ctl:param name="TrAnSpaReNt">
                  <xsl:value-of select="TRUE"/>
               </ctl:param>
               <parsers:HTTPParser>
                  <parsers:parse>
                     <parsers:NullParser/>
                  </parsers:parse>
               </parsers:HTTPParser>
            </ctl:request>
         </xsl:variable>
         <xsl:if test="functions:mime-match($response/response/headers/header[functions:to-lowercase(@name) = 'content-type'], $format) = 'false'">
            <ctl:fail/>
         </xsl:if>
      </ctl:code>
   </ctl:test>
   <ctl:test name="wms:wmsops-getmap-layer-encoded-name">
      <ctl:param name="WMS_CAPABILITIES"/>
      <ctl:assertion>When a layer is requested using encoded characters in its name, the response is a map.</ctl:assertion>
      <ctl:comment/>
      <ctl:link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#wmsops.getmap.params.layers</ctl:link>
      <ctl:code>
         <xsl:variable name="image-format"
                       select="$WMS_CAPABILITIES/Capability/Request/GetMap/Format[1]"/>
         <xsl:variable name="layer-info">
            <ctl:call-function name="functions:layer-info">
               <ctl:with-param name="root-layer" select="$WMS_CAPABILITIES/Capability/Layer"/>
               <ctl:with-param name="preferred-name"
                               select="string($WMS_CAPABILITIES/Capability//Layer[Name!=functions:encode(string(Name))][1]/Name)"/>
               <ctl:with-param name="preferred-srs">EPSG:4326</ctl:with-param>
               <ctl:with-param name="preferred-bbox">0,-0.0020,0.0040,0</ctl:with-param>
               <ctl:with-param name="preferred-width">100</ctl:with-param>
               <ctl:with-param name="preferred-height">100</ctl:with-param>
            </ctl:call-function>
         </xsl:variable>
         <xsl:variable name="response">
            <ctl:request>
               <ctl:url>
                  <xsl:value-of select="$WMS_CAPABILITIES/Capability/Request/GetMap/DCPType/HTTP/Get/OnlineResource/@xlink:href"/>
               </ctl:url>
               <ctl:method>get</ctl:method>
               <ctl:param name="LAYERS">
                  <xsl:value-of select="encode-for-uri($layer-info/LayerInfo/@name)"/>
               </ctl:param>
               <ctl:param name="SRS">
                  <xsl:value-of select="encode-for-uri($layer-info/LayerInfo/@srs)"/>
               </ctl:param>
               <ctl:param name="BbOx">
                  <xsl:value-of select="$layer-info/LayerInfo/@bbox"/>
               </ctl:param>
               <ctl:param name="WiDtH">100</ctl:param>
               <ctl:param name="request">GetMap</ctl:param>
               <ctl:param name="styles"/>
               <ctl:param name="height">100</ctl:param>
               <ctl:param name="FoRmAt">
                  <xsl:value-of select="functions:encode($image-format)"/>
               </ctl:param>
               <ctl:param name="VeRsIoN">
                  <xsl:value-of select="functions:version()"/>
               </ctl:param>
               <parsers:HTTPParser>
                  <parsers:parse>
                     <parsers:NullParser/>
                  </parsers:parse>
               </parsers:HTTPParser>
            </ctl:request>
         </xsl:variable>
         <xsl:if test="functions:mime-match($response/response/headers/header[functions:to-lowercase(@name) = 'content-type'], $image-format) = 'false'">
            <ctl:fail/>
         </xsl:if>
      </ctl:code>
   </ctl:test>
   <ctl:test name="wms:basic_elements-validate-exception">
      <param name="WMS_CAPABILITIES"/>
      <ctl:assertion>When an exception is generated, it validates.</ctl:assertion>
      <ctl:comment/>
      <ctl:link>http://cite.geoenterpriselab.com/OGCTestData/wms/1.1.1/spec/wms1_1_1.html#basic_elements.exceptions</ctl:link>
      <ctl:code>
         <xsl:variable name="image-format"
                       select="$WMS_CAPABILITIES//Capability/Request/GetMap/Format[1]"/>
         <xsl:variable name="layer-info">
            <ctl:call-function name="functions:queryable-layer-info">
               <ctl:with-param name="root-layer" select="$WMS_CAPABILITIES//Capability/Layer"/>
               <ctl:with-param name="preferred-name"
                               select="$WMS_CAPABILITIES//Capability//Layer[Title = 'cite:Lakes']/Name"/>
               <ctl:with-param name="preferred-srs">EPSG:4326</ctl:with-param>
               <ctl:with-param name="preferred-bbox">0,-0.0020,0.0040,0</ctl:with-param>
               <ctl:with-param name="preferred-width">200</ctl:with-param>
               <ctl:with-param name="preferred-height">100</ctl:with-param>
            </ctl:call-function>
         </xsl:variable>
         <xsl:variable name="response">
            <ctl:request>
               <ctl:url>
                  <xsl:value-of select="$WMS_CAPABILITIES/Capability/Request/GetMap/DCPType/HTTP/Get/OnlineResource/@xlink:href"/>
               </ctl:url>
               <ctl:method>get</ctl:method>
               <ctl:param name="LaYeRs">
                  <xsl:value-of select="functions:encode($layer-info/LayerInfo/@name)"/>
               </ctl:param>
               <ctl:param name="SrS">NONE</ctl:param>
               <ctl:param name="BbOx">
                  <xsl:value-of select="$layer-info/LayerInfo/@bbox"/>
               </ctl:param>
               <ctl:param name="WiDtH">100</ctl:param>
               <ctl:param name="ReQuEsT">GetMap</ctl:param>
               <ctl:param name="StYlEs"/>
               <ctl:param name="HeIgHt">100</ctl:param>
               <ctl:param name="FoRmAt">
                  <xsl:value-of select="functions:encode($image-format)"/>
               </ctl:param>
               <ctl:param name="VeRsIoN">
                  <xsl:value-of select="functions:version()"/>
               </ctl:param>
               <parsers:XMLValidatingParser>
                  <parsers:dtd type="url">http://schemas.opengis.net/wms/1.1.1/WMS_exception_1_1_1.dtd</parsers:dtd>
               </parsers:XMLValidatingParser>
            </ctl:request>
         </xsl:variable>
         <xsl:for-each select="$response">
            <xsl:if test="not(*)">
               <fail/>
            </xsl:if>
         </xsl:for-each>
      </ctl:code>
   </ctl:test>
</package>