/** * Create a new <code>GMLObjectXPath</code> from an XPath expression string. * * @param xpathExpr * the XPath expression, must not be <code>null</code> * @param root * root of the navigation hierarchy (document node), must not be <code>null</code> * @throws JaxenException * if there is a syntax error in the expression */ public GMLObjectXPath( String xpathExpr, GMLObject root ) throws JaxenException { super( xpathExpr, new GMLObjectNavigator( root ) ); SimpleFunctionContext fc = new XPathFunctionContext(); fc.registerFunction( WFS_200_NS, "valueOf", new ValueOf() ); fc.registerFunction( null, "valueOf", new ValueOf() ); SimpleNamespaceContext nc = new SimpleNamespaceContext(); nc.addNamespace( "wfs", WFS_200_NS ); setFunctionContext( fc ); setNamespaceContext( nc ); } }