Editing the Capabilities XSL Stylesheets

When the WMS Connector creates a Capabilities file, the format is determined by the corresponding Capabilities XSL stylesheet. The stylesheet is where you can make global changes to the Capabilities file that affect all WMS services.

Location of the XSL stylesheets

The XSL stylesheets are located in the expanded WAR file's WEB-INF directory. The location of the expanded WAR file directory varies depending on the servlet engine you are using. However, the structure of the expanded WAR file is always the same.

<Application Name>
      |__WAR
         |__WEB_INF
            |__classes
               |__wms
                  |__stylesheets
                     |__1.1.1
                        |__wms_capabilities_111.xsl

where

The XSL stylesheets for WMS 1.0.0 and 1.1.0 follow the same location hierarchy as WMS 1.1.1.


Editing the XSL stylesheet for version 1.1.1

The following common parameters can be edited in the XSL stylesheet for version 1.1.1. The process for editing the version 1.0.0 and 1.1.0 stylesheets is similar but are not discussed in this document.

Change the doctype reference to the Capabilities DTD

The DTD file referenced in the Capabilities file is located on the Internet at the OpenGIS web site. If, for some reason, you are not able to access this DTD, you can change the doctype reference to a URL your site does have access to.

  1. Copy WMS_MS_Capabilities.dtd from the following site:

    http://schemas.opengis.net/wms/1.1.1/WMS_MS_Capabilities.dtd

  2. Place the DTD file in a directory that is accessible by your Web server. An example on Windows is the Inetpub\wwwroot directory.
  3. Open wms_capabilities_111.xsl in a text or XML editor.
  4. At the top of the file, search for the following line:

    <xsl:output method="WMT_MS_Capabilities" doctype-system="http://schemas.opengis.net/wms/1.1.1/WMS_MS_Capabilities.dtd" version="1.0" encoding="UTF-8" indent="yes"/>

  5. Replace the URL for the doctype-system attribute with an updated URL pointing to your local version of the DTD file.

Update the contact information

A section is available for filling in contact information.

  1. Open wms_capabilities_111.xsl in a text or XML editor.
  2. Search for the following string:

    <ContactInformation>

  3. Each tag is self-explanatory. Fill in the information between the opening and closing tag, for example,

    <ContactOrganization>ESRI</ContactOrganization>

Update the supported image output list for GetMap requests

The XSL stylesheet lists png and jpeg formats as supported output formats. You can remove these formats or add an additional format such as gif. ArcIMS will return a requested format even if it is not in this list. The purpose of this list is to inform a requesting client the image formats you guarantee are available.

Note: The image/png format is png 8-bit or png 24-bit depending on what you selected in the WMS Connector Administrator.

To update the supported output list:

  1. Open wms_capabilities_111.xsl in a text or XML editor.
  2. Search for the following string:

    <Format>image

  3. Update the list as needed. As an example, you can add gif format to the list:

    <Format>image/gif</Format>

Update the supported format list for GetFeatureInfo responses

When a GetFeatureInfo request is made, the data can be sent back in one of several formats: application/vnd.ogc.wms_xml, text/xml, text/html, or text/plain. See the topic GetFeatureInfo for more information on these output formats.

To update the supported format list:

  1. Open wms_capabilities_111.xsl in a text or XML editor.
  2. Search for the following string:

    <GetFeatureInfo>

  3. Update the format list as needed.

Update the SRS (spatial reference system) identifiers

The SRS list has a short list of common identifiers. You can add or remove identifiers from the list. By default, the list includes the following.

It is recommended to always keep these three identifiers.

To update the SRS list:

  1. Open wms_capabilities_111.xsl in a text or XML editor.
  2. Search for the following string:
  3. Add common projections

  4. Update the SRS list as needed. The syntax is:

    <SRS>EPSG:<SRS identifier></SRS>

    where <SRS identifier> is the code for a spatial reference system.

    For a complete list of identifiers, see About SRS Identifiers.