Commit ec34cd5c authored by Esquilax76's avatar Esquilax76

readme and basic xsl

parent e78283a9
Converter hdoc_to_neo4j
-----------------------
The purpose of this converter is to obtain a file of Neo4j requests from HDOC format.
License GPL3.0
--------------
http://www.gnu.org/licenses/gpl-3.0.txt
Credits
-------
* Alié Félix
* Routier Clément
Dependance
----------
This project can be used alone if you only want to convert an HDOC into a Neo4j requests file.
User documentation
------------------
You have to respect the following steps :
0. If you start from an Opale format, you can use the opale_to_hdoc converter, or directly execute the opale_to_Neo4j one.
1. The first step is to put you HDOC document into the input directory inside the project hdoc_to_neo4j. Please, place only one file in that folder.
2. The second one is to launch the bash, the bat or start the ant (depending on your Operating System) by typing the following instruction :
ant -buildfile hdoc_to_neo4j
3. After the execution, you should find in the output folder (which is created in step 2) a result.cql file that contains all the requests to recreate the items and links of you hdoc input.
Unsupported
-----------
Known bugs
----------
Todo
----
Technical notes
---------------
Capitalisation
--------------
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xpath-default-namespace="http://www.utc.fr/ics/hdoc/xhtml"
exclude-result-prefixes="xs"
version="2.0">
<xsl:output method="text" indent="no"/>
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="head"/>
<xsl:template match="body">
<xsl:apply-templates select="//section"/>
</xsl:template>
<xsl:template match="body/section">
MERGE (`<xsl:value-of select="./header/h1"/>`:Item { title:"<xsl:value-of select="./header/h1"/>" });
<xsl:apply-templates select="./section"/>
</xsl:template>
<xsl:template match="body/section/section">
MERGE (`<xsl:value-of select="./header/h1"/>`:Item { title:"<xsl:value-of select="./header/h1"/>" });
MATCH (`<xsl:value-of select="./header/h1"/>`:Item), (`<xsl:value-of select="parent::section/header/h1"/>`:Item)
CREATE (`<xsl:value-of select="./header/h1"/>`)-[:LIEN]-> (`<xsl:value-of select="parent::section/header/h1"/>`);
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment