Hi Mohamed,
first question:
> i want to know how to excute a query in java
> i tried this and it works
> String xqueryString = "for $x in doc('books.xml')//book return
> $x/title/text()";
> but i want to excute a FLWR query
>
This query is already FLWR one. Anyway, you can execute any query the same
way you did this one.
second question:
> i installed dtsearch but i did't understand nothing from it.
> i dont know how to use it.
> i just want to create an xquery function "F" which i could put ft:contains
> function
>
Sedna doesn't have ft:contains function. To use full-text search you need
to:
- create full-text index on nodes you would like to search in (details here
http://modis.ispras.ru/sedna/progguide/ProgGuidesu8.html#x14-550002.5.4).
For example:
CREATE FULL-TEXT INDEX "articles" ON doc("foo")/library//article
TYPE "xml"
it creates index "articles" which you can use to search article which
contains some word, phrase or something.
- use full-text search function to search (details here
http://modis.ispras.ru/sedna/progguide/ProgGuidesu5.html#x9-320002.2.3) what
you need. For example, you can employ the ”articles” index defined to
select the titles of articles that contain word ”apple”:
ftindex-scan("articles", "apple")/title
> i put a function in a file named math.xqlib
>
i load this file in my database with this command: se_term "LOAD MODULE
> 'c:\math.xqlib' " testDB it's ok
> *Bulk load succeeded*
> and that's all
> i dont know how can i use the function in this module in my main java
> program ?
> thank you
>
You need to import module to use it (details here:
http://www.w3.org/TR/xquery/#id-module-import). Just modify you query to
include "import module" prolog declaration:
import module namespace math = "http://example.org/math-functions";
{your query there}
Ivan Shcheklein,
Sedna Team
------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Sedna-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sedna-discussion