Opened 3 years ago

Closed 3 years ago

#2513 closed defect (fixed)

wms - SLD parser error for special characters < and >

Reported by: Bang Pham Huu Owned by: Bang Pham Huu
Priority: major Milestone: 10.0
Component: petascope Version: 9.8
Keywords: Cc: Dimitar Misev, Vlad Merticariu
Complexity: Medium

Description

With this SLD below, petascope has problem to parse it.

<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:gml="http://www.opengis.net/gml" xmlns:sld="http://www.opengis.net/sld" version="1.0.0" xmlns:ogc="http://www.opengis.net/ogc">
  <UserLayer>
    <sld:LayerFeatureConstraints>
      <sld:FeatureTypeConstraint/>
    </sld:LayerFeatureConstraints>
    <sld:UserStyle>
      <sld:Name>2018-07-01_m1_LAI2_E34N34</sld:Name>
      <sld:FeatureTypeStyle>
        <sld:Rule>
          <sld:RasterSymbolizer>
            <sld:ChannelSelection>
              <sld:GrayChannel>
                <sld:SourceChannelName>1</sld:SourceChannelName>
              </sld:GrayChannel>
            </sld:ChannelSelection>
            <sld:ColorMap type="ramp">
              <sld:ColorMapEntry color="#ffffff" label="&lt; 0.25" quantity="250"/>
              <sld:ColorMapEntry color="#fff9d9" label="0.5" quantity="500"/>
              <sld:ColorMapEntry color="#e6f6e1" label="1.0" quantity="1000"/>
              <sld:ColorMapEntry color="#caeac3" label="2.0" quantity="2000"/>
              <sld:ColorMapEntry color="#a6db9f" label="3.0" quantity="3000"/>
              <sld:ColorMapEntry color="#7bc87c" label="4.0" quantity="4000"/>
              <sld:ColorMapEntry color="#4bb062" label="5.0" quantity="5000"/>
              <sld:ColorMapEntry color="#2a924a" label="6.0" quantity="6000"/>
              <sld:ColorMapEntry color="#077331" label="7.0" quantity="7000"/>
              <sld:ColorMapEntry color="#022f00" label="> 7.5" quantity="7500"/>
            </sld:ColorMap>
          </sld:RasterSymbolizer>
        </sld:Rule>
      </sld:FeatureTypeStyle>
    </sld:UserStyle>
  </UserLayer>
</StyledLayerDescriptor>

with error

Caused by: org.xml.sax.SAXParseException; lineNumber: 17; columnNumber: 57; XML document structures must start and end within the same entity.
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

Change History (1)

comment:1 by Bang Pham Huu, 3 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.