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

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

	[`Step 1 : File transformation`]
36
37
		- 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)
simei.yin's avatar
simei.yin committed
38
39
40
		- This transformation includes :
			* Title, authors, keywords
			* First Level section : title, type
41
	
simei.yin's avatar
simei.yin committed
42
	[`Step 2 : Create data base in basex`]
43
44
		- Download and install [BaseX](http://basex.org/products/download/all-downloads/)
		- Run BasexGui
simei.yin's avatar
simei.yin committed
45
		- 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
49
	[`Step 3 : Make XQuery request`]
		- 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
59
60
61
62
63
64
65
66
67
68
69
70
			* searchSectionByTitle.xqm


## TODO List
------------------
	- xlst Transformation :
		* texts of sections
		* sub sections
		* exercices
		* resources : images, ...
	
	- XQuery requests :
		* Search keywords in text 
		* Search sub sections by keywords in their titles
		* Search exercices by keywords in their titles