Ticket #3115 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

[WMC] embedded SLD in context does not work with namespace prefix

Reported by: bartvde Owned by: assefa
Priority: normal Milestone: 5.6 release
Component: MapServer C Library Version: unspecified
Severity: normal Keywords:
Cc: tomkralidis;assefa

Description

For instance:

<Style current="1"><SLD><sld:StyledLayerDescriptor xmlns:sld="http://www.opengis.net/sld" version="1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml"><sld:NamedLayer><sld:Name>AAA63</sld:Name><sld:UserStyle>

Which is what OpenLayers? will write out.

Apparently the following line does not deal with namespace prefixes:

psStyleSLDBody = CPLGetXMLNode(psStyle, "SLD.StyledLayerDescriptor");

Attachments

mapserver-5.2.0-3115.patch Download (425 bytes) - added by bartvde 4 years ago.
patch to fix this issue

Change History

Changed 4 years ago by bartvde

patch to fix this issue

Changed 4 years ago by assefa

  • owner changed from sdlime to assefa
  • milestone set to 6.0 release

will look at it for 6.0

Changed 4 years ago by assefa

  • milestone changed from 6.0 release to 5.6 release

I believe adding the sld: name space in the <sld:StyledLayerDescriptor is not correct??

I have added a fix to also try to parse the node SLD.sld:StyledLayerDescriptor, which would keep the sld as is without stripping the name spaces. (r9544)

Changed 3 years ago by assefa

  • status changed from new to closed
  • resolution set to fixed

Changed 3 years ago by bartvde

Assefa, this is not wrong of OpenLayers?, this is perfectly valid in XML.

Note: See TracTickets for help on using tickets.