1. 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)
2. Run the transformation progam (Win : double click run.bat, Linux : execute run.sh)
3. This transformation includes :
- 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 :
* Title, authors, keywords
* First Level section : title, type, paragraphs
[`Step 2 : Create data base in basex`]
1. Download and install [BaseX](http://basex.org/products/download/all-downloads/)
2. Run BasexGui
3. 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).
- 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).
Follow the instructions in the script, and then execute it.
[`Step 3 : Make XQuery request`]
1. 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).
- 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).
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
@@ -67,7 +67,7 @@ You can use special rules in Freemind to personnalize your Scenari Module :
***#question** : a MCQ
***#singlechoicequestion** : a QCU
***#choice-qcu** : an answer within a QCU
***#list** : a list inside a paragraph, first node being the title and children being the content.
***#list** : a list, first node being the title and children being the content.
***#solution** : a solution associated to a single choice within a QCU (matches an integer)
***#choice-correct** : a correct answer within a MCQ
***#choice-incorrect** : an incorrect answer within a MCQ
...
...
@@ -83,6 +83,8 @@ You can use special rules in Freemind to personnalize your Scenari Module :
## Known bugs
* Current xsl cant handle anything else than a hierarchy of nodes. It should be investigated in order to be able to use other types of children, in order to work with native mindmap formatting, as bold or italic.
## TODO
* Develop new hashtags to create other type of Opale contents (such as QCM, self-evaluation etc.)
...
...
@@ -98,7 +100,7 @@ This converter is using standard NF29 conversion project structure : a main ANT
This ant file is called by a script (run.sh or run.bat), with ou without parameters.
### Hdoc files
During the conversion process, the converter is using the converter mindmapping_to_hodc. The result of this conversion is also available in the folder output.
During the conversion process, the converter is using the converter mindmapping_to_hdoc. The result of this conversion is also available in the folder output.
@@ -34,14 +34,14 @@ Please consult the section "User Stories" of README.md file in [`hdoc_to_basex`]
Step by step :
[`Step 1 : File transformation`]
- 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)
- 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)
- 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`]
- Download and install [BaseX](http://basex.org/products/download/all-downloads/)
- 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/opale_to_basex/basex/command).
Follow the instructions in the script, and then execute it.
# This script will a database that includes all the xml files in the folder /hdoc_to_basex/output automatically
# Before executing this script, please make sure that you have successfully finished the transformation in the step 1 in the part "user story" of the README.md
# Syntax : CREATE DB [name] ([input])
#CREATE DB myDB [..the repertory of the projet in your local disk..]/hdoc/hdoc_to_basex/output
# Example :
CREATE DB myDB D:/School/UTC/GI04/NF29/Projet/hdoc/hdoc_to_basex/output
# P.S. If you get error message : Resource "..." not found, please confirm your file repertory is correct
declare function myNs:searchSectionByTitle($keyword as xs:string, $docs as node()*) as node()*
{
let $keyword_noAcc := translate($keyword, 'áàâäéèêëíìîïóòôöúùûüABCDEFGHIJKLMNOPQRSTUVWXYZ','aaaaeeeeiiiioooouuuuabcdefghijklmnopqrstuvwxyz')
for $doc in $docs
return
for $section in $doc/sections/section
let $title_noAcc := translate($section/titresection, 'áàâäéèêëíìîïóòôöúùûüABCDEFGHIJKLMNOPQRSTUVWXYZ','aaaaeeeeiiiioooouuuuabcdefghijklmnopqrstuvwxyz')