Opened 14 years ago

Last modified 14 years ago

#3463 new defect

SLD-Filter is using the aliased items

Reported by: tee Owned by: mapserverbugs
Priority: normal Milestone: 5.6.3 release
Component: WFS Server Version: unspecified
Severity: normal Keywords: SLD, CLASSITEM, FIlterEncoding
Cc: assefa, sdlime

Description

There is a Bug at the interpretation of the SLD-Filter attributes. If a gml_[...]_alias attribute has the same name like the CLASSITEM. Here's my Example

Layerdefinition (important fragments)

LAYER
	NAME 'my_layer'
	DATA "shapes/my_shape"
	CLASSITEM 'PRIORITY' # number of the priority (1/2)
	METADATA
		'gml_include_items' 'PRIORITY_NAME' # title of the priority ('low'/'high')
		'gml_PRIORITY_NAME_alias' 'PRIORITY'
	CLASS
		NAME 'high'
		EXPRESION '2'
		COLOR 255 0 0
	END
	CLASS
		NAME 'low'
		EXPRESION '1'
		COLOR 0 255 0
	END
END

SLD-definition

<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0">
  <NamedLayer>
    <Name>vw_hydbasis_uesg_gesetz</Name>
    <UserStyle>
      <FeatureTypeStyle>
        <Rule>
          <Name>high</Name>
          <ogc:Filter>
            <ogc:PropertyIsEqualTo>
              <ogc:PropertyName>PRIORITY</ogc:PropertyName>
              <ogc:Literal>2</ogc:Literal>
            </ogc:PropertyIsEqualTo>
          </ogc:Filter>
          <PolygonSymbolizer>
            <Fill>
              <CssParameter name="fill">#ff0000</CssParameter>  
            </Fill>
          </PolygonSymbolizer>
        </Rule>
	<Rule>
          <Name>low</Name>
          <ogc:Filter>
            <ogc:PropertyIsEqualTo>
              <ogc:PropertyName>PRIORITY</ogc:PropertyName>
              <ogc:Literal>1</ogc:Literal>
            </ogc:PropertyIsEqualTo>
          </ogc:Filter>
          <PolygonSymbolizer>
            <Fill>
              <CssParameter name="fill">#00ff00</CssParameter>  
            </Fill>
          </PolygonSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

Using no SLD the output works correct. But using the SLD I get a blank map as response. The DEBUG 5 says something like this:

[Mon May 31 11:16:20 2010].109000 msyyparse(): Expression parser error. syntax error
[Mon May 31 11:16:20 2010].109000 msEvalExpression: Expression parser error. Failed to parse expression: low = 1
[Mon May 31 11:16:20 2010].109000 msyyparse(): Expression parser error. syntax error
[Mon May 31 11:16:20 2010].109000 msEvalExpression: Expression parser error. Failed to parse expression: high = 2
[Mon May 31 11:16:20 2010].109000 msyyparse(): Expression parser error. syntax error
[Mon May 31 11:16:20 2010].109000 msEvalExpression: Expression parser error. Failed to parse expression: high = 2

When i change the gml_PRIORITY_NAME_alias to PRIORITY_demo the SLD will to what it has to do.

Change History (4)

comment:1 by tee, 14 years ago

Hi Mapserver,

can you reproduce my Bug? And will this be fixed in the 6.0 version?

Thank you very much, tee

comment:2 by sdlime, 14 years ago

Component: MapServer C LibraryWFS Server
Owner: changed from sdlime to mapserverbugs

comment:3 by sdlime, 14 years ago

Cc: assefa added

comment:4 by sdlime, 14 years ago

Cc: sdlime added
Note: See TracTickets for help on using tickets.