This gotcha is well-known to XSLT users, though it still catches many newcomers.
The Project element is in a namespace. Its full name is {}Project. You are trying to match it against the unqualified name "Project" (which expands to {}Project - a name in no namespace). These are different names, so they don't match.
You can declare a default namespace in the query:
declare default namespace "";
which should cause the query to work as you expect. Note however that this default namespace will also apply to any elements you try to construct.
Michael Kay

From: [] On Behalf Of Paulo F. Sarli
Sent: 29 September 2005 21:26
Subject: [saxon] XQuery dump

I have a rather large xml file, exported by MSProject 2003, with size 7.153.314 bytes, that starts like this:

<?xml version="1.0"?>

<Project xmlns="">
<Title>My Project</Title>

Very, well. I created a very simple file that I supply to XQuery, using the following comandline:

java net.sf.saxon.Query a.xqy
These are the file´s contents (the single line below):
doc( "ici.xml" )/Project
This query returns a blank response. If I change "Project" for "*", the query does what I expect it to do, which is dump the entire xml file. My question is: What am I doing wrong? Please forgive if the answer is too obvious for me to figure out...
A coisa certa dita na hora errada
é pior do que
a coisa errada dita na hora certa...