Your query looks OK, but I received (from an earlier version of Xindice) the same vendor code error when I typed a wrong element name in the select= part of an XUpdate, so select could not set the context for the update. If there were anything to fiddle with in your XUpdate string, it would be the backslashes before the single-quotes -- I don't think the backslashes are necessary, but they shouldn't do any harm, I think.
Jeff ----- Original Message ----- From: "Kevin McCarty" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Friday, July 19, 2002 8:32 AM Subject: vendor error 2070 with XUpdate > I am having trouble running XUPDATE. > > When i run this from the command line (redhat) it works: > > xindice xpath -c /db/tpri/teacherData -q /data/teacher/student > [EMAIL PROTECTED]'311-11-1111\'] > > proving that the context and the query are correct. > > When i run the same query in a java program it works, also. > But when i run a XUpdate java program it doesn't work. I get an 2070 vendor > error. > > This is the code I used in the XUpdate: > > Collection col = null; > ... > String driver = "org.apache.xindice.client.xmldb.DatabaseImpl"; > Class c = Class.forName(driver); > > Database database = (Database) c.newInstance(); > DatabaseManager.registerDatabase(database); > col = DatabaseManager.getCollection > ("xmldb:xindice:///db/tpri/teacherData"); > > String xupdate = > "<xu:modifications version=\"1.0\" > xmlns:xu=\"http://www.xmldb.org/xupdate\">\n" + > " <xu:remove select=\"/data/teacher/student > [EMAIL PROTECTED]'311-11-1111\']\"/>\n" + > "</xu:modifications>\n"; > System.out.println(xupdate); > > XUpdateQueryService service = (XUpdateQueryService) col.getService > ("XUpdateQueryService", "1.0"); > service.update(xupdate); > ... > > Does any know exactly what vendor error, 2070, means?!!? > > And is there any error in my code that would cause the 2070 error??? > > Thanks, > > Kevin > > > >
