[oXygen-user] Re: complex xpath
David Sewell
Sat Jan 22 14:18:27 CST 2005
On Sat, 22 Jan 2005 wrote:
> Date: Sat, 22 Jan 2005 18:23:02 +0200
> From: Sean Wheller <>
> 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: Tel: +1 434 924 9973
More information about the oXygen-user
mailing list