W3C home > Mailing lists > Public > www-ql@w3.org > April to June 2006

Namespace Prefixes

From: David Sledge <dsledge@lternet.edu>
Date: Tue, 04 Apr 2006 11:30:47 -0600
Message-ID: <4432AD47.6080402@lternet.edu>
To: www-ql@w3.org

Do namespace prefixes matter in xqueries or just the associated 
namespace URIs?  Provided that the document biblio.rdf is exactly the 
same for each of the following queries, should each query give me the 
exact same result?

QUERY 1
_______
xquery version "1.0";
declare namespace rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";

for $root in doc('biblio.rdf')/rdf:root
return $root

QUERY 2
_______
xquery version "1.0";
declare namespace blah="http://www.w3.org/1999/02/22-rdf-syntax-ns#";

for $root in doc('biblio.rdf')/blah:root
return $root

QUERY 3
_______
xquery version "1.0";
declare default element namespace 
"http://www.w3.org/1999/02/22-rdf-syntax-ns#";

for $root in doc('biblio.rdf')/root
return $root


Thanks,

David
Received on Tuesday, 4 April 2006 17:30:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 22 July 2006 00:10:21 GMT