From: Wolfgang M. M. <wol...@us...> - 2004-03-30 17:08:11
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmldb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7528/src/org/exist/xmldb Modified Files: RemoteXPathQueryService.java Log Message: It is now possible to pass user declared variables via XMLRPC. Index: RemoteXPathQueryService.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/RemoteXPathQueryService.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** RemoteXPathQueryService.java 25 Mar 2004 13:25:56 -0000 1.14 --- RemoteXPathQueryService.java 30 Mar 2004 16:56:32 -0000 1.15 *************** *** 21,24 **** --- 21,25 ---- protected RemoteCollection collection; protected Hashtable namespaceMappings = new Hashtable(5); + protected Hashtable variableDecls = new Hashtable(); protected Properties outputProperties = null; *************** *** 39,42 **** --- 40,45 ---- if(namespaceMappings.size() > 0) optParams.put(RpcAPI.NAMESPACES, namespaceMappings); + if(variableDecls.size() > 0) + optParams.put(RpcAPI.VARIABLES, variableDecls); optParams.put(RpcAPI.BASE_URI, collection.getPath()); Vector params = new Vector(); *************** *** 66,70 **** try { Hashtable optParams = new Hashtable(); ! optParams.put(RpcAPI.NAMESPACES, namespaceMappings); if(sortExpr != null) optParams.put(RpcAPI.SORT_EXPR, sortExpr); --- 69,76 ---- try { Hashtable optParams = new Hashtable(); ! if(namespaceMappings.size() > 0) ! optParams.put(RpcAPI.NAMESPACES, namespaceMappings); ! if(variableDecls.size() > 0) ! optParams.put(RpcAPI.VARIABLES, variableDecls); if(sortExpr != null) optParams.put(RpcAPI.SORT_EXPR, sortExpr); *************** *** 135,141 **** */ public void declareVariable(String qname, Object initialValue) throws XMLDBException { ! // TODO Not implemented ! //throw new XMLDBException(ErrorCodes.NOT_IMPLEMENTED, ! // "method not implemented"); } --- 141,145 ---- */ public void declareVariable(String qname, Object initialValue) throws XMLDBException { ! variableDecls.put(qname, initialValue); } |