From: Marlus M. <mar...@gm...> - 2007-12-05 00:02:59
|
Hi guys. I am having problem to execute the method readXML of SLDParser when my SLD has a tag filter as fallow : <StyledLayerDescriptor version="1.0.0" xmlns:sld="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink=" http://www.w3.org/1999/xlink" elementFormDefault="qualified"> <sld:NamedLayer> <sld:UserStyle> <sld:Name>MUNICIPIO</sld:Name> <sld:Title>MUNICIPIO</sld:Title> <sld:Abstract>uniqueValue-0</sld:Abstract> <sld:FeatureTypeStyle> <sld:FeatureTypeName>MUNICIPIO</sld:FeatureTypeName> <sld:Rule> <sld:Name>0.014043957587248086510778737448212906397</sld:Name> <sld:Abstract/> <sld:Title>Title: 0.014043957587248086510778737448212906397 </sld:Title> <sld:MaxScaleDenominator>0.0</sld:MaxScaleDenominator> <ogc:Filter> <ogc:PropertyIsEqualTo> <ogc:Div> <ogc:PropertyName>ID</ogc:PropertyName> <ogc:PropertyName>AREA_TOTAL</ogc:PropertyName> </ogc:Div> <ogc:Literal> 0.014043957587248086510778737448212906397</ogc:Literal> </ogc:PropertyIsEqualTo> </ogc:Filter> <sld:PolygonSymbolizer> <sld:Fill> . . . Before, I used a SLD whithout Expression Complex in Filter , just tag as <ogc:PropertyName> and <ogc:Literal> and the follow code always run: ByteArrayInputStream bao = new ByteArrayInputStream( sb.toString ().getBytes("utf-8")); System.out.println(sb.toString()); StyleFactory sf = StyleFactoryImpl.createStyleFactory(); SLDParser parser = new SLDParser(sf,bao); style = parser.readXML (); styleUser = style[0]; . . . but now, with those tag filter with expression as above, always fire exception. I am using the version of geoTools gt2-main-2.1.0 and ( I belive that version of sld is 1.0.0 ;=) ) Please, somebody that know fine , help me, I have few experience in SIG and GeoToolsAPIs Thanks a lot Marlus Misael |