Commit 5f0b0521 authored by Baptiste Perraud's avatar Baptiste Perraud
Browse files

Update README, main structure of ant script and add of basic xsl files

parent 900a05de
......@@ -13,9 +13,9 @@
* Raphaël Debray
* Baptiste Perraud
* 2016
- Raphaël Debray
- Baptiste Perraud
......@@ -37,7 +37,7 @@ Known bugs
Generic Todo
* Generate a clean PDF file (using the LaTeX formatting example)
- Create a default CSS file with basic spine rules
......@@ -51,9 +51,18 @@ Generic Todo
Technical notes
* The backlog of the current project is at the following url: <>
* The user stories of the current project are at the following url: <>
* The product backlog of the current project can be found through the following url: <>
* Time-sheets can be found through the following urls:
- <>
User Story
* L'utilisateur dispose d'un fichier hdoc en entrée, il veut obtenir un fichier pdf paginé en sortie.
* Il accède au convertisseur (dossier dédié) hdoc_to_pdf.
* Il place le fichier hdoc dans le dossier input.
* Il lance le script run.bat/ ou exécute directement le script ant hdoc_to_pdf.ant.
* Il récupère le fichier pdf dans le dossier output.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project name="hdoc_to_opale" basedir="." default="convert">
<project name="hdoc_to_pdf" basedir="." default="convert">
<!--<taskdef resource="net/sf/antcontrib/">
......@@ -8,10 +8,10 @@
<!-- Arguments properties -->
<property name="InputPath" value="input" />
<property name="OutputPath" value="output" />
<property name="InputPath" location="input" />
<property name="OutputPath" location="output" />
<property name="tmp" location="${basedir}/tmp"/>
<property name="OutputPdfPath" value="${OutputPath}/result.pdf" />
<property name="OutputPdfPath" location="${OutputPath}/result.pdf" />
<target name="convert">
......@@ -38,18 +38,21 @@
<!-- Gives all rights to avoid bugs-->
<chmod dir="${tmp}" perm="777"/>
<!--launches the XSLT find_content to retrieve the content path-->
<xslt in="${tmp}/META-INF/container.xml" out="prepare_hdoc.ant" style="xsl/find_content.xsl">
<param name="TempRepository" expression="${tmp}"/>
<chmod file="prepare_hdoc.ant" perm="777"/>
<!--launches the ANT prepare_hdoc.ant resulting from the previous XSLT in order to get a clean xhtml ready for the pdf conversion -->
<ant antfile="prepare_hdoc.ant"/>
<!--launches the ANT xxx to execute the FS/Java script and get a converted PDF file in the output directory-->
<!--launches the XSLT find_content to retrieve the content path-->
<!--<xslt in="${tmp}/META-INF/container.xml" out="get_content.ant" style="xsl/find_content.xsl">
<param name="DocumentType" expression="${DocType}"/>
<!--temporary files and folders are deleted-->
<!--<delete dir="{tmp}"/>-->
<!--<delete dir="result"/>
<delete file="get_content.ant"/>
<delete file="get_ressources.ant"/>-->
<!--<delete dir="${tmp}"/>-->
<!--<delete file="prepare_hdoc.ant"/>-->
<?xml version="1.0" encoding="UTF-8"?>
<!--find_content.xsl creates a ANT file prepare_hdoc.ant-->
xmlns:xsl="" version="2.0"
<xsl:param name="TempRepository" required="yes" as="xs:string"/>
<xsl:output method="xml" indent="yes"/>
<xsl:template match="h:container">
<project name="hdoc_to_pdf" default="main">
<target name="main">
<xsl:template match="h:rootfiles">
<xsl:template match="h:rootfile">
<xsl:variable name="path" select="@full-path"/>
<xslt in="{$TempRepository}/{$path}" out="{$TempRepository}/hdoc_nsless.xhtml" style="xsl/ns_remover.xsl"/>
<xslt in="{$TempRepository}/hdoc_nsless.xhtml" out="{$TempRepository}/flat_hdoc.xhtml" style="xsl/hdoc_flattenizer.xsl"/>
<?xml version="1.0" encoding="UTF-8"?>
xmlns:xsl="" version="2.0"
<xsl:output method="xml" indent="yes"/>
<xsl:template match="html">
<?xml version="1.0" encoding="UTF-8"?>
<xsl:output method="xml" indent="yes"/>
<!-- Identity transformation -->
<xsl:template match="node()|@*">
<xsl:apply-templates select="node()|@*"/>
<!-- Namespace substitution for hdoc elements -->
<xsl:template match="*" priority="1">
<xsl:element name="{local-name()}">
<xsl:apply-templates select="node()|@*"/>
<!-- Suppress processing-instructions -->
<xsl:template match="processing-instruction()" priority="1"/>
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