Commit f463e250 authored by simei.yin's avatar simei.yin
Browse files

first basex command and xquery scripts

parent fb21fb0e
......@@ -29,6 +29,17 @@ This project can be used alone if you want to import an HDOC file into basex.
- In a certain section, by searching a key word, user can obtain paragraphes that contain it.
- User can get definitions related to a keyword
- User can get examples whose titles contain a keyword
[Step 1]
- Unzip works, creation of a XML file with the title of the hdoc. (little problem, all of the document is in the output).
- the file created is in the tmp/{hdocfile} directory.
\ No newline at end of file
Step by step :
[Step 1 : File transformation]
- Put the files .hdoc you want to deal with in the folder [input](
- Run the transformation progam (Win : double click run.bat, Linux : execute
[Step 2 : Create data base in basex]
- Download and install [BaseX](
- Run BasexGui
- In the Text Editor of BaseX, open the command script "createbd.bxs" in folder [/basex/command] (
Follow the instructions in the script, and then execute it.
[Step 3 : Make XQuery request]
\ No newline at end of file
# This script allows for creation of a data base in baseX from the xml files in the folder output
# Before executing this script, please make sure that you have successfully finished the transformation in the step 1 in the "user story" of the
# Syntax : CREATE DB [name] ([input])
# Example :
CREATE DB myDB D:\School\UTC\GI04\NF29\Projet\hdoc\hdoc_to_basex\output
#CREATE DB myDB [..the repertory of the projet in your local disk..]/hdoc/hdoc_to_basex/output
# P.S. If you get error message : Resource "..." not found, please confirm your file repertory is correct
\ No newline at end of file
(: This script will return documents by searching one/several keyword in their title :)
(: We can assign a Regular Expression to the variable $name :)
(: For example, $name := '^NF29_HdocEtherpad$', to search for an exact name:)
(: For example, $name := 'NF29', to search for documents whose name contains 'NF29':)
let $name := '^NF29_HdocEtherpad$'
for $doc in //document
where matches($doc/titre, $name, "i")
return $doc
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment