Commit b0d00aac authored by Kapilraj Thangeswaran's avatar Kapilraj Thangeswaran

Modification fonctionnement config.xsl et ajout samples

parent 39ac0e3b
......@@ -36,7 +36,7 @@ Supported information
```
<?xml version="1.0" encoding="UTF-8"?>
<config>
<file title='sample.hdoc'>
<file name='sample.scar'>
<link>https://stph.scenari-community.org/nf17/co/nf17.html</link>
</file>
</config>
......
......@@ -49,7 +49,7 @@
<echo>Convert ${inputPath}/${file}</echo>
<basename property="basename" file="${inputPath}/${file}" suffix=".hdoc"/>
<xslt in="${tmpdir}/content.xml" out="${outputPath}/${basename}.json" style="xsl/main.xsl">
<param name="file" expression="${file}"/>
<param name="fileName" expression="${basename}"/>
<param name="inputPath" expression="${inputPath}"/>
</xslt>
</target>
......
<?xml version="1.0" encoding="UTF-8"?>
<config>
<file name='alg1_2016-12-12.scar'>
<link>https://stph.scenari-community.org/nf17/co/nf17.html</link>
</file>
</config>
\ No newline at end of file
......@@ -14,13 +14,13 @@
<xsl:output method="text" encoding="UTF-8" omit-xml-declaration="yes"/>
<xsl:param name="file" required="yes" as="xs:string"/>
<xsl:param name="fileName" required="yes" as="xs:string"/>
<xsl:param name="inputPath" required="yes" as="xs:string"/>
<xsl:template match="/">
{
<xsl:call-template name="config-main">
<xsl:with-param name="file"><xsl:value-of select="$file"/></xsl:with-param>
<xsl:with-param name="fileName"><xsl:value-of select="$fileName"/></xsl:with-param>
<xsl:with-param name="inputPath"><xsl:value-of select="$inputPath"/></xsl:with-param>
</xsl:call-template>
"title" : <xsl:call-template name="title-main"/>,
......
......@@ -4,10 +4,9 @@
xmlns:h2m="http://www.utc.fr/hdoc/hdoc_to_mongo">
<xsl:import href="../xsl-import/string.xsl"/>
<xsl:template name="config-main">
<xsl:param name="file"/>
<xsl:param name="fileName"/>
<xsl:param name="inputPath"/>
"link" : <xsl:value-of select="h2m:escape-string(document('C:\Users\Kapil\Documents\Projets\github\hdoc\hdoc_to_mongo/input/config.xml')/config/file[@title = $file]/link)" />,
"link" : <xsl:value-of select="h2m:escape-string(document('C:\Users\Kapil\Documents\Projets\github\hdoc\hdoc_to_mongo/input/config.xml')/config/file[@name = $fileName]/link)" />,
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
......@@ -26,14 +26,14 @@ In order to work properly this module needs
5. Execute run.bat or run.sh
## Input configuration
You can add or edit "config.xml" in "input" folder in order to provide more information about your documents.
You can add or edit "config.xml" in "input" folder to provide more information about your documents.
Supported information
- link
```
<?xml version="1.0" encoding="UTF-8"?>
<config>
<file title='sample.hdoc'>
<file name='sample.scar'>
<link>https://stph.scenari-community.org/nf17/co/nf17.html</link>
</file>
</config>
......
......@@ -23,6 +23,7 @@
<copy todir="${inputHdocToMongo}">
<fileset dir="${outputOpaleToHdoc}"/>
</copy>
<copy file="${inputPath}/config.xml" todir="${inputHdocToMongo}"/>
<copy todir="${nodeModulesHdocToMongo}">
<fileset dir="${nodeModules}"/>
</copy>
......
<?xml version="1.0" encoding="UTF-8"?>
<config>
<file name='alg1_2016-12-12.scar'>
<link>https://stph.scenari-community.org/nf17/co/nf17.html</link>
</file>
</config>
\ 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