logo       

Re: Why my Xquery always return an empty set?: msg#00100

text.xml.exist

Subject: Re: Why my Xquery always return an empty set?

> > for $StillRegion in /Mpeg7//StillRegion[Text&='tree']
>
> This will select all the StillRegions whose Text children contain the
> text 'tree'. However, I don't see any matching StillRegions in your
> example document.
> If you turn this into
> for $StillRegion in /Mpeg7//StillRegion[Text&='Sea']
>
> you should get one result with the supplied sample.
> Also make sure that the context collection of your query actually
> contains the documents you mean to search.

You will probably also have to declare the default Mpeg7 namespace for your
query to work, .e.g.:

declare default element namespace "urn:mpeg:mpeg7:schema:2001";

for $StillRegion in /Mpeg7//StillRegion[Text&='tree']
return
        <result>
                {$StillRegion}
        </result>

Wolfgang


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise