You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Cyrille Giquello <cy...@ktaland.com> on 2002/03/27 11:21:42 UTC
newbie: querying on src:key
hello world,
Is someone can give me a fast tutorial on querying on "src:key" ?
Here is my first query :
[mad@mls xindice]$ xindice xpath -c xindice://mls.ktaland:4080/db/testdb -q //doc
<?xml version="1.0"?>
<doc xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/testdb" src:key="test">Coucou</doc>
<?xml version="1.0"?>
<doc xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/testdb" src:key="test2">Test2
Coucou</doc>
But I can't try how to querying on attribut src:key to get only one document (<doc>) with src::key =
"test2".
Thanx for your fast help !
Cyrille.
-----------------------------------------
Encryption | Duncan Campbell | DST | Blacklisted 411 | ECHELON | 2600 | PGP | Corsica | NSA
Re: newbie: querying on src:key
Posted by Anders Conrad <ac...@dsl.dk>.
Hello Cyrille.
In my understanding, src:key is not part of the document as such and can not
be used directly in query expressions.
However, src:key is added to the document element on output, so you can use
this attribute in further processing the output document, e.g. through XSLT
where you could refer it through something like
<xsl:value-of select="@src:key"/>.
Anders
----- Original Message -----
From: "Cyrille Giquello" <cy...@ktaland.com>
To: <xi...@xml.apache.org>
Sent: Wednesday, March 27, 2002 11:21 AM
Subject: newbie: querying on src:key
> hello world,
>
> Is someone can give me a fast tutorial on querying on "src:key" ?
>
> Here is my first query :
> [mad@mls xindice]$ xindice xpath -c
xindice://mls.ktaland:4080/db/testdb -q //doc
> <?xml version="1.0"?>
> <doc xmlns:src="http://xml.apache.org/xindice/Query"
src:col="/db/testdb" src:key="test">Coucou</doc>
>
> <?xml version="1.0"?>
> <doc xmlns:src="http://xml.apache.org/xindice/Query"
src:col="/db/testdb" src:key="test2">Test2
> Coucou</doc>
>
> But I can't try how to querying on attribut src:key to get only one
document (<doc>) with src::key =
> "test2".
>
> Thanx for your fast help !
>
> Cyrille.
>
> -----------------------------------------
> Encryption | Duncan Campbell | DST | Blacklisted 411 | ECHELON | 2600 |
PGP | Corsica | NSA
>
>
Re: newbie: querying on src:key
Posted by Cyrille Giquello <cy...@ktaland.com>.
Thank you very much for your Fast Answers !!!
They give me a real fast and good 'Getting Started' !
;o) Thanx again
Cyrille
Cyrille Giquello a écrit :
> hello world,
>
> Is someone can give me a fast tutorial on querying on "src:key" ?
>
> Here is my first query :
> [mad@mls xindice]$ xindice xpath -c xindice://mls.ktaland:4080/db/testdb -q //doc
> <?xml version="1.0"?>
> <doc xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/testdb" src:key="test">Coucou</doc>
>
> <?xml version="1.0"?>
> <doc xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/testdb" src:key="test2">Test2
> Coucou</doc>
>
> But I can't try how to querying on attribut src:key to get only one document (<doc>) with src::key =
> "test2".
>
> Thanx for your fast help !
>
> Cyrille.
>
> -----------------------------------------
> Encryption | Duncan Campbell | DST | Blacklisted 411 | ECHELON | 2600 | PGP | Corsica | NSA
-----------------------------------------
Encryption | Duncan Campbell | DST | Blacklisted 411 | ECHELON | 2600 | PGP | Corsica | NSA
RE: newbie: querying on src:key
Posted by Axel Honfi <e9...@student.tuwien.ac.at>.
Hi Cyrille!
I don'r know if I got your problem right, but if you already have the source
key you don't need to query at all, just retrieve the document, because the
src:key is the xml-object-id:
Command line:
xindice retrieve_document -c /db/your_collection -n objectID
XMLDBSourceHandler:
<map:generate
src="xmldb:xindice://localhost:4080/db/your_collection/{objectID}">
I hope I helped
Axel
-----Original Message-----
From: Cyrille Giquello [mailto:cyrille@ktaland.com]
Sent: Wednesday, March 27, 2002 11:22 AM
To: xindice-users@xml.apache.org
Subject: newbie: querying on src:key
hello world,
Is someone can give me a fast tutorial on querying on "src:key" ?
Here is my first query :
[mad@mls xindice]$ xindice xpath -c xindice://mls.ktaland:4080/db/testdb -q
//doc
<?xml version="1.0"?>
<doc xmlns:src="http://xml.apache.org/xindice/Query"
src:col="/db/testdb" src:key="test">Coucou</doc>
<?xml version="1.0"?>
<doc xmlns:src="http://xml.apache.org/xindice/Query"
src:col="/db/testdb" src:key="test2">Test2
Coucou</doc>
But I can't try how to querying on attribut src:key to get only one document
(<doc>) with src::key =
"test2".
Thanx for your fast help !
Cyrille.
-----------------------------------------
Encryption | Duncan Campbell | DST | Blacklisted 411 | ECHELON | 2600 | PGP
| Corsica | NSA
Re: newbie: querying on src:key
Posted by Carsten Ziegert <ca...@ik.fh-hannover.de>.
Am 27.03.2002 11:21 Uhr schrieb "Cyrille Giquello" unter
<cy...@ktaland.com>:
> hello world,
>
> Is someone can give me a fast tutorial on querying on "src:key" ?
>
> Here is my first query :
> [mad@mls xindice]$ xindice xpath -c xindice://mls.ktaland:4080/db/testdb -q
> //doc
> <?xml version="1.0"?>
> <doc xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/testdb"
> src:key="test">Coucou</doc>
>
> <?xml version="1.0"?>
> <doc xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/testdb"
> src:key="test2">Test2
> Coucou</doc>
>
> But I can't try how to querying on attribut src:key to get only one document
> (<doc>) with src::key =
> "test2".
>
> Thanx for your fast help !
>
> Cyrille.
>
> -----------------------------------------
> Encryption | Duncan Campbell | DST | Blacklisted 411 | ECHELON | 2600 | PGP |
> Corsica | NSA
>
>
>
Cyrille,
the src:xyz attributes don't belong to the original doc but are inserted
by xindice. They belong to the xindice namespace.
The src:key attribute contains the document key you have used when inserting
the document (or a hey key generated by xindice if you've inserted the doc
without any key)
For retrieving the doc with the key "test2" you need no XPath query. Instead
you can use xindice's "retrieve document" option:
xindice rd -c xindice://mls.ktaland:4080/db/testdb -n test2
Good luck,
Carsten
--
Medizinische Hochschule Hannover Fachhochschule Hannover
Abt. Hämatologie und Onkologie FB Informations- und Kommunikationswesen
Carl-Neuberg-Straße 1 Ricklinger Stadtweg 120
30625 Hannover 30459 Hannover
++49-511-9296-1650
http://summit-bmt.fh-hannover.de
RE: newbie: querying on src:key
Posted by "W. Peschke" <Wo...@gmx.ch>.
It seems, that you must use Collection.getResource(), because "src:key"
is added after executing XPATH.
This is my experience. But I'm not a Xindice professionell.
-----Original Message-----
From: Cyrille Giquello [mailto:cyrille@ktaland.com]
Sent: Wednesday, March 27, 2002 11:22 AM
To: xindice-users@xml.apache.org
Subject: newbie: querying on src:key
hello world,
Is someone can give me a fast tutorial on querying on "src:key" ?
Here is my first query :
[mad@mls xindice]$ xindice xpath -c
xindice://mls.ktaland:4080/db/testdb -q //doc
<?xml version="1.0"?>
<doc xmlns:src="http://xml.apache.org/xindice/Query"
src:col="/db/testdb" src:key="test">Coucou</doc>
<?xml version="1.0"?>
<doc xmlns:src="http://xml.apache.org/xindice/Query"
src:col="/db/testdb" src:key="test2">Test2 Coucou</doc>
But I can't try how to querying on attribut src:key to get only one
document (<doc>) with src::key = "test2".
Thanx for your fast help !
Cyrille.
-----------------------------------------
Encryption | Duncan Campbell | DST | Blacklisted 411 | ECHELON | 2600 |
PGP | Corsica | NSA