Question with Namespace

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Question with Namespace

Avril Crack
I want to query the below gene ontology using xquery.
===================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE go:go PUBLIC "-//Gene Ontology//Custom XML/RDF Version 2.0//EN" "http://www.geneontology.org/dtd/go.dtd">

<go:go xmlns:go="http://www.geneontology.org/dtds/go.dtd#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns# ">
    <rdf:RDF>
        <go:term rdf:about="http://www.geneontology.org/go#all" n_associations="0">
            <go:accession>all</go:accession>
            <go:name>all</go:name>
            <go:definition>This term is the most general term possible</go:definition>
        </go:term>
....
===================================================

With the previous beta version,  I could use a query like this
===================================================
document("/db/GO/go.xml")//go:term
===================================================

But with the new snapshot, it always return 0 item. Even when I  already declared namsepace like this
===================================================
declare namespace go="http://www.geneontology.org/dtd/go.dtd#";
document("/db/GO/go.xml")//go:term
===================================================

What 's wrong with my query?


Reply | Threaded
Open this post in threaded view
|

Re: Question with Namespace

Pierrick Brihaye-2
Hi,

Avril Crack wrote:

> With the previous beta version,  I could use a query like this
> ===================================================
> document("/db/GO/go.xml")//go:term
> ===================================================

Bad !

> But with the new snapshot, it always return 0 item. Even when I  already
> declared namsepace like this
> ===================================================
> declare namespace go="http://www.geneontology.org/dtd/go.dtd#";
> document("/db/GO/go.xml")//go:term
> ===================================================

Good !

> What 's wrong with my query?

A typo :-)

Compare you declared NS URI with the one in your document ;-)

Cheers,

--
Pierrick Brihaye, informaticien
Service régional de l'Inventaire / DRAC Bretagne
mailto:[hidden email] / tél : +33 (0)2 99 29 67 78
http://usenet-fr.news.eu.org/fr-chartes/rfc1855.html. L'avez-vous lu ?


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Question with Namespace

Avril Crack

It works now! Thank you very much for your help.
 

 
On 10/28/05, Pierrick Brihaye <[hidden email]> wrote:
Hi,

Avril Crack wrote:

> With the previous beta version,  I could use a query like this
> ===================================================
> document("/db/GO/go.xml")//go:term
> ===================================================

Bad !

> But with the new snapshot, it always return 0 item. Even when I  already
> declared namsepace like this
> ===================================================
> declare namespace go="http://www.geneontology.org/dtd/go.dtd# ";
> document("/db/GO/go.xml")//go:term
> ===================================================

Good !

> What 's wrong with my query?

A typo :-)

Compare you declared NS URI with the one in your document ;-)

Cheers,

--
Pierrick Brihaye, informaticien
Service régional de l'Inventaire / DRAC Bretagne
mailto:[hidden email] / tél : +33 (0)2 99 29 67 78
http://usenet-fr.news.eu.org/fr-chartes/rfc1855.html. L'avez-vous lu ?