Cory, Saxon 8.5.1 is not supported it needs to be 8.1b.
Link to correct version is :- http://easynews.dl.sourceforge.net/sourceforge/saxon/saxonb8-1.zip Regards Don -----Original Message----- From: Cory Bestgen [mailto:[EMAIL PROTECTED] Sent: 08 September 2005 03:42 To: [email protected] Subject: trying to use xpath and running into problems I am having trouble getting the selectPath(String) method to work the way I understand that it should. I am using xmlbeans 2.0 jdk 1.4.2 and have saxon 8.5.1 on my classpath... I have attached the sample xml file I have loaded. When I try to run the follwing code: String declarations = "declare namespace osca='http://www.courts.mo.gov/osca'; "; declarations += "declare namespace case='http://www.courts.mo.gov/case-constraint'; "; String path = "$this//osca:Case/case:CaseTrackingID/case:ID/text()"; XmlObject[] x = legalEnvelopeDocument.selectPath(declarations + path); System.out.println("Length: " + x.length); System.out.println(x.length > 0 ? x[0].toString() : "not found"); I get the following error: java.lang.RuntimeException: Trying XBeans path engine... Trying Saxon... FAILED on declare namespace osca='http://www.courts.mo.gov/osca'; declare namespace case='http://www.courts.mo.gov/case-constraint'; $this//osca:Case/case:CaseTrackingID/case:ID/text() When I try the following path with the same above code: String path = "$this//osca:Case/case:CaseTrackingID/case:ID"; It runs but I get two elements back instead of the one that should be returned based on the xml document. Do I misunderstand how xpath is supposed to be used or am I just missing a . or slash somewhere. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

