{"action":"closed","issue":{"url":"https://api.github.com/repos/mapserver/mapserver/issues/3021","repository_url":"https://api.github.com/repos/mapserver/mapserver","labels_url":"https://api.github.com/repos/mapserver/mapserver/issues/3021/labels{/name}","comments_url":"https://api.github.com/repos/mapserver/mapserver/issues/3021/comments","events_url":"https://api.github.com/repos/mapserver/mapserver/issues/3021/events","html_url":"https://github.com/mapserver/mapserver/issues/3021","id":3961335,"number":3021,"title":"SLD: expression is not exported inside the <rule>","user":{"login":"mapserver-bot","id":1608057,"avatar_url":"https://avatars.githubusercontent.com/u/1608057?v=3","gravatar_id":"","url":"https://api.github.com/users/mapserver-bot","html_url":"https://github.com/mapserver-bot","followers_url":"https://api.github.com/users/mapserver-bot/followers","following_url":"https://api.github.com/users/mapserver-bot/following{/other_user}","gists_url":"https://api.github.com/users/mapserver-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/mapserver-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapserver-bot/subscriptions","organizations_url":"https://api.github.com/users/mapserver-bot/orgs","repos_url":"https://api.github.com/users/mapserver-bot/repos","events_url":"https://api.github.com/users/mapserver-bot/events{/privacy}","received_events_url":"https://api.github.com/users/mapserver-bot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mapserver/mapserver/labels/Bug","name":"Bug","color":"fc2929"},{"url":"https://api.github.com/repos/mapserver/mapserver/labels/MapServer%20C%20Library","name":"MapServer C Library","color":"ffffff"},{"url":"https://api.github.com/repos/mapserver/mapserver/labels/No%20Recent%20Activity","name":"No Recent Activity","color":"ededed"}],"state":"closed","locked":false,"assignee":{"login":"sdlime","id":1599227,"avatar_url":"https://avatars.githubusercontent.com/u/1599227?v=3","gravatar_id":"","url":"https://api.github.com/users/sdlime","html_url":"https://github.com/sdlime","followers_url":"https://api.github.com/users/sdlime/followers","following_url":"https://api.github.com/users/sdlime/following{/other_user}","gists_url":"https://api.github.com/users/sdlime/gists{/gist_id}","starred_url":"https://api.github.com/users/sdlime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdlime/subscriptions","organizations_url":"https://api.github.com/users/sdlime/orgs","repos_url":"https://api.github.com/users/sdlime/repos","events_url":"https://api.github.com/users/sdlime/events{/privacy}","received_events_url":"https://api.github.com/users/sdlime/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2012-04-03T23:13:42Z","updated_at":"2016-02-23T17:32:00Z","closed_at":"2016-02-23T17:32:00Z","body":"**Reporter: sholl**\n**Date: 2009/05/22 - 07:13**\n**Trac URL:** http://trac.osgeo.org/mapserver/ticket/3021\nWhen exporting the following mapfile-layer as an SLD using generateSLD() from python mapscript, the resulting SLD lacks a filter-property inside the <rule> to classify the the layer correctly:\r\n\n```\r\nLAYER\r\n    CONNECTION \"xx/xx@xx\"\r\n    CONNECTIONTYPE ORACLESPATIAL\r\n    DATA \"geom from ISAL...\"\r\n     METADATA\r\n        \"wms_srs\"       \"EPSG:325833\"\r\n        \"wms_layer_group\"\r\n\"/Fachinfo/Umwelt/Boden_und_Abfallwirtschaft/Kom: Altlast\"\r\n        \"wms_extent\"    \"3376670 5693050 3412800 5742770\"\r\n        \"wms_title\"     \"Altlast: Typ\"\r\n      END\r\n    NAME \"altlast_typ\"\r\n    SIZEUNITS PIXELS\r\n    STATUS ON\r\n    TOLERANCE 10\r\n    TOLERANCEUNITS PIXELS\r\n    TRANSPARENCY 100\r\n    TYPE POINT\r\n    UNITS METERS\r\n#    CLASSITEM CODE\r\n    CLASS\r\n      EXPRESSION ('[CODE]'>='70000' and '[CODE]'<'80000')\r\n      NAME \"Stoffl. schaedl. Bodenveraenderung: saniert\"\r\n      MINSCALE 50000\r\n      METADATA\r\n      END\r\n      STYLE\r\n        SIZE 7\r\n        COLOR 0 0 0\r\n        SYMBOL \"triangle\"\r\n      END\r\n      TEMPLATE \"../html/altlast_typ.html\"\r\n    END\r\n    [...]\r\nEND\r\n```\n\r\n\r\nThe resulting SLD looks like the following:\r\n\n```\r\n<StyledLayerDescriptor xmlns=\"http://www.opengis.net/sld\"\r\nxmlns:gml=\"http://www.opengis.net/gml\"\r\nxmlns:ogc=\"http://www.opengis.net/ogc\" xml\r\nns:xlink=\"http://www.w3.org/1999/xlink\"\r\nxmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" version=\"1.0.0\"\r\nxsi:schemaLocation=\"http://ww w.opengis.net/sld\r\nhttp://10.224.1.83/schemas/sld/1.0.0/StyledLayerDescriptor.xsd\">  \r\n<NamedLayer> \r\n <Name>altlast_typ</Name> \r\n <UserStyle> <FeatureTypeStyle>\r\n <Rule> \r\n  <Name>Stoffl. schaedl. Bodenveraenderung: saniert</Name>\r\n          <MinScaleDenominator>50000.000000</MinScaleDenominator>\r\n          <PointSymbolizer>\r\n            <Graphic>\r\n              <Mark>\r\n                <WellKnownName>triangle</WellKnownName>\r\n                <Fill>\r\n                  <CssParameter name=\"fill\">#0000ff</CssParameter>\r\n                </Fill>\r\n              </Mark>\r\n              <Size>7</Size>\r\n            </Graphic>\r\n          </PointSymbolizer>\r\n        </Rule>\r\n[...]\r\n     </FeatureTypeStyle>\r\n    </UserStyle>\r\n  </NamedLayer>\r\n</StyledLayerDescriptor>\r\n```\n"}}