You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by David Kensche <da...@rwth-aachen.de> on 2003/11/13 11:41:25 UTC
xpath select by attribute value
Hi,
I'm trying to select a node with a rather simple
xpath expression:
/document[@url='file://ID101rev1.htm']/revision[last()]
(where document is the root node of any document in the collection I query)
The document I want to retrieve is this:
<document url="file://ID101rev1.htm">
<revision url="file://ID101rev1.htm"
mime="text/html"
source="Google"
language="en">
....
</revision>
</document>
The revision[last()] part works fine in other queries where the document
is retrieved by filename, but if I specify any attribute value like in
the @url part I get no results. Can anybody say what is my mistake?
Many thanks beforehand,
David