[Geoserver-devel] [JIRA] (GEOS-8063) WMS1.3.0 SLD definition can break getcapabilities

Pierre Mauduit created an issue

GeoServer / BugGEOS-8063

WMS1.3.0 SLD definition can break getcapabilities

Issue Type:

BugBug

Affects Versions:

2.8.3

Assignee:

Unassigned

Components:

WMS

Created:

03/Apr/17 3:31 PM

Environment:

Debian Linux 7, tomcat 6, Java 7

Priority:

LowLow

Reporter:

Pierre Mauduit

Observed by a customer:

When a SLD is defined without a Title nested in the Description element (which is compliant in regard to the SLD specifications, relying on https://github.com/geotools/geotools/blob/master/modules/library/api/src/main/java/org/geotools/styling/Style.java#L39), the Description object used in the GetCapabilities generation can have a title set to null, ending up with a missing Title element:

        <Style>
          <Name>ref_cad:app_cadastrapp_parcelle</Name>
          <LegendURL width="20" height="20">
            <Format>image/png</Format>
            <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="https://portail.sig.rennesmetropole.fr/geoserver/ows?service=WMS&request=GetLegendGraphic&format=image%2Fpng&width=20&height=20&layer=ref_cad%3Aapp_cadastrapp_parcelle"/>
          </LegendURL>
        </Style>

This might break the GetCapabilities XSD compliance. Here is a result of xmllint on the Getcapabilities output:

$ xmllint --valid --schema http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd extra-prod-getcap.xml
[...]
extra-prod-getcap.xml:5479: element LegendURL: Schemas validity error : Element '{http://www.opengis.net/wms}LegendURL': This element is not expected. Expected is ( {http://www.opengis.net/wms}Title ).
[...]
extra-prod-getcap.xml:5486: element LegendURL: Schemas validity error : Element '{http://www.opengis.net/wms}LegendURL': This element is not expected. Expected is ( {http://www.opengis.net/wms}Title ).
extra-prod-getcap.xml fails to validate

Proposition: one possible fix would be to reuse the SLD name if Description.title null, since the Title element needs to be in the GetCapabilities response.

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v1000.870.3#100039-sha1:b0a21de)

Atlassian logo