README.md 2.02 KB
Newer Older
simei.yin's avatar
simei.yin committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
Converter hdoc_to_basex
-----------------------

The purpose of this converter is to obtain an XML data file suitable for importation into basex for futher XQuery requests from a HDOC file

License GPL3.0
--------------

http://www.gnu.org/licenses/gpl-3.0.txt


Credits
-------

* Simei YIN
* Baptiste MONTANGE


Dependance
----------

This project can be used alone if you want to import an HDOC file into basex.


## User stories
------------------
simei.yin's avatar
simei.yin committed
27 28 29 30 31
	- Among a group of courses, user can search by title, author or keywords of the course.
	- By searching a certain keyword, user can obtain the sections that contain it with their hierarchy levels in the course.
	- 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
32 33 34 35 36 37 38 39 40

Step by step :
	[Step 1 : File transformation]
		- Put the files .hdoc you want to deal with in the folder [input](https://gitlab.utc.fr/crozatst/hdoc/tree/master/hdoc_to_basex/input)
		- Run the transformation progam (Win : double click run.bat, Linux : execute run.sh)
	
	[Step 2 : Create data base in basex]
		- Download and install [BaseX](http://basex.org/products/download/all-downloads/)
		- Run BasexGui
simei.yin's avatar
simei.yin committed
41
		- In the Text Editor of BaseX, open the command script "createbd.bxs" in folder [`basex/command`](https://gitlab.utc.fr/crozatst/hdoc/tree/master/hdoc_to_basex/basex/command).
42 43 44
			Follow the instructions in the script, and then execute it.
	
	[Step 3 : Make XQuery request]
simei.yin's avatar
simei.yin committed
45 46 47 48 49 50 51 52
		- In the Text Editor of BaseX, you can open and execute xquery script "main.xq" in folder [`basex/xquery`](https://gitlab.utc.fr/crozatst/hdoc/tree/master/hdoc_to_basex/basex/xquery).
		  It's in this main module that we call predefined functions and execute script
		  
		- .xqm files are library modules where we have defined functions, we can go to these files for more detailed using instructions
		  Available library modules :
			* searchDocByAuthor.xqm
			* searchDocByTitle.xqm
			* searchDocByTitle.xqm