OpenGIS Map Server Capabilities DTD
A CAPABILITIES DTD (Normative)
This annex contains the Map Server Capabilities DTD corresponding to this version of the specification.
A.1 Capabilities DTD <!-- NOTE: comments in this Document Type Definition impose additional constraints beyond those codified in the DTD syntax. A conformant Web Map Server must provide Capabilities XML that (1) validates against the DTD and (2) does not violate the constraints stated in comments herein. --> <!-- The parent element of the Capabilities document includes as children a Service element with general information about the server and a Capability element with specific information about the kinds of functionality offered by the server. --> <!ELEMENT WMT_MS_Capabilities (Service, Capability) > <!-- The version attribute specifies the specification revision to which this DTD applies. Its format is one, two or three integers separated by periods: "x", or "x.y", or "x.y.z", with the most significant number appearing first. Future revisions are guaranteed to be numbered in monotonically increasing fashion, though gaps may appear in the sequence. All known versions may be found at http://www.digitalearth.gov/wmt/xml/ --> <!-- The updateSequence attribute is a sequence number for managing propagation of the contents of this document. For example, if a Map Server adds some data layers it can increment the update sequence to inform catalog servers that their previously cached versions are now stale. The format is a positive integer. --> <!ATTLIST WMT_MS_Capabilities version CDATA #FIXED "1.0.0" updateSequence CDATA "0"> <!-- This WMT-wide list of possible output formats can be redefined by individual servers; see the sample XML. --> <!ENTITY % KnownFormats " GIF | JPEG | PNG | WebCGM | SVG | GML.1 | GML.2 | GML.3 | WBMP | WMS_XML | MIME | INIMAGE | TIFF | GeoTIFF | PPM | BLANK " > <!-- The Service element provides metadata for the service as a whole. --> <!ELEMENT Service (Name, Title, Abstract?, Keywords?, OnlineResource, Fees?, AccessConstraints?) > <!-- A service name defined within the Web Mapping Specification namespace. Currently only the name "GetMap" is defined. --> <!ELEMENT Name (#PCDATA) > <!-- A human-readable title to briefly identify this server in menus. --> <!ELEMENT Title (#PCDATA) > <!-- A descriptive narrative for more information about this server. --> <!ELEMENT Abstract (#PCDATA) > <!-- Short words to help catalog searching. Currently, no controlled vocabulary has been defined. --> <!ELEMENT Keywords (#PCDATA) > <!-- The top-level HTTP URL of this service. Typically the URL of a "home page" for the service. See also the onlineResource attributes of <DCPType> children, below. Currently, no non-HTTP platforms have been specified. --> <!ELEMENT OnlineResource (#PCDATA)> <!-- Elements indicating what fees or access constraints are imposed. The reserved keyword "none" indicates no constraint exists. --> <!ELEMENT Fees (#PCDATA)> <!ELEMENT AccessConstraints (#PCDATA)> <!-- A Capability lists available request types, how exceptions may be reported, and whether any vendor-specific capabilities are defined. It also includes an optional list of map layers available from this server. --> <!ELEMENT Capability (Request, Exception?, VendorSpecificCapabilities?, Layer?) > <!-- Available WMT-defined request types are listed here. At least one of the values is required, but more than one may be given. --> <!ELEMENT Request (Map | Capabilities | FeatureInfo)+ > <!-- For each request method offered by the server, list the available output formats and the supported distributed computing platforms (DCPs). Example: <Map> <Format><PNG /><JPEG /><GML.1 /></Format> <DCPType><HTTP><Get onlineResource="URL" /></HTTP></DCPType> </Map> --> <!-- GetMap interface: Presence of the Map element means this server can generate a map of a specified area, either as a picture or a feature collection --> <!ELEMENT Map (Format, DCPType+)> <!-- GetCapabilities interface: Presence of the Capabilities element means this server can generate a description of its abilities and holdings formatted in XML that complies with this DTD. --> <!ELEMENT Capabilities (Format, DCPType+)> <!-- GetFeatureInfo interface: Presence of the FeatureInfo element means this server can return information about a specific feature given a valid map request and a location on that map. --> <!ELEMENT FeatureInfo (Format, DCPType+)> <!-- Available Distributed Computing Platforms (DCPs) are listed here. At present, only HTTP is defined. --> <!ELEMENT DCPType (HTTP) > <!-- Available HTTP request methods. --> <!ELEMENT HTTP (Get | Post)+ > <!-- HTTP request methods. The onlineResource attribute indicates the URL prefix for HTTP GET requests (everything before the question mark and query string: http://hostname[:port]/path/scriptname); for HTTP POST requests, onlineResource is the complete URL. The HTTP GET syntax for Map, Capabilities and FeatureInfo requests has been well defined and is described in the OGC Web Map Server Interface Specification. The POST formalism, wherein GetMap arguments are encoded in XML and POSTed to the server, has not yet been fully developed. --> <!ELEMENT Get EMPTY> <!ATTLIST Get onlineResource CDATA #REQUIRED> <!ELEMENT Post EMPTY> <!ATTLIST Post onlineResource CDATA #REQUIRED> <!-- Available formats. Not all formats are relevant to all requests. Individual servers MAY add new formats as shown in the sample XML accompanying this DTD. --> <!ELEMENT Format ( %KnownFormats; )+ > <!ELEMENT GIF EMPTY> <!-- Graphics Interchange Format --> <!ELEMENT JPEG EMPTY> <!-- Joint Photographics Expert Group --> <!ELEMENT PNG EMPTY> <!-- Portable Network Graphics --> <!ELEMENT PPM EMPTY> <!-- Portable PixMap --> <!ELEMENT TIFF EMPTY> <!-- Tagged Image File Format --> <!ELEMENT GeoTIFF EMPTY> <!-- Geographic TIFF --> <!ELEMENT WebCGM EMPTY> <!-- Web Computer Graphics Metafile --> <!ELEMENT SVG EMPTY> <!-- Scalable Vector Graphics --> <!ELEMENT WMS_XML EMPTY> <!-- eXtensible Markup Language --> <!ELEMENT GML.1 EMPTY> <!-- Geography Markup Language, profile 1 --> <!ELEMENT GML.2 EMPTY> <!-- Geography Markup Language, profile 2 --> <!ELEMENT GML.3 EMPTY> <!-- Geography Markup Language, profile 3 --> <!ELEMENT WBMP EMPTY> <!-- Wireless Access Protocol (WAP) Bitmap --> <!ELEMENT MIME EMPTY> <!-- Multipurpose Internet Mail Extensions --> <!ELEMENT INIMAGE EMPTY> <!-- display text in the returned image --> <!ELEMENT BLANK EMPTY> <!-- return an image with all pixels transparent if supported by the image format, otherwise all pixels set to the BGCOLOR if present, otherwise all pixels set to the same (arbitrary) value --> <!-- An Exception element indicates which output formats are supported for reporting problems encountered when executing a request. Available Exception formats MUST include one or more of WMS_XML, INIMAGE, or BLANK. Example: <Exception><Format><INIMAGE /><WMS_XML /></Format></Exception>. --> <!ELEMENT Exception (Format)> <!-- The optional VendorSpecificCapabilities element lists any capabilities unique to a particular Map Server. Because the information is not known a priori, it cannot be constrained by this particular DTD. A vendor-specific DTD fragment must be supplied at the start of the XML Capabilities document, after the reference to the general WMT_MS_Capabilities DTD. See the sample XML for further information. --> <!-- DEFINE THIS ELEMENT AS NEEDED IN YOUR XML <!ELEMENT VendorSpecificCapabilities (your stuff here) > --> <!-- Nested list of zero or more map Layers offered by this server. The Layer element can be omitted if the server has no layers (for example, if it offers only geoprocessing services but no actual data). --> <!-- A Layer element has two functions: it either refers to a map layer which can be requested by Name in the LAYERS parameter of a GetMap request, or it is a category Title for all the layers nested within. In the latter case, the category itself MAY include a Name by which all of the nested layers can be requested at once. For example, a parent layer "Roads" may have children "Interstates" and "County Roads" and allow the user to request either child individually or both together. --> <!-- A Map Server which advertises a Layer containing a Name element MUST be able to accept that Name as the value of LAYERS argument in a GetMap request and return the corresponding map. A Viewer Client MUST NOT attempt to request a Layer that has a Title but no Name. --> <!-- A Map Server MUST include at least one <Layer> element for each map layer offered. If desired, data layers MAY be repeated in different categories when relevant. A Layer element MAY state the Name by which a map of the layer is requested, MUST give a Title to be used in human-readable menus, and MAY include: a human-readable Abstract containing further description, available Spatial Reference Systems (SRS), bounding boxes in Lat/Lon and SRS-specific coordinates indicating the available geographic coverage, styles in which the layer is available, a URL for more information about the data, and a hint concerning appropriate map scales for displaying this layer. Use of the nesting hierarchy is optional. --> <!-- The following table specifies the number and source of the various elements (and one attribute) describing a Layer that has a Name. Without a Name, the Layer is merely a category title and all other elements are optional; if present, some of those elements may be inherited by children as described in the table. inherit from element number parent? comments ======= ====== ======= ======== Name 1 - this table only applies to Named Layers (those which can be requested in a GetMap call) no default Title 1 - required in each Layer; no default Abstract 0/1 - optional; no default Keywords 0/1 - optional; no default SRS 1 add one list is required; default from parent; list may include multiple whitespace-separated values LatLonBoundingBox 1 replace exactly one is required; default from parent BoundingBox 0+ replace one is required per SRS other than EPSG:4326; default from parent DataURL 0/1 - optional; no default Style 0+ add optional; default from parent ScaleHint 0/1 replace optional; default from parent Layer 0+ - optional; no default; if present, each is a "child" of the enclosing Layer and inherits some default values as described in this table queryable 1 replace optional; default is "0" (not queryable) (attribute) or parent value if present --> <!ELEMENT Layer ( Name?, Title, Abstract?, Keywords?, SRS?, LatLonBoundingBox?, BoundingBox*, DataURL?, Style*, ScaleHint?, Layer* ) > <!-- A data layer may be queryable, as specified by this optional binary attribute. 1 = queryable, 0 = not queryable. A server that declares a Layer to by queryable MUST implement the GetFeatureInfo interface. --> <!ATTLIST Layer queryable (0 | 1) "0" > <!-- Listing of available Spatial Reference Systems (SRS). * The root Layer element must include a list of all SRSes which are common to *all* subsidiary layers. This allows clients to quickly determine that a server cannot possibly satisfy a request for a particular SRS. Use an empty element if there is no common SRS. * Layer-specific SRS: Optionally, layers may add to the global SRS list, or to the list inherited from a parent layer as described above. Any duplication should be ignored by clients. That is, a particular layer may list all of its SRSes, even if it repeats information in the top-level SRS. The content of the SRS element is a free-text list of SRS names separated by whitespace. A name includes a namespace prefix, a colon, and one or more parameter values. Currently defined namespaces are: prefix parameters comment ====== ========== ======= EPSG EPSG code European Petroleum Survey Group geodesy parameters http://www.petroconsultants.com/products/geodetic.html Examples: 'EPSG:4326' is WGS84 lat/lon, 'EPSG:26986' is NAD83 / Massachusetts Mainland. AUTO WMT code, WMT list of "automatic" projections. WMT code: EPSG units, an integer identifier assigned by WMT (see Longitude, http://www.digitalearth.gov/wmt/auto.html). EPSG units: Latitude one of the EPSG codes for identifying units, indicating what units are to be used in Bounding Boxes. Longitude: central meridian of the projection (degrees). Latitude: central latitude of the projection (degrees). Example: 'AUTO:42003,9001,-100,45' is auto orthographic projection, bbox units in meters, center at 100W 45N. The bounding box is measured in a plane perpendicular to the line of sight, *not* directly on the Earth. --> <!ELEMENT SRS (#PCDATA) > <!-- The LatLonBoundingBox attributes indicate the edges of the enclosing rectangle in latitude/longitude decimal degrees (as in SRS EPSG:4326 [WGS1984 lat/lon]). LatLonBoundingBox MUST be supplied regardless of what SRS the map server may support, but it MAY be approximate if EPSG:4326 is not supported. Its purpose is to facilitate geographic searches without requiring coordinate transformations by the search engine. --> <!ELEMENT LatLonBoundingBox EMPTY> <!ATTLIST LatLonBoundingBox minx CDATA #REQUIRED miny CDATA #REQUIRED maxx CDATA #REQUIRED maxy CDATA #REQUIRED> <!-- The BoundingBox attributes indicate the edges of the bounding box in units of the specified spatial reference system. --> <!ELEMENT BoundingBox EMPTY> <!ATTLIST BoundingBox SRS CDATA #REQUIRED minx CDATA #REQUIRED miny CDATA #REQUIRED maxx CDATA #REQUIRED maxy CDATA #REQUIRED> <!-- A Map Server MAY use DataURL to offer more information about the data underneath a particular layer. While the semantics are not well-defined, as long as the results of an HTTP GET request against the DataURL are properly MIME-typed, Viewer Clients and Cascading Map Servers can make use of this. --> <!ELEMENT DataURL (#PCDATA) > <!-- A Style element lists the name by which a style is requested and a human-readable title for pick lists, optionally (and ideally) provides a human-readable description, and optionally gives a style URL. If a Layer is offered in only a single Style, the Map Server MAY choose not to give it a name. Nevertheless, when handling a GetMap request a server MUST accept " (null) and 'default' in the STYLES parameter as synonyms for the default (or only) style. --> <!ELEMENT Style ( Name, Title, Abstract?, StyleURL? ) > <!-- A Map Server MAY use StyleURL to offer more information about the data or symbology underlying a particular Style. While the semantics are not well-defined, as long as the results of an HTTP GET request against the StyleURL are properly MIME-typed, Viewer Clients and Cascading Map Servers can make use of this. A possible use could be to allow a Map Server to provide legend information. --> <!ELEMENT StyleURL (#PCDATA) > <!-- Minimum and maximum scale hints for which it is appropriate to display this layer. It is STRONGLY RECOMMENDED that for Picture Case return formats the min and max values be expressed as ground distance in meters of a southwest to northeast diagonal of the pixel whose X coordinate is floor(width/2) and whose Y coordinate is floor(height/2). In the figure below, the X is in the pixel whose diagonal measurement is used. +===+===+===+ +===+===+===+===+ | | | | | | | | | +===+===+===+ +===+===+===+===+ | | X | | | | X | | | +===+===+===+ +===+===+===+===+ | | | | | | | | | +===+===+===+ +===+===+===+===+ | | | | | +===+===+===+===+ It is understood that this definition is not geodetically precise, but at the same time the hope is that by including it, conventions will develop around its use which can be later specified more clearly. --> <!ELEMENT ScaleHint EMPTY> <!ATTLIST ScaleHint min CDATA #REQUIRED max CDATA #REQUIRED>
Prepared by Robin Cover for The XML Cover Pages archive.