All Downloads are FREE. Search and download functionalities are using the official Maven repository.

wms13.1.3.0.ctl.interactive.xml Maven / Gradle / Ivy

The newest version!
<?xml version="1.0" encoding="utf-8"?>
<ctl:package
 xmlns:interactive="https://cite.opengeospatial.org/wms-1.3.0/src/ctl/interactive.xml"
 xmlns:functions="https://cite.opengeospatial.org/wms-1.3.0/src/ctl/functions.xml"
 xmlns:wms="http://www.opengis.net/wms"
 xmlns:ctl="http://www.occamlab.com/ctl"
 xmlns:xlink="http://www.w3.org/1999/xlink"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>

   <ctl:test name="interactive:interactive">
      <ctl:context>WMS_Capabilities element</ctl:context>
      <ctl:assertion>The tests that require user interaction behave properly.</ctl:assertion>
      <ctl:code>
         <xsl:if test="wms:Capability/wms:Exception[wms:Format='INIMAGE']">
            <ctl:call-test name="interactive:exceptions-inimage"/>
         </xsl:if>
         <ctl:call-test name="interactive:fees-and-access-constraints"/>
      </ctl:code>
   </ctl:test>

   <ctl:test name="interactive:exceptions-inimage">
      <ctl:context>WMS_Capabilities element</ctl:context>
      <ctl:assertion>When an exception is raised and EXCEPTIONS=INIMAGE, then the error messages are graphically returned as part of the content.</ctl:assertion>
      <ctl:comment>The user will be asked to verify that an image containing an error message indicating that the layer requested was not defined is returned.</ctl:comment>
      <ctl:link title="WMS 1.3.0 section 7.3.3.11">http://cite.opengeospatial.org/OGCTestData/wms/1.3.0/spec/wms1_3.html#wmsops.getmap.params.exceptions</ctl:link>
      <ctl:code>
         <xsl:variable name="form-values">
            <ctl:form width="700" height="500">
               <img border="1">
                  <xsl:attribute name="src">
                     <xsl:value-of select="functions:correct-url-prefix(wms:Capability/wms:Request/wms:GetMap/wms:DCPType/wms:HTTP/wms:Get/wms:OnlineResource/@xlink:href)"/>
                     <xsl:text>VERSION=</xsl:text>
                     <xsl:value-of select="functions:version()"/>
                     <xsl:text>&amp;REQUEST=GetMap</xsl:text>
                     <xsl:text>&amp;LAYERS=NonExistant</xsl:text>
                     <xsl:text>&amp;STYLES=</xsl:text>
                     <xsl:text>&amp;CRS=CRS:84</xsl:text>
                     <xsl:text>&amp;BBOX=-1,-1,1,1</xsl:text>
                     <xsl:text>&amp;WIDTH=300</xsl:text>
                     <xsl:text>&amp;HEIGHT=300</xsl:text>
                     <xsl:text>&amp;FORMAT=</xsl:text>
                     <xsl:value-of select="functions:encode(wms:Capability/wms:Request/wms:GetMap/wms:Format[starts-with(., 'image/png') or starts-with(., 'image/gif') or starts-with(., 'image/jpeg')][1])"/>
                     <xsl:text>&amp;EXCEPTIONS=INIMAGE</xsl:text>
                  </xsl:attribute>
               </img>
               <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')">
            <ctl:fail/>
         </xsl:if>
      </ctl:code>
   </ctl:test>

   <ctl:test name="interactive:fees-and-access-constraints">
      <ctl:context>WMS_Capabilities element</ctl:context>
      <ctl:assertion>When there are no fees or access constraints for using of the service and Fees and AccessConstraints elements are supplied in the service metadata, the reserved word "none" (case-insensitive) is used.</ctl:assertion>
      <ctl:link title="WMS 1.3.0 section 7.3.3.11">http://cite.opengeospatial.org/OGCTestData/wms/1.3.0/spec/wms1_3.html#wmsops.getmap.params.exceptions</ctl:link>
      <ctl:link title="WMS 1.3.0 section 7.2.4.3">http://cite.opengeospatial.org/OGCTestData/wms/1.3.0/spec/wms1_3.html#wmsops.getcapabilities.response.general_metadata</ctl:link>
      <ctl:code>
         <xsl:choose>
            <xsl:when test="(wms:Service/wms:Fees and functions:to-lowercase(wms:Service/wms:Fees) != 'none') or (wms:Service/wms:AccessConstraints and functions:to-lowercase(wms:Service/wms:AccessConstraints) != 'none')">
               <xsl:variable name="form-values">
                  <ctl:form>
                     <xsl:if test="wms:Service/wms:Fees">
                        <pre>&lt;Fees&gt;<xsl:value-of select="wms:Service/wms:Fees"/>&lt;/Fees&gt;</pre>
                     </xsl:if>
                     <xsl:if test="wms:Service/wms:AccessConstraints">
                        <pre>&lt;AccessConstraints&gt;<xsl:value-of select="wms:Service/wms:AccessConstraints"/>&lt;/AccessConstraints&gt;</pre>
                     </xsl:if>
                     <p>
                        The service metadata indicates that there are fees or access constraints for using this service.
                        If there are no fees or access constraints, the elements may be omitted or the reserved keyword none (case insensitive) must be used.
                     </p>
                     <p>
                        Is the service metadata 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')">
                  <ctl:fail/>
               </xsl:if>
            </xsl:when>
            <xsl:otherwise>
               <ctl:message>The service metadata indicates that there are no fees or access constraints.</ctl:message>
            </xsl:otherwise>
         </xsl:choose>
      </ctl:code>
   </ctl:test>

</ctl:package>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy