Commit 8da14483 authored by harriga_merouane@hotmail.fr's avatar harriga_merouane@hotmail.fr

Merge

parents ac694476 179e986a
......@@ -2,6 +2,7 @@
<project basedir=".." name="main" default="convert">
<property name="InputPath" value="bib2.bib"></property>
<property name="OutputPath" value="${basedir}\result\ref.scar"></property>
<property name="lib" value="${basedir}/lib"/>
<target name="convert">
<antcall target="preparation"/>
......@@ -39,7 +40,7 @@
<java
fork="true"
failonerror="true"
jar="lib/bibtex.jar"
jar="${lib}/bibtex.jar"
>
<arg value="${InputPath}"/>
<arg value="${basedir}/tmp"/>
......@@ -49,7 +50,7 @@
<target name="BibXmlToHdocBib">
<!-- Convert from BibXlm to HdocBib -->
<xslt classpath="${basedir}/lib/saxon9he.jar"
<xslt classpath="${basedir}/${lib}/saxon9he.jar"
in="${basedir}\tmp\tmpBibXml.xml" out="${basedir}\tmp\tmpHdocBib.xml"
xslresource="${basedir}/XSL/BibToHdoc.xsl"></xslt>
</target>
......
......@@ -12,7 +12,6 @@
<property name="log" location="${basedir}/log"/>
<property name="schema" location="${basedir}/schema"/>
<property name="bibtex" location="${basedir}/bibtex_to_opale"/>
<property file="global.properties"/>
<target name="convert">
......@@ -91,6 +90,7 @@
</first>
<xslt in="${toString:first}" out="${tmp}/${filename}/generateContentPath.xml" style="${xsl}/transformation0.xsl" processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison">
<param name="filename" expression="${filename}"/>
<param name="lib" expression="${lib}"/>
</xslt>
<chmod file="${tmp}/${filename}/generateContentPath.xml" perm="777"/>
</sequential>
......@@ -146,7 +146,14 @@
<sequential>
<local name="filename"/>
<basename property="filename" file="@{inputFile}"/>
<trycatch property="foo" reference="bar">
<try>
<jing file="${tmp}/${filename}/decompressedHdoc/META-INF/container.xml" rngfile="${schema}/hdoc1-container.rng"></jing>
</try>
<catch>
<echo>Validation failed</echo>
</catch>
</trycatch>
</sequential>
</for>
</target>
......@@ -160,7 +167,14 @@
<sequential>
<local name="filename"/>
<basename property="filename" file="@{inputFile}"/>
<trycatch property="foo" reference="bar">
<try>
<jing file="${tmp}/${filename}/decompressedOpale/main.xml" rngfile="${schema}/op_ue.rng"></jing>
</try>
<catch>
<echo>Validation failed</echo>
</catch>
</trycatch>
</sequential>
</for>
</target>
......
......@@ -21,7 +21,7 @@
<property name="filename" location="${{tmp}}/{$filename}"/>
<taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask">
<classpath>
<pathelement location="../lib/jing.jar"/>
<pathelement location="../${lib}/jing.jar"/>
</classpath>
</taskdef>
......@@ -43,7 +43,14 @@
<param name="elementid" expression="{@data-export-id}"/>
</xslt>
<trycatch property="foo" reference="bar">
<try>
<jing file="${{filename}}/decompressedOpaleDivided/{@data-export-file}" rngfile="${{schema}}/op_expUc.rng"></jing>
</try>
<catch>
<echo>Validation failed</echo>
</catch>
</trycatch>
</xsl:template>
</xsl:stylesheet>
......@@ -9,9 +9,10 @@
<project name="getContentFileAndTransformIt" basedir="." default="start">
<property file="global.properties"/>
<property name="filename" location="${filename}"/>
<property name="lib" location="${lib}"/>
<taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask">
<classpath>
<pathelement location="../lib/jing.jar"/>
<pathelement location="../${lib}/jing.jar"/>
</classpath>
</taskdef>
......@@ -21,8 +22,14 @@
<xsl:template match="c:rootfiles">
<target name="start">
<trycatch property="foo" reference="bar">
<try>
<jing file="${{tmp}}/${{filename}}/decompressedHdoc/{c:rootfile/@full-path}" rngfile="${{schema}}/hdoc1-xhtml.rng"></jing>
</try>
<catch>
<echo>Validation failed</echo>
</catch>
</trycatch>
<xslt
in="${{tmp}}/${{filename}}/decompressedHdoc/{c:rootfile/@full-path}"
out="${{tmp}}/${{filename}}/moveRessourceFiles.xml"
......
......@@ -29,6 +29,7 @@
<xsl:apply-templates select="h:img"/>
<xsl:apply-templates select="h:object"/>
<xsl:apply-templates select="h:audio"/>
<xsl:apply-templates select="h:video"/>
</xsl:template>
<xsl:template match="h:img">
......@@ -45,6 +46,11 @@
<xsl:variable name="src" select="@src"/>
<copy file="hdoc/{$src}" tofile="result/{$src}"/>
</xsl:template>
<xsl:template match="h:video">
<xsl:variable name="src" select="@src"/>
<copy file="hdoc/{$src}" tofile="result/{$src}"/>
</xsl:template>
</xsl:stylesheet>
......
......@@ -295,4 +295,10 @@
<sc:extBlock role="anim" sc:refUri="{$src}"/>
</xsl:template>
<!--Video-->
<xsl:template match="h:video">
<xsl:variable name="src" select="@src"/>
<sc:extBlock role="anim" sc:refUri="{$src}"/>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
# Converter lexique_to_opale
In order to use this converter, follow those steps :
0. Create an input and an output directory
1. Copy your Lexique file(s) (.scar or .zip) into the input directory.
2. Execute the run that correspond to your OS.
3. You will find the result into the output directory. The names of the output are linked to the hour it was processed.
......@@ -15,13 +15,22 @@
</classpath>
</taskdef>
<target name="rmOutputDir">
<if>
<available file="${OutputPath}" type="dir"/>
<then>
<delete dir="${OutputPath}"/>
</then>
</if>
</target>
<target name="init">
<target name="init" depends="rmOutputDir">
<mkdir dir="${outdir}"/>
<chmod perm="777" dir="${outdir}"></chmod>
<mkdir dir="${srcdir}"/>
<chmod perm="777" dir="${srcdir}"></chmod>
<mkdir dir="${OutputPath}"/>
<chmod perm="777" dir="${OutputPath}"></chmod>
</target>
<target name="unzipSource" depends="init">
......
# Converter lexique_to_optim
In order to use this converter, follow those steps :
0. Create an input and an output dir
1. Copy your Lexique file(s) (.scar or .zip) into the input directory.
2. Execute the run that correspond to your OS.
3. You will find the result into the output directory. The name of the output files depends of the hour it was processed.
......@@ -16,7 +16,16 @@
</classpath>
</taskdef>
<target name="init">
<target name="rmOutputDir">
<if>
<available file="${OutputPath}" type="dir"/>
<then>
<delete dir="${OutputPath}"/>
</then>
</if>
</target>
<target name="init" depends="rmOutputDir">
<mkdir dir="${outdir}"/>
<chmod perm="777" dir="${outdir}"></chmod>
<mkdir dir="${srcdir}"/>
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?><map version="0.8.1"><node CREATED="1450641851216" ID="2nngtspni6hi1484pfec44c8lk" MODIFIED="1450641851216" TEXT="MindMapping"><node CREATED="1450641851217" ID="00lp6bpfm6jibhcjrpdonrhoqb" MODIFIED="1450641851217" POSITION="right" TEXT="#1 MindMapping to Hdoc"><node CREATED="1450641851217" ID="3qm1jgu7dfgs328jthlek5fd4e" MODIFIED="1450641851217" TEXT="Prendre en main le projet existant"/><node CREATED="1450641851217" ID="0u38ectmhqqp4p08p5guvgij71" MODIFIED="1450641851217" TEXT="Corriger les bugs existants"/><node CREATED="1450641851217" ID="3b1t9o2te6enh59j4iv48f4mdi" MODIFIED="1450641851217" TEXT="Restructurer le ant"/></node><node CREATED="1450641851217" ID="6lohsep5crh5g3ngj8ld8loei6" MODIFIED="1450641851217" POSITION="right" TEXT="#2 MindMapping to Opale"><node CREATED="1450641851217" ID="5pl3210hq6if3nv7r2chtjstmo" MODIFIED="1450641851217" TEXT="Faire la connexion avec le transformateur Hdoc to Opale"/><node CREATED="1450641851217" ID="3haa2fgohe9j4n04ilddco84uh" MODIFIED="1450641851217" TEXT="Permettre la personnalisation de l'organisation du module"><node CREATED="1450641851217" ID="4ie264076qt3tnlu0pqpp1dh1p" MODIFIED="1450641851217" TEXT="A l'aide de hashtag"/><node CREATED="1450641851217" ID="23mafrh60fmdmkjsp1jdg6c58g" MODIFIED="1450641851217" TEXT="A l'aide d'attributs"/></node><node CREATED="1450641851217" ID="11k2hbkcu415e1mgk5c5ucr48k" MODIFIED="1450641851217" TEXT="Permettre la personnalisation dy type de noeud (Intro, conclusion etc.)"><node CREATED="1450641851217" ID="5pf0idbv9nln725d14rs1c1p0a" MODIFIED="1450641851217" TEXT="A l'aide d'attributs"/><node CREATED="1450641851217" ID="48799q1i5c6rns3smpa8vnekfb" MODIFIED="1450641851217" TEXT="A l'aide de hashtag"/></node><node CREATED="1450641851217" ID="4npf8jpvak3lffn9c1rsogi0sq" MODIFIED="1450641851217" TEXT="Permettre la personnalisation grâce aux couleurs/icônes"/></node><node CREATED="1450641851217" ID="3n8v43p8qb005puq3qiv7aiubc" MODIFIED="1450641851217" POSITION="right" TEXT="#3 MindMapping to Optim"><node CREATED="1450641851217" ID="2bn1la3apnjf1fi8qqfqde226t" MODIFIED="1450641851217" TEXT="Faire la connexion avec le transformateur Hdoc to Optim"/></node><node CREATED="1450641851217" ID="3s00si3hquol4pldg7lo9opjd6" MODIFIED="1450641851217" POSITION="right" TEXT="#4 MindMapping to Lexique"><node CREATED="1450641851217" ID="37jlfl25iuaoe6f2cpiv30qksd" MODIFIED="1450641851217" TEXT="Faire la connexion avec le transformateur Hdoc to Lexique"/></node><node CREATED="1450641851217" ID="27gnl6pgottjfiukpa3ulfdjrj" MODIFIED="1450641851217" POSITION="left" TEXT="#5 Prendre d'autres outils de carte mentales en entrée"/><node CREATED="1450641851217" ID="24d41nnnnvvu7fv5m8m4vegu0g" MODIFIED="1450641851217" POSITION="left" TEXT="#intro This converter aims at convert a given MindMapping file into a Hdoc file which then will be imported in Opale (advanced only)."/><node CREATED="1450641851217" ID="6a7pr2b5vvmq6na5964dhf9e13" MODIFIED="1450641851217" POSITION="left" TEXT="#conclu DONE : MindMapping to Hdoc, MindMapping to Opale TODO : MindMapping to Optim, MindMapping to Lexique"/></node></map>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="default">
<property name="in" location="${basedir}/input"/>
<property name="out" value="${basedir}/result"/>
<property name="out" value="${basedir}/output"/>
<property name="module" value="default"/>
<property name="resultFile" value="${basedir}/result"/>
<property name="resultFile" value="${basedir}/output"/>
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="${basedir}/lib/ant-contrib.jar"/>
......@@ -28,8 +28,8 @@
<echo>Setting up the conversion</echo>
<delete dir="${basedir}/temp"/>
<mkdir dir="${basedir}/temp"/>
<delete dir="${basedir}/result"/>
<mkdir dir="${basedir}/result"/>
<delete dir="${basedir}/output"/>
<mkdir dir="${basedir}/output"/>
<echo>--- End ----</echo>
</target>
......
<map version="0.9.0">
<!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net -->
<node CREATED="1418378469636" ID="ID_1761352614" MODIFIED="1418378846033" TEXT="Compte rendu reunion">
<node CREATED="1418378601388" ID="ID_316552916" MODIFIED="1418378852113" POSITION="left" TEXT="Avanc&#xe9; du travail">
<node CREATED="1418378754221" ID="ID_378495707" MODIFIED="1418378796204" TEXT="Am&#xe9;lioration du rendement"/>
<node CREATED="1418378777668" ID="ID_1029064924" MODIFIED="1418378790435" TEXT="Cr&#xe9;ation d&apos;un nouveau systeme de paiement"/>
</node>
<node CREATED="1418378647414" ID="ID_58016685" MODIFIED="1418378674936" POSITION="left" TEXT="R&#xe9;sultat courrant">
<node CREATED="1418378826291" ID="ID_1497466150" MODIFIED="1418378837905" TEXT="70% du travail fait"/>
</node>
<node CREATED="1418378677920" ID="ID_92198961" MODIFIED="1418378859207" POSITION="left" TEXT="Rappel du travail &#xe0; realiser">
<node CREATED="1418378863191" ID="ID_1997168106" MODIFIED="1418378890823" TEXT="Changement du process de relation client">
<node CREATED="1418378925585" ID="ID_1529753947" MODIFIED="1418378933336" TEXT="Formation"/>
<node CREATED="1418378953204" ID="ID_1194109046" MODIFIED="1418378981259" TEXT="Sondage client&#xe8;le"/>
</node>
<node CREATED="1418378895031" ID="ID_412980386" MODIFIED="1418378920965" TEXT="Trouver de nouveaux client d&apos;ici la fin de l&apos;ann&#xe9;e"/>
</node>
</node>
</map>
......@@ -19,7 +19,7 @@ Use a terminal and go to the root of the folder (mindmapping_to_opale).
- On Linux : sh run.sh -DinputPath input/<yourFilename>
- On Windows : run.bat -DinputPath input/<yourFilename>
You will find the result in the folder mindmapping_to_opale/result
You will find the result in the folder mindmapping_to_opale/output
IMPORTANT
......
decompressedHdoc
decompressedOpale
*.scar
*.zip
Bachimont
generateContentPath.xml
moveRessourceFiles.xml
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:h="http://www.utc.fr/ics/hdoc/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"
xmlns:op="utc.fr:ics/opale3"
xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive"
>
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
<xsl:template name="string-to-lowercase">
<xsl:param name="lcletters">abcdefghijklmnopqrstuvwxyzeeeeaaaa</xsl:param>
<xsl:param name="ucletters">ABCDEFGHIJKLMNOPQRSTUVWXYZéèêëàâàá</xsl:param>
<xsl:param name="text"/>
<xsl:value-of select="translate($text,$ucletters,$lcletters)"/>
</xsl:template>
<xsl:template name="string-to-slug">
<xsl:param name="text" select="''" />
<xsl:variable name="dodgyChars" select="' ,.#_-!?*:;=+&#10;/(){}'" />
<xsl:variable name="replacementChar" select="'------------------'" />
<xsl:variable name="oneline">
<xsl:value-of select="normalize-space(translate($text,'&#10;',''))"/>
</xsl:variable>
<xsl:variable name="lowercased"><xsl:call-template name="string-to-lowercase"><xsl:with-param name="text" select="$oneline" /></xsl:call-template></xsl:variable>
<xsl:variable name="escaped"><xsl:value-of select="translate( $lowercased, $dodgyChars, $replacementChar )" /></xsl:variable>
<xsl:variable name="cleaned">
<xsl:call-template name="string-replace-caller">
<xsl:with-param name="text" select="$escaped" />
<xsl:with-param name="replace" select="'---'" />
<xsl:with-param name="by" select="'-'" />
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="$cleaned" />
</xsl:template>
<xsl:template name="string-replace-all">
<xsl:param name="text"/>
<xsl:param name="replace"/>
<xsl:param name="by"/>
<xsl:choose>
<xsl:when test="contains($text,$replace)">
<xsl:value-of select="substring-before($text,$replace)"/>
<xsl:value-of select="$by"/>
<xsl:call-template name="string-replace-all">
<xsl:with-param name="text" select="substring-after($text,$replace)"/>
<xsl:with-param name="replace" select="$replace"/>
<xsl:with-param name="by" select="$by"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$text"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="string-replace-caller">
<xsl:param name="text"/>
<xsl:param name="replace"/>
<xsl:param name="by"/>
<xsl:variable name="changed">
<xsl:choose>
<xsl:when test="contains($text,$replace)">
<xsl:call-template name="string-replace-all">
<xsl:with-param name="text" select="$text"/>
<xsl:with-param name="replace" select="$replace"/>
<xsl:with-param name="by" select="$by"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$text"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:choose>
<xsl:when test="contains($changed,$replace)">
<xsl:call-template name="string-replace-caller">
<xsl:with-param name="text" select="$changed"/>
<xsl:with-param name="replace" select="$replace"/>
<xsl:with-param name="by" select="$by"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$changed"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="sp:courseUc">
<sp:courseUc>
<xsl:variable name="slug">
<xsl:call-template name="string-to-slug">
<xsl:with-param name="text" select="op:expUc/op:uM/sp:title"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="id">
<xsl:value-of select="count(preceding::sp:courseUc)+1"/>
<xsl:text>-</xsl:text>
<xsl:value-of select="$slug"/>
</xsl:variable>
<xsl:attribute name="data-export-id">
<xsl:text>uoc-</xsl:text>
<xsl:value-of select="$id" />
</xsl:attribute>
<xsl:attribute name="data-export-file">unit-<xsl:value-of select="$id"/>.xml</xsl:attribute>
<xsl:apply-templates select="@*|node()" />
</sp:courseUc>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:h="http://www.utc.fr/ics/hdoc/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"
xmlns:op="utc.fr:ics/opale3"
xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive"
>
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
<xsl:template match="sp:courseUc">
<sp:courseUc>
<xsl:attribute name="sc:refUri">
<xsl:value-of select="@data-export-file" />
</xsl:attribute>
</sp:courseUc>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:h="http://www.utc.fr/ics/hdoc/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"
xmlns:op="utc.fr:ics/opale3"
xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive"
>
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<!-- The ID of the courseUc element that needs to be copied has to be passed here -->
<xsl:param name="elementid" xsl:required="yes" xsl:as="xsl:string"/>
<xsl:template match="sc:item">
<xsl:apply-templates select=".//sp:courseUc"/>
</xsl:template>
<xsl:template match="sp:courseUc[@data-export-id = $elementid]">
<sc:item>
<!-- Once we are in the right courseUc, we can just copy everything -->
<xsl:copy-of select="./*"/>
</sc:item>
</xsl:template>
<xsl:template match="*"/>
</xsl:stylesheet>
\ No newline at end of file
tmpdir=tmp
OutputPathDivided=divided.scar
OutputPath=out.scar
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project name="hdoc_to_opale" basedir="." default="convert">
<property file="global.properties"/>
<taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask">
<classpath>
<pathelement location="lib/jing.jar"/>
</classpath>
</taskdef>
<target name="convert">
<!-- This is the main target : it is called whether by the project (as the default target) or by the user/converter
website, if specified in the command line. Basically, this target consists in several targets/ant buildfiles calls. -->
<antcall target="CleanDirectory"/>
<mkdir dir="${tmpdir}"/>
<antcall target="UnzipHdocFile"/>
<antcall target="validateInput" />
<antcall target="FindContentFiles"/>
<ant antfile="${tmpdir}/generateContentPath.xml"/>
<antcall target="ValidateOutput"/>
<antcall target="DivideOutput"/>
<antcall target="ZipOutput"/>
<antcall target="ZipDividedOutput"/>
<antcall target="CleanDirectory"/>
</target>
<target name="CleanDirectory">
<delete dir="${tmpdir}"/>
</target>
<target name="UnzipHdocFile">
<!-- Unzip the input hdoc file. Decompressed folder is named "decompressedHdoc" : this name is the only one which
refers to the hdoc file furthermore in this project. -->
<unzip src="${InputPath}" dest="${tmpdir}/decompressedHdoc"/>
<chmod dir="${tmpdir}/decompressedHdoc" perm="777"/>
</target>
<target name="FindContentFiles">
<!-- Finds the absolute path of container.xml and applies transformation0.xsl on it.-->
<first id="first">
<fileset
dir="${tmpdir}/decompressedHdoc/META-INF"
includes="**/container.xml"
/>
</first>
<xslt
in="${toString:first}"
out="${tmpdir}/generateContentPath.xml"
style="transformation0.xsl"
processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison"
/>
<chmod file="${tmpdir}/generateContentPath.xml" perm="777"/>
</target>
<target name="ZipOutput">
<copy file=".wspmeta" todir="${tmpdir}/decompressedOpale"/>
<mkdir dir="${tmpdir}/decompressedOpale/res"/>
<ant antfile="${tmpdir}/moveRessourceFiles.xml"/>
<zip basedir="${tmpdir}/decompressedOpale" destfile="${OutputPath}" encoding="UTF-8"/>
</target>
<target name="ZipDividedOutput">
<copy file=".wspmeta" todir="${tmpdir}/decompressedOpaleDivided"/>
<copy todir="${tmpdir}/decompressedOpaleDivided/res" >
<fileset dir="${tmpdir}/decompressedOpale/res" includes="**"/>
</copy>
<zip basedir="${tmpdir}/decompressedOpaleDivided" destfile="${OutputPathDivided}" encoding="UTF-8"/>
</target>
<!-- Validating the XML container file -->
<target name="validateInput">
<jing file="${tmpdir}/decompressedHdoc/META-INF/container.xml" rngfile="schema/hdoc1-container.rng"></jing>
</target>
<!-- Validating the XML output -->
<target name="ValidateOutput">
<jing file="${tmpdir}/decompressedOpale/main.xml" rngfile="schema/op_ue.rng"></jing>
</target>
<target name="DivideOutput">
<mkdir dir="${tmpdir}/decompressedOpaleDivided"/>
<!-- Adding IDS to the general output file -->
<xslt
in="${tmpdir}/decompressedOpale/main.xml"
out="${tmpdir}/outputWithCourseUcIds.xml"
style="addCourseUcIds.xsl"
processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison"
/>
<!-- Generating the root file (with refs to other files) -->
<xslt
in="${tmpdir}/outputWithCourseUcIds.xml"
out="${tmpdir}/decompressedOpaleDivided/main.xml"
style="addCourseUcReferences.xsl"
processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison"
/>
<!-- Generating the ANT file that will copy the files -->
<xslt
in="${tmpdir}/outputWithCourseUcIds.xml"
out="${tmpdir}/exportUnits.ant"
style="prepareCourseUcCopies.xsl"
processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison"
/>
<!-- Executing that ANT file -->
<ant antfile="${tmpdir}/exportUnits.ant"/>
</target>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:h="http://www.utc.fr/ics/hdoc/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
>
<property file="global.properties"/>
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<!-- This template matches the root and create a ANT project, the root of any ANT buildfile. -->
<xsl:template match="h:html">
<project name="moveRessourceFiles" basedir="." default="moveRessourceFiles">
<target name="moveRessourceFiles">
<xsl:apply-templates select="./*"/>
</target>
</project>
</xsl:template>
<!-- These templates guides XSL's motor. -->
<xsl:template match="h:body">
<xsl:apply-templates select="./h:section"/>
</xsl:template>
<xsl:template match="h:section">
<xsl:apply-templates select="./h:section | ./h:div"/>
</xsl:template>
<xsl:template match="h:div">
<xsl:apply-templates select="./h:img | ./h:audio | ./h:video | ./h:object"/>
</xsl:template>
<!-- Targeted markups. -->
<xsl:template match="h:img">
<copy tofile="${{tmpdir}}/decompressedOpale/res/{./@src}" file="${{tmpdir}}/decompressedHdoc/{./@src}"/>
</xsl:template>
<xsl:template match="h:audio">
<copy tofile="${{tmpdir}}/decompressedOpale/res/{./@src}" file="${{tmpdir}}/decompressedHdoc/{./@src}"/>
</xsl:template>
<xsl:template match="h:video">
<copy tofile="${{tmpdir}}/decompressedOpale/res/{./@src}" file="${{tmpdir}}/decompressedHdoc/{./@src}"/>
</xsl:template>
<xsl:template match="h:object">
<copy tofile="${{tmpdir}}/decompressedOpale/res/{./@data}" file="${{tmpdir}}/decompressedHdoc/{./@data}"/>
</xsl:template>
<!-- These markups are matched in order to minimize "apply-templates" side-effects (i.e. their contents are not relevant for this transformation). -->
<xsl:template match="h:head"/>
<xsl:template match="h:p"/>
<xsl:template match="h:em"/>
<xsl:template match="h:i"/>
<xsl:template match="h:span"/>
<xsl:template match="h:a"/>
<xsl:template match="h:ul"/>
<xsl:template match="h:ol"/>
<xsl:template match="h:li"/>
<xsl:template match="h:table"/>
</xsl:stylesheet>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:h="http://www.utc.fr/ics/hdoc/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"
xmlns:op="utc.fr:ics/opale3"
xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive"
>
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<xsl:template match="sc:item">
<project name="copy-ucs" default="main">
<taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask">
<classpath>
<pathelement location="lib/jing.jar"/>
</classpath>
</taskdef>