Hi, I'm parsing a filter like this with geotools
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"> <ogc:PropertyIsEqualTo> <ogc:Literal>TRUE</ogc:Literal> <ogc:Function name="During"> ... </ogc:Function> </ogc:PropertyIsEqualTo> </ogc:Filter> using next code Parser parser; // create the parser with the filter 1.1 configuration Configuration configuration = new org.geotools.filter.v1_1.OGCConfiguration(); configuration.getProperties().add(Parser.Properties.PARSE_UNKNOWN_ELEMENTS); configuration.getProperties().add(Parser.Properties.PARSE_UNKNOWN_ATTRIBUTES); parser = new Parser(configuration); Filter filter = (Filter) parser.parse(data); but I'm getting the next Exception java.lang.RuntimeException: Parsing failed for Function: java.lang.RuntimeException: Unable to find function During at org.geotools.xml.impl.ParseExecutor.visit(ParseExecutor.java:158) at org.geotools.xml.impl.BindingWalker$BindingExecutionChain.execute(BindingWalker.java:208) at org.geotools.xml.impl.BindingWalker.walk(BindingWalker.java:174) at org.geotools.xml.impl.ElementHandlerImpl.endElement(ElementHandlerImpl.java:222) at org.geotools.xml.impl.ParserHandler.endElement(ParserHandler.java:582) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.geotools.xml.Parser.parse(Parser.java:180) at org.geotools.xml.Parser.parse(Parser.java:140) I think I have to implement a During class that extends FunctionExpressionImpl, but the problem is ¿how to register this class in geotools so parser doesnt fails? Help would be appreciated. Thanks for all. -- View this message in context: http://n2.nabble.com/Unable-to-find-function-when-parsing-OCG-Filter-tp2351982p2351982.html Sent from the geotools-gt2-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
