README.md 2 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 27 28 29 30 31
Converter opale_to_basex
-----------------------

The purpose of this converter is to obtain an HDOC file from an Opale document. 


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

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


Credits
-------

* Simei YIN
* Baptiste MONTANGE


Dependance
----------

In order to work properly, this module needs

1. [`opale_to_hdoc`](https://gitlab.utc.fr/crozatst/hdoc/tree/master/opale_to_hdoc) (Opale to Hdoc conversion)
2. [`hdoc_to_basex`](https://gitlab.utc.fr/crozatst/hdoc/tree/master/hdoc_to_basex) (Hdoc to Basex conversion)


User Stories
----------

Baptiste Montange's avatar
Baptiste Montange committed
32 33 34 35 36
Please consult the section "User Stories" of README.md file in [`hdoc_to_basex`] (https://gitlab.utc.fr/crozatst/hdoc/tree/master/hdoc_to_basex/README.md)

Step by step :

	[`Step 1 : File transformation`]
37
		- Put the files .scar you want to deal with in the folder [`input`](https://gitlab.utc.fr/crozatst/hdoc/tree/master/opale_to_basex/input)
Baptiste Montange's avatar
Baptiste Montange committed
38 39 40 41 42 43
		- Run the transformation progam (Win : double click run.bat, Linux : execute run.sh)
		- This transformation includes :
			* Title, authors, keywords
			* First Level section : title, type
	
	[`Step 2 : Create data base in basex`]
44
		- Download and install [`BaseX`](http://basex.org/products/download/all-downloads/)
Baptiste Montange's avatar
Baptiste Montange committed
45 46 47 48 49 50 51 52 53 54 55 56 57
		- 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/opale_to_basex/basex/command).
		  Follow the instructions in the script, and then execute it.
	
	[`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/opale_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
			* searchSectionByTitle.xqm