wms13.1.3.0.ctl.dimensions.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ets-wms13 Show documentation
Show all versions of ets-wms13 Show documentation
Verifies conformance of implementations to OGC Web Map Service 1.3.0.
The newest version!
<?xml version="1.0" encoding="utf-8"?> <ctl:package xmlns:ctl="http://www.occamlab.com/ctl" xmlns:dims="https://cite.opengeospatial.org/wms-1.3.0/src/ctl/dimensions.xml" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:functions="https://cite.opengeospatial.org/wms-1.3.0/src/ctl/functions.xml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:parsers="http://www.occamlab.com/te/parsers" xmlns:wms="http://www.opengis.net/wms" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <ctl:test name="dims:dims"> <ctl:context>WMS_Capabilities element</ctl:context> <ctl:assertion>Support for dimensional data is correct.</ctl:assertion> <ctl:code> <ctl:call-test name="dims:missing-no-default"/> </ctl:code> </ctl:test> <ctl:test name="dims:missing-no-default"> <ctl:context>WMS_Capabilities element</ctl:context> <ctl:assertion>When a layer that has a dimension without a default value is requested without supplying the dimension parameter, the response is an exception with code=MissingDimensionValue.</ctl:assertion> <ctl:link title="WMS 1.3.0 section C.4.1">http://cite.opengeospatial.org/OGCTestData/wms/1.3.0/spec/wms1_3.html#dims.responses.incorrect</ctl:link> <ctl:code> <xsl:variable name="image-format" select="wms:Capability/wms:Request/wms:GetMap/wms:Format[starts-with(., 'image/png') or starts-with(., 'image/gif')][1]"/> <xsl:variable name="dimension" select="//wms:Layer/wms:Dimension[not(@default) or @default='0' or @default='false'][1]"/> <xsl:variable name="layer" select="string($dimension/../descendant-or-self::wms:Layer[wms:Name][1]/wms:Name)"/> <xsl:variable name="layer-info"> <ctl:call-function name="functions:layer-info"> <ctl:with-param name="root-layer" select="wms:Capability/wms:Layer"/> <ctl:with-param name="preferred-name" select="$layer"/> <ctl:with-param name="preferred-crs">CRS:84</ctl:with-param> <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 that have a dimension without a default value.</ctl:message> </xsl:when> <xsl:otherwise> <xsl:variable name="response"> <ctl:request> <ctl:url> <xsl:value-of select="wms:Capability/wms:Request/wms:GetMap/wms:DCPType/wms:HTTP/wms:Get/wms: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="CrS"> <xsl:value-of select="functions:encode($layer-info/LayerInfo/@crs)"/> </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> </ctl:request> </xsl:variable> <xsl:if test="not($response/ogc:ServiceExceptionReport/ogc:ServiceException[@code='MissingDimensionValue'])"> <ctl:fail/> </xsl:if> </xsl:otherwise> </xsl:choose> </ctl:code> </ctl:test> </ctl:package>