README.md 2.42 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
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.


simei.yin's avatar
simei.yin committed
25
User stories
simei.yin's avatar
simei.yin committed
26
------------------
simei.yin's avatar
simei.yin committed
27 28
	- 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.
simei.yin's avatar
simei.yin committed
29
	- In a certain section, by searching a key word, user can obtain paragraphs that contain it.
simei.yin's avatar
simei.yin committed
30 31
	- User can get definitions related to a keyword
	- User can get examples whose titles contain a keyword
32 33

Step by step :
simei.yin's avatar
simei.yin committed
34 35

	[`Step 1 : File transformation`]
36 37 38
		- 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)
		- This transformation includes :
simei.yin's avatar
simei.yin committed
39
			* Title, authors, keywords
simei.yin's avatar
simei.yin committed
40
			* First Level section : title, type, paragraphs
41
	
simei.yin's avatar
simei.yin committed
42
	[`Step 2 : Create data base in basex`]
43 44 45
		- Download and install [BaseX](http://basex.org/products/download/all-downloads/)
		- Run BasexGui
		- In the Text Editor of BaseX, open the command script "createbd.bxs" in folder [`command`](https://gitlab.utc.fr/crozatst/hdoc/tree/master/hdoc_to_basex/basex/command).
simei.yin's avatar
simei.yin committed
46
		  Follow the instructions in the script, and then execute it.
47
	
simei.yin's avatar
simei.yin committed
48
	[`Step 3 : Make XQuery request`]
49
		- In the Text Editor of BaseX, you can open and execute xquery script "main.xq" in folder [`xquery`](https://gitlab.utc.fr/crozatst/hdoc/tree/master/hdoc_to_basex/basex/xquery).
simei.yin's avatar
simei.yin committed
50 51 52 53 54 55
		  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
simei.yin's avatar
simei.yin committed
56 57 58
			* searchSectionByTitle.xqm


simei.yin's avatar
simei.yin committed
59
TODO List
simei.yin's avatar
simei.yin committed
60
------------------
61
	- xlst Transformation :
simei.yin's avatar
simei.yin committed
62 63 64 65
		* Remove text formats
		* Sub sections
		* Exercices
		* Resources : images, ...
simei.yin's avatar
simei.yin committed
66
	
67
	- XQuery requests :
simei.yin's avatar
simei.yin committed
68 69 70
		* Search keywords in text 
		* Search sub sections by keywords in their titles
		* Search exercices by keywords in their titles