
On Sat, 22 Jan 2005 oxygen-user-request@oxygenxml.com wrote:
Date: Sat, 22 Jan 2005 18:23:02 +0200 From: Sean Wheller <sean@enbaya.co.za> Subject: [oXygen-user] complex xpath
Using the following document as a study http://www.gnome.org/~shaunm/doctable/doaproll.rdf
My question is how to perform an XPath that will return all CVSRepository nodes. I try //CVSRepository and get "XPath returned no results".
Any hints should be documented and added to Oxygen Help.
The problem is an XPath one and not an oXygen one. In your XML document, each "<Project>" element is assigned to a namespace without a prefix, making it impossible to find its subelements using XPath. Try adding this attribute to your root RDF element: xmlns:prj="http://www.gnome.org/~shaunm/faux-doap" then you can use the XPath expression //prj:CVSRepository and find the elements. DS -- David Sewell, Editorial and Technical Manager Electronic Imprint, The University of Virginia Press PO Box 400318, Charlottesville, VA 22904-4318 USA Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903 Email: dsewell@virginia.edu Tel: +1 434 924 9973