>>>>
>>>> On 3/10/2017 4:18 PM, Kendall Shaw wrote:
>>>>
>>>> This worked for me, where “test-local” contains a document:
>>>>
>>>>
>>>>
>>>> Context context = new Context();
>>>>
>>>>
contains a document:
>>>
>>>
>>>
>>> Context context = new Context();
>>>
>>> LocalSession s = new LocalSession(context);
>>>
>>> s.execute(new Check("test-local"));
>>>
>>>
>> LocalSession s = new LocalSession(context);
>>
>> s.execute(new Check("test-local"));
>>
>> try (Query q = s.query("for $doc in collection() return
>$doc")) {
>>
>> while (q.more()) {
&g
}
>
>
>
> But, why your code isn’t working could be useful to know. It seems like
> there are some details left out.
>
>
>
> Kendall
>
>
>
> From: on behalf of AJ Weber
>
> Date: Friday, March 10, 2017 at 11:40 AM
> To: "basex-talk@mailman.uni-
n.uni-konstanz.de"
Subject: Re: [basex-talk] Simple query
OK, changing this so that the code flows like yours works much, much better. I
now return all 3 documents I expect are in the database.
FOLLOW-UP Question: How do I close the database properly with these classes?
I had been doing a conte
n(q.next()_);_
}
}
But, why your code isn’t working could be useful to know. It seems
like there are some details left out.
Kendall
*From: * on behalf of AJ
Weber
*Date: *Friday, March 10, 2017 at 11:40 AM
*To: *"basex-talk@mailman.uni-konstanz.de"
*Subjec
t seems
like there are some details left out.
Kendall
*From: * on behalf of AJ
Weber
*Date: *Friday, March 10, 2017 at 11:40 AM
*To: *"basex-talk@mailman.uni-konstanz.de"
*Subject: *Re: [basex-talk] Simple query
On 3/10/2017 2:24 PM, Kendall Shaw wrote:
Michael Seiferle gave
ot;basex-talk@mailman.uni-konstanz.de"
Subject: Re: [basex-talk] Simple query
On 3/10/2017 2:24 PM, Kendall Shaw wrote:
Michael Seiferle gave the answer already, I think. What would collection() be
referring to? How would BaseX know what to return? Probably there is no
database specified. Presumab
,
"basex-talk@mailman.uni-konstanz.de"
*Subject: *Re: [basex-talk] Simple query
On 3/9/2017 3:46 AM, Fabrice ETANCHAUD wrote:
Hello Aaron,
You would learn faster by using the BaseXGUI application,
You will benefit from syntax highlighting, real time execution,
a
:44 AM
To: Fabrice ETANCHAUD ,
"basex-talk@mailman.uni-konstanz.de"
Subject: Re: [basex-talk] Simple query
On 3/9/2017 3:46 AM, Fabrice ETANCHAUD wrote:
Hello Aaron,
You would learn faster by using the BaseXGUI application,
You will benefit from syntax highlighting, real time execution
tatement, e);
}
Best regards,
Fabrice
*De :*basex-talk-boun...@mailman.uni-konstanz.de
[mailto:basex-talk-boun...@mailman.uni-konstanz.de] *De la part de*
Aaron Weber
*Envoyé :* jeudi 9 mars 2017 00:31
*À :* basex-talk@mailman.uni-konstanz.de
*Objet :* [basex-talk] Simple query
Newbie ale
Sorry for the delayed response...
I was aware of the empty collection and default (but maybe not clear on
it)...
This query works:
String myXQueryString ="for $doc in collection() where matches(document-uri($doc),
'" + DocID +
"') return $doc";
return (new XQuery(myXQueryString).exe
la part de Aaron Weber
Envoyé : jeudi 9 mars 2017 00:31
À : basex-talk@mailman.uni-konstanz.de
Objet : [basex-talk] Simple query
Newbie alert.
I'm trying to get my feet wet with BaseX, and in doing so, am trying to
understand XQuery and how to apply it to a database full of documents (not ju
Hi Aaron,
welcome to the list!
For BaseX to „open“ a collection you need to address it by URI; in your case no
URI is present, so BaseX loads the „default collection“ which is set to the
currently opened database (I guess you have none open :—)):
So usually you want to address your collectio
Newbie alert.
I'm trying to get my feet wet with BaseX, and in doing so, am trying to
understand XQuery and how to apply it to a database full of documents (not just
a single document that is typically queried).
I am using Java and can post my code, but with a LocalSession, and a query, the
15 matches
Mail list logo