Commit fbcfca0a authored by Ivan D'halluin's avatar Ivan D'halluin
Browse files

Merge branch 'master' of gitlab.utc.fr:crozatst/hdoc

parents 504a266b 723f3aeb
<?xml version="1.0" encoding="UTF-8" ?>
<wspType defaultCode="OptimOffice" title="OptimOffice 1.2 (fr-FR)" description="" uri="OptimOffice1-2_fr-FR_006" key="OptimOffice1-2" lang="fr-FR" version="1.2.006"><wspUpdate localAutoUpdate="minor"><res key="OptimOffice1-2.wsp"/></wspUpdate><systemSpace space="~param/OptimOffice1-2/ss"><res key="OptimOffice1-2.ss"/></systemSpace><systemSpace space="~param/OptimOffice1-2/bs" optional="true"><res key="OptimOffice1-2.bs"/></systemSpace><systemSpace space="~param/OptimOffice1-2/gen/paperRpt"><res key="OptimOffice1-2.gen.paperRpt"/></systemSpace><systemSpace space="~param/OptimOffice1-2/gen/paperLight"><res key="OptimOffice1-2.gen.paperLight"/></systemSpace><systemSpace space="~param/OptimOffice1-2/gen/sldHtml"><res key="OptimOffice1-2.gen.sldHtml"/></systemSpace><systemSpace space="~param/OptimOffice1-2/gen/site"><res key="OptimOffice1-2.gen.site"/></systemSpace><systemSpace space="~param/OptimOffice1-2/gen/sldRptR"><res key="OptimOffice1-2.gen.sldRptR"/></systemSpace><systemSpace space="~param/OptimOffice1-2/gen/sldRptS"><res key="OptimOffice1-2.gen.sldRptS"/></systemSpace><systemSpace space="~param/OptimOffice1-2/gen/preSite"><res key="OptimOffice1-2.gen.preSite"/></systemSpace><systemSpace space="~param/OptimOffice1-2/gen/control"><res key="OptimOffice1-2.gen.control"/></systemSpace><systemSpace space="~param/OptimOffice1-2/gen/preSldHtml"><res key="OptimOffice1-2.gen.preSldHtml"/></systemSpace><systemSpace space="~param/OptimOffice1-2/gen/ftp"><res key="OptimOffice1-2.gen.ftp"/></systemSpace><ssOverlay ssUri="/~param/OptimOffice1-2/ss/of_paper.ss.xml"><ssFragment xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"><module type="eu.scenari.wsp.module.gen.ModuleGenLoader" code="gen_site"><skin owner="OptimOffice1-2" title="Habillage Classique" code="default" sc:refUri="/~param/OptimOffice1-2/gen/site/skin/default.doss"/></module></ssFragment></ssOverlay><ssOverlay ssUri="/~param/OptimOffice1-2/ss/of_slideshow.ss.xml"><ssFragment xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"><module type="eu.scenari.wsp.module.gen.ModuleGenLoader" code="gen_site"><skin owner="OptimOffice1-2" title="Habillage Classique" code="default" sc:refUri="/~param/OptimOffice1-2/gen/site/skin/default.doss"/></module></ssFragment></ssOverlay><ssOverlay ssUri="/~param/OptimOffice1-2/ss/of_webSite.ss.xml"><ssFragment xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"><module type="eu.scenari.wsp.module.gen.ModuleGenLoader" code="gen_site"><skin owner="OptimOffice1-2" title="Habillage Classique" code="default" sc:refUri="/~param/OptimOffice1-2/gen/site/skin/default.doss"/></module></ssFragment></ssOverlay><ssOverlay ssUri="/~param/OptimOffice1-2/ss/of_section.ss.xml"><ssFragment xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"><module type="eu.scenari.wsp.module.gen.ModuleGenLoader" code="gen_site"><skin owner="OptimOffice1-2" title="Habillage Classique" code="default" sc:refUri="/~param/OptimOffice1-2/gen/site/skin/default.doss"/></module></ssFragment></ssOverlay><ssOverlay ssUri="/~param/OptimOffice1-2/ss/of_paper.ss.xml"><ssFragment xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"><module type="eu.scenari.wsp.module.gen.ModuleGenLoader" code="gen_sldHtml"><skin owner="OptimOffice1-2" title="Habillage Classique" code="default" sc:refUri="/~param/OptimOffice1-2/gen/sldHtml/skin/default.doss"/></module></ssFragment></ssOverlay><ssOverlay ssUri="/~param/OptimOffice1-2/ss/of_slideshow.ss.xml"><ssFragment xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"><module type="eu.scenari.wsp.module.gen.ModuleGenLoader" code="gen_sldHtml"><skin owner="OptimOffice1-2" title="Habillage Classique" code="default" sc:refUri="/~param/OptimOffice1-2/gen/sldHtml/skin/default.doss"/></module></ssFragment></ssOverlay><ssOverlay ssUri="/~param/OptimOffice1-2/ss/of_webSite.ss.xml"><ssFragment xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"><module type="eu.scenari.wsp.module.gen.ModuleGenLoader" code="gen_sldHtml"><skin owner="OptimOffice1-2" title="Habillage Classique" code="default" sc:refUri="/~param/OptimOffice1-2/gen/sldHtml/skin/default.doss"/></module></ssFragment></ssOverlay><ssOverlay ssUri="/~param/OptimOffice1-2/ss/of_section.ss.xml"><ssFragment xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"><module type="eu.scenari.wsp.module.gen.ModuleGenLoader" code="gen_sldHtml"><skin owner="OptimOffice1-2" title="Habillage Classique" code="default" sc:refUri="/~param/OptimOffice1-2/gen/sldHtml/skin/default.doss"/></module></ssFragment></ssOverlay><ssOverlay ssUri="/~param/OptimOffice1-2/ss/of_paper.ss.xml"><ssFragment xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"><module type="eu.scenari.wsp.module.gen.ModuleGenLoader" code="gen_paperRpt"><skin owner="OptimOffice1-2" title="Habillage Classique" code="default" sc:refUri="/~param/OptimOffice1-2/gen/paperRpt/skin/default.doss/skin.odt"/></module></ssFragment></ssOverlay><ssOverlay ssUri="/~param/OptimOffice1-2/ss/of_webSite.ss.xml"><ssFragment xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"><module type="eu.scenari.wsp.module.gen.ModuleGenLoader" code="gen_paperRpt"><skin owner="OptimOffice1-2" title="Habillage Classique" code="default" sc:refUri="/~param/OptimOffice1-2/gen/paperRpt/skin/default.doss/skin.odt"/></module></ssFragment></ssOverlay><ssOverlay ssUri="/~param/OptimOffice1-2/ss/of_section.ss.xml"><ssFragment xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"><module type="eu.scenari.wsp.module.gen.ModuleGenLoader" code="gen_paperRpt"><skin owner="OptimOffice1-2" title="Habillage Classique" code="default" sc:refUri="/~param/OptimOffice1-2/gen/paperRpt/skin/default.doss/skin.odt"/></module></ssFragment></ssOverlay><ssOverlay ssUri="/~param/OptimOffice1-2/ss/of_paper.ss.xml"><ssFragment xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"><module type="eu.scenari.wsp.module.gen.ModuleGenLoader" code="gen_paperLight"><skin owner="OptimOffice1-2" title="Habillage Classique" code="default" sc:refUri="/~param/OptimOffice1-2/gen/paperLight/skin/default.doss/skin.odt"/></module></ssFragment></ssOverlay><ssOverlay ssUri="/~param/OptimOffice1-2/ss/of_webSite.ss.xml"><ssFragment xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"><module type="eu.scenari.wsp.module.gen.ModuleGenLoader" code="gen_paperLight"><skin owner="OptimOffice1-2" title="Habillage Classique" code="default" sc:refUri="/~param/OptimOffice1-2/gen/paperLight/skin/default.doss/skin.odt"/></module></ssFragment></ssOverlay><ssOverlay ssUri="/~param/OptimOffice1-2/ss/of_section.ss.xml"><ssFragment xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"><module type="eu.scenari.wsp.module.gen.ModuleGenLoader" code="gen_paperLight"><skin owner="OptimOffice1-2" title="Habillage Classique" code="default" sc:refUri="/~param/OptimOffice1-2/gen/paperLight/skin/default.doss/skin.odt"/></module></ssFragment></ssOverlay><ssOverlay ssUri="/~param/OptimOffice1-2/ss/of_slideshow.ss.xml"><ssFragment xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"><module type="eu.scenari.wsp.module.gen.ModuleGenLoader" code="gen_sldRptR"><skin owner="OptimOffice1-2" title="Habillage Classique" code="default" sc:refUri="/~param/OptimOffice1-2/gen/sldRptR/skin/default.doss/skin.odt"/></module></ssFragment></ssOverlay><ssOverlay ssUri="/~param/OptimOffice1-2/ss/of_slideshow.ss.xml"><ssFragment xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"><module type="eu.scenari.wsp.module.gen.ModuleGenLoader" code="gen_sldRptS"><skin owner="OptimOffice1-2" title="Habillage Classique" code="default" sc:refUri="/~param/OptimOffice1-2/gen/sldRptS/skin/default.doss/skin.odt"/></module></ssFragment></ssOverlay><ssOverlay ssUri="/~param/OptimOffice1-2/ss/of_paper.ss.xml"><ssFragment xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"><module type="eu.scenari.wsp.module.gen.ModuleGenLoader" code="gen_preSite"><skin owner="OptimOffice1-2" title="Habillage Classique" code="default" sc:refUri="/~param/OptimOffice1-2/gen/preSite/skin/default.doss"/></module></ssFragment></ssOverlay><ssOverlay ssUri="/~param/OptimOffice1-2/ss/of_webSite.ss.xml"><ssFragment xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"><module type="eu.scenari.wsp.module.gen.ModuleGenLoader" code="gen_preSite"><skin owner="OptimOffice1-2" title="Habillage Classique" code="default" sc:refUri="/~param/OptimOffice1-2/gen/preSite/skin/default.doss"/></module></ssFragment></ssOverlay><ssOverlay ssUri="/~param/OptimOffice1-2/ss/of_page.ss.xml"><ssFragment xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"><module type="eu.scenari.wsp.module.gen.ModuleGenLoader" code="gen_preSite"><skin owner="OptimOffice1-2" title="Habillage Classique" code="default" sc:refUri="/~param/OptimOffice1-2/gen/preSite/skin/default.doss"/></module></ssFragment></ssOverlay><ssOverlay ssUri="/~param/OptimOffice1-2/ss/of_folder.ss.xml"><ssFragment xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"><module type="eu.scenari.wsp.module.gen.ModuleGenLoader" code="gen_preSite"><skin owner="OptimOffice1-2" title="Habillage Classique" code="default" sc:refUri="/~param/OptimOffice1-2/gen/preSite/skin/default.doss"/></module></ssFragment></ssOverlay><ssOverlay ssUri="/~param/OptimOffice1-2/ss/of_section.ss.xml"><ssFragment xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"><module type="eu.scenari.wsp.module.gen.ModuleGenLoader" code="gen_preSite"><skin owner="OptimOffice1-2" title="Habillage Classique" code="default" sc:refUri="/~param/OptimOffice1-2/gen/preSite/skin/default.doss"/></module></ssFragment></ssOverlay><ssOverlay ssUri="/~param/OptimOffice1-2/ss/of_slideshow.ss.xml"><ssFragment xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"><module type="eu.scenari.wsp.module.gen.ModuleGenLoader" code="gen_preSldHtml"><skin owner="OptimOffice1-2" title="Habillage Classique" code="default" sc:refUri="/~param/OptimOffice1-2/gen/preSldHtml/skin/default.doss"/></module></ssFragment></ssOverlay><editionSheet pack="OptimOffice1-2_fr-FR_006" brickSelector="{OptimOffice1-2.moz;1.2.006;fr-FR}"/></wspType>
\ No newline at end of file
@echo off
set lib=lib
set ant=myantce.ant
set antparam=-Dprogram.param=%1
set scJarList=%lib%\*
java.exe -classpath "%scJarList%" -Xmx150m org.apache.tools.ant.Main -buildfile %ant% %antparam%
pause
REM start /MIN java.exe -classpath "%scJarList%" -Xmx150m org.apache.tools.ant.Main -buildfile %ant% %antparam%
#!/bin/sh
lib="lib"
ant="myantce.ant"
antparam="-Dprogram.param=$1"
#Recherche de java et controle que se soit une version SUN
vJavaCmd="java"
xCheckJava () {
vInputVarName=\$"$1"
vInputVarVal=`eval "expr \"$vInputVarName\" "`
if [ -z "$vInputVarVal" ];then
eval "$1=false"
return
fi
vSunJavaFound=`$vInputVarVal -version 2>&1 | grep -Eo -m 1 "(HotSpot)|(OpenJDK)"`
if [ "$vSunJavaFound" != "HotSpot" ] && [ "$vSunJavaFound" != "OpenJDK" ] ; then
eval "$1=false"
return
fi
}
xCheckJava vJavaCmd
if [ "$vJavaCmd" = "false" ]; then
vJavaCmd="$JAVA_HOME/bin/java"
xCheckJava vJavaCmd
if [ "$vJavaCmd" = "false" ]; then
echo "ERREUR: JRE de SUN introuvable. Veuillez déclarer la variable d'environnement JAVA_HOME."
exit 1
fi
fi
#Lancer la commande
scJarList="$lib/*"
$vJavaCmd -classpath "$scJarList:" -Xmx150m org.apache.tools.ant.Main -buildfile $ant $antparam
<?xml version="1.0" encoding="UTF-8"?>
<!--find_content.xsl creates a ANT file get_content-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
xmlns:h="urn:utc.fr:ics:hdoc:container"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xsl:param name="destfile" required="yes" as="xs:string"/>
<xsl:output method="xml" indent="yes"/>
<xsl:template match="h:container">
<project name="hdoc_to_optim" default="main">
<target name="main">
<mkdir dir="result"/>
<chmod dir="result" perm="777"/>
<copy file=".wspmeta" todir="result"/>
<xsl:apply-templates/>
</target>
</project>
</xsl:template>
<xsl:template match="h:rootfiles">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="h:rootfile">
<xsl:variable name="path" select="@full-path"/>
<!--the ANT runs the XSLT get_ressources then the ANT created by it-->
<xslt in="hdoc/{$path}" out="get_ressources.ant" style="find_ressources.xsl"/>
<chmod file="get_ressources.ant" perm="777"/>
<ant antfile="get_ressources.ant"/>
<!--the ANT runs the main XSLT transfo-->
<xslt in="hdoc/{$path}" out="result/content.paper" style="transfo.xsl"/>
</xsl:template>
</xsl:stylesheet>
<!--find_ressources.xsl creates a ANT file get_ressources-->
<!--the ANT copies all audio files, images and objects used in the content to convert-->
<xsl:stylesheet
version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:h="http://www.utc.fr/ics/hdoc/xhtml"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="h:html">
<project name="hdoc_to_optim" default="main">
<target name="main">
<xsl:apply-templates select="h:body"/>
</target>
</project>
</xsl:template>
<xsl:template match="h:body">
<xsl:apply-templates select="h:section"/>
</xsl:template>
<xsl:template match="h:section">
<xsl:apply-templates select="h:div"/>
<xsl:apply-templates select="h:section"/>
</xsl:template>
<xsl:template match="h:div">
<xsl:apply-templates select="h:section"/>
<xsl:apply-templates select="h:img"/>
<xsl:apply-templates select="h:object"/>
<xsl:apply-templates select="h:audio"/>
</xsl:template>
<xsl:template match="h:img">
<xsl:variable name="src" select="@src"/>
<copy file="hdoc/{$src}" tofile="result/{$src}"/>
</xsl:template>
<xsl:template match="h:object">
<xsl:variable name="data" select="@data"/>
<copy file="hdoc/{$data}" tofile="result/{$data}"/>
</xsl:template>
<xsl:template match="h:audio">
<xsl:variable name="src" select="@src"/>
<copy file="hdoc/{$src}" tofile="result/{$src}"/>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"
xmlns:of="scpf.org:office"
xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive"
xmlns:h="http://www.utc.fr/ics/hdoc/xhtml">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="h:html">
<sc:item xmlns:sc="http://www.utc.fr/ics/scenari/v3/core">
<of:paper xmlns:of="scpf.org:office" xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive" xmlns:sc="http://www.utc.fr/ics/scenari/v3/core">
<xsl:apply-templates/>
</of:paper>
</sc:item>
</xsl:template>
<!--Metadata of the head tag-->
<xsl:template match="h:head">
<of:paperM>
<xsl:apply-templates select="h:title"/>
<sp:commonMeta>
<of:commonM>
<!--in optim there is only one tag for author and rights, we must concatenate them-->
<xsl:if test="h:meta[@name='author'] or h:meta[@name='rights']">
<sp:copyright>
<xsl:value-of select="h:meta[@name='author']/@content"/>
<xsl:if test="h:meta[@name='author'] and h:meta[@name='rights']"> - </xsl:if>
<xsl:value-of select="h:meta[@name='rights']/@content"/>
</sp:copyright>
</xsl:if>
<xsl:if test="h:meta[@name='date']">
<sp:version>
<xsl:value-of select="h:meta[@name='date']/@content"/>
</sp:version>
</xsl:if>
</of:commonM>
</sp:commonMeta>
</of:paperM>
<!--in optim there is no tag for description and keywords, they are added in a preliminary part-->
<xsl:if test="h:meta[@name='description'] or h:meta[@name='keywords']">
<sp:pre>
<of:section>
<of:sectionM>
<sp:title>Metadata</sp:title>
</of:sectionM>
<sp:content>
<of:fragment>
<xsl:apply-templates select="h:meta[@name='description']"/>
<xsl:apply-templates select="h:meta[@name='keywords']"/>
</of:fragment>
</sp:content>
</of:section>
</sp:pre>
</xsl:if>
</xsl:template>
<xsl:template match="h:meta[@name='description'] | h:meta[@name='keywords']">
<sp:info>
<of:block>
<of:blockM>
<sp:title>
<xsl:if test="@name='description'">Description</xsl:if>
<xsl:if test="@name='keywords'">Keywords</xsl:if>
</sp:title>
</of:blockM>
<sp:co>
<of:flow>
<sp:txt>
<of:txt>
<sc:para xml:space="preserve">
<xsl:value-of select="@content"/>
</sc:para>
</of:txt>
</sp:txt>
</of:flow>
</sp:co>
</of:block>
</sp:info>
</xsl:template>
<xsl:template match="h:title | h:h1 | h:h6">
<sp:title><xsl:value-of select="."/></sp:title>
</xsl:template>
<xsl:template match="h:body">
<xsl:apply-templates/>
</xsl:template>
<!--hdoc sections can become chapters or sections in Optim, we must differentiate the two-->
<xsl:template match="h:body/h:section">
<sp:chap>
<xsl:call-template name="sec-body"/>
</sp:chap>
</xsl:template>
<xsl:template match="h:section">
<sp:sec>
<xsl:call-template name="sec-body"/>
</sp:sec>
</xsl:template>
<xsl:template name="sec-body">
<of:section>
<xsl:if test="@data-hdoc-type='introduction'">
<xsl:comment>Introduction</xsl:comment>
</xsl:if>
<xsl:if test="@data-hdoc-type='conclusion'">
<xsl:comment>Conclusion</xsl:comment>
</xsl:if>
<xsl:apply-templates select="h:header"/>
<xsl:if test="./h:div">
<sp:content>
<of:fragment>
<xsl:apply-templates select="h:div"/>
</of:fragment>
</sp:content>
</xsl:if>
<xsl:apply-templates select="h:section"/>
</of:section>
<xsl:apply-templates select="h:footer"/>
</xsl:template>
<xsl:template match="h:header">
<of:sectionM>
<xsl:apply-templates/>
</of:sectionM>
</xsl:template>
<xsl:template match="h:footer">
<xsl:apply-templates/>
</xsl:template>
<!--there are no tags for metadata in Optim sections, so we add this information in the comments-->
<xsl:template match="h:div[@data-hdoc-type]">
<xsl:comment>
<xsl:if test="@data-hdoc-type='author'">Author : <xsl:value-of select="."/></xsl:if>
<xsl:if test="@data-hdoc-type='date'">Date : <xsl:value-of select="."/></xsl:if>
<xsl:if test="@data-hdoc-type='rights'">Rights : <xsl:value-of select="."/></xsl:if>
<xsl:if test="@data-hdoc-type='tags'">Tags : <xsl:for-each select="h:span"><xsl:value-of select="."/>, </xsl:for-each></xsl:if>
<xsl:if test="@data-hdoc-type='categories'">Categories : <xsl:for-each select="h:span"><xsl:value-of select="."/>, </xsl:for-each></xsl:if>
</xsl:comment>
</xsl:template>
<xsl:template match="h:div">
<sp:info>
<xsl:call-template name="div-body"/>
</sp:info>
</xsl:template>
<xsl:template match="h:div[@data-hdoc-type='emphasis'] | h:div[@data-hdoc-type='definition'] | h:div[@data-hdoc-type='warning']">
<sp:emphasis>
<xsl:if test="@data-hdoc-type='definition'">
<xsl:comment>Definition</xsl:comment>
</xsl:if>
<xsl:if test="@data-hdoc-type='warning'">
<xsl:comment>Warning</xsl:comment>
</xsl:if>
<xsl:if test="@data-hdoc-type='date'">Date : <xsl:value-of select="."/></xsl:if>
<xsl:call-template name="div-body"/>
</sp:emphasis>
</xsl:template>
<xsl:template match="h:div[@data-hdoc-type='complement'] | h:div[@data-hdoc-type='example'] | h:div[@data-hdoc-type='remark'] | h:div[@data-hdoc-type='advice']">
<sp:extra>
<xsl:if test="@data-hdoc-type='example'">
<xsl:comment>Example</xsl:comment>
</xsl:if>
<xsl:if test="@data-hdoc-type='remark'">
<xsl:comment>Remark</xsl:comment>
</xsl:if>
<xsl:if test="@data-hdoc-type='advice'">
<xsl:comment>Advice</xsl:comment>
</xsl:if>
<xsl:call-template name="div-body"/>
</sp:extra>
</xsl:template>
<xsl:template name="div-body">
<of:block>
<of:blockM>
<xsl:apply-templates select="h:h6"/>
</of:blockM>
<sp:co>
<of:flow>
<sp:txt>
<of:txt>
<xsl:apply-templates select="*[not(self::h:h6)]"/>
</of:txt>
</sp:txt>
</of:flow>
</sp:co>
</of:block>
</xsl:template>
<xsl:template match="h:span">
<xsl:apply-templates/>
</xsl:template>
<!--Text-->
<!--paragraph-->
<xsl:template match="h:p">
<sc:para xml:space="preserve">
<xsl:apply-templates/>
</sc:para>
</xsl:template>
<!--list-->
<xsl:template match="h:ul">
<sc:itemizedList>
<xsl:apply-templates/>
</sc:itemizedList>
</xsl:template>
<xsl:template match="h:ol">
<sc:orderedList>
<xsl:apply-templates/>
</sc:orderedList>
</xsl:template>
<xsl:template match="h:li">
<sc:listItem>
<xsl:apply-templates/>
</sc:listItem>
</xsl:template>
<!--url-->
<xsl:template match="h:a">
<sc:uLink role="url" url="{@href}">
<xsl:apply-templates/>
</sc:uLink>
</xsl:template>
<xsl:template match="h:em">
<sc:inlineStyle role="emphasis">
<xsl:apply-templates/>
</sc:inlineStyle>
</xsl:template>
<xsl:template match="h:i">
<sc:phrase role="special">
<xsl:apply-templates/>
</sc:phrase>
</xsl:template>
<xsl:template match="h:q">
<sc:phrase role="quote">
<xsl:apply-templates/>
</sc:phrase>
</xsl:template>
<!--Table-->
<xsl:template match="h:table">
<sc:table role="">
<xsl:apply-templates select="h:caption"/>
<xsl:for-each select="h:tr[1]/h:td">
<sc:column width="20"/>
</xsl:for-each>
<xsl:apply-templates select="h:tr"/>
</sc:table>
</xsl:template>
<xsl:template match="h:caption">
<sc:caption xml:space="preserve">
<xsl:value-of select="."/>
</sc:caption>
</xsl:template>
<xsl:template match="h:tr">
<sc:row>
<xsl:apply-templates/>
</sc:row>
</xsl:template>
<xsl:template match="h:td">
<sc:cell>
<xsl:apply-templates/>
</sc:cell>
</xsl:template>
<!--Object-->
<xsl:template match="h:object">
<xsl:variable name="data" select="@data"/>
<sc:extBlock role="img" sc:refUri="{$data}"/>
</xsl:template>
<!--Image-->
<xsl:template match="h:img">
<xsl:variable name="src" select="@src"/>
<sc:extBlock role="img" sc:refUri="{$src}"/>
</xsl:template>
<!--Audio-->
<xsl:template match="h:audio">
<xsl:variable name="src" select="@src"/>
<sc:extBlock role="anim" sc:refUri="{$src}"/>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
Mindmapping to HDOC
===================
Projet de conversion du format Freemind vers hdoc.
......@@ -14,26 +14,25 @@
<echo>----------------------------Begin of conversion----------------------------------</echo>
<!-- Sect Schema : only sect element -->
<!-- Sect Schema : only sect element -->
<antcall target="Makehdoc">
<param name="myXSLT" value="sect.xsl"/>
<param name="hdocName" value="sect"/>
</antcall>
<!-- Div Schema : sect and div element -->
<!-- Div Schema : sect and div element -->
<antcall target="Makehdoc">
<param name="myXSLT" value="div.xsl"/>
<param name="hdocName" value="div"/>
</antcall>
<!-- Div Schema : sect, div and p element -->
<antcall target="Makehdoc">
<!-- Div Schema : sect, div and p element -->
<antcall target="Makehdoc">
<param name="myXSLT" value="threeLevel.xsl"/>
<param name="hdocName" value="three"/>
</antcall>
<!-- <delete dir="${basedir}/temp"/> -->
<delete dir="${basedir}/temp"/>
<echo>----------------------------End of conversion----------------------------------</echo>
</target>
......@@ -43,8 +42,6 @@
<mkdir dir="${basedir}/temp" />
<delete dir="${resultFile}/hdoc"></delete>
<mkdir dir="${resultFile}/hdoc" />
<delete dir="${resultFile}/scar"></delete>
<mkdir dir="${resultFile}/scar" />
<!--<condition>
<equals arg1="${foo}" arg2=""/>
</condition> -->
......@@ -66,30 +63,9 @@
<!-- zipping files as the hdoc format -->
<zip destfile="${resultFile}/hdoc/${hdocName}.hdoc"
basedir="${basedir}/temp/${hdocName}"/>
<!-- to generate scar files -->
<antcall target="opale_conversion"/>
<!-- </condition> -->
<echo>end data conversion</echo>
</target>
<!-- Connect this to the work of the other group about hdoc to opale (configure and call their ant etc.) -->
<target name="opale_conversion" if="${opale.exists}" depends="opale_test">
<!-- <condition property="converting.set" else="false"> -->
<ant antfile="${basedir}/hdoctoopale/hdoc_to_opale.ant" dir="${basedir}/hdoctoopale">
<property name="InputPath" value="${resultFile}/hdoc/${hdocName}.hdoc"/>
<property name="OutputPath" value="${resultFile}/scar/${hdocName}.scar"/>
</ant>
</target>
<!-- check if opale convertion is asked by the user -->
<target name="opale_test">
<condition property="opale.exists" else="false">
<equals arg1="${opale}" arg2="true"/>
</condition>
<echo message="Run opale conversion ? ${opale.exists}"/>
</target>
</project>
......@@ -3,15 +3,9 @@
#1 : you want to convert your freemindFile in Hdoc
- put your freemind file in the mindMapping_to_Hdoc
- enter the command line :
- linux : ant -buildfile mindMapping2Hdoc.ant -DinputPath <yourFilename>
- windows : C:\ant\bin\ant -buildfile mindMapping2Hdoc.ant -DinputPath <yourFilename>
- linux : ant -buildfile mindmapping_to_hdoc.ant -DinputPath <yourFilename>
- windows : C:\ant\bin\ant -buildfile mindmapping_to_hdoc.ant -DinputPath <yourFilename>
you will find the result in the folder result/hdoc
#2 : you want a .scar (for scenari)
- put your freemind file in the mindMapping_to_Hdoc
- enter the command line :
- linux : ant -buildfile mindMapping2Hdoc.ant -DinputPath <yourFilename> -Dopale true
- windows : C:\ant\bin\ant -buildfile mindMapping2Hdoc.ant -DinputPath <yourFilename> -Dopale true
you will find the result in the folder result/opale
......@@ -2,45 +2,84 @@
<project basedir="." default="default">
<property name="module" value="default"/>
<!--
only for the debug
<property name="inputPath" value="test.mm"></property>
<property name="outputPath" value="content.xml"/>
<property name="converting" value="yes"/>
only for the debug
<property name="inputPath" value="test.mm"></property>
<property name="outputPath" value="content.xml"/>
<property name="converting" value="yes"/>
-->
<property name="resultFile" value="${basedir}/result"/>
<target name="default">
<target name="default" depends="preparation">
<echo>----------------------------Begin of conversion----------------------------------</echo>
<!-- Sect Schema : only sect element -->
<antcall target="opale_conversion">
<!-- Sect Schema : only sect element -->
<antcall target="Makehdoc">
<param name="hdocName" value="sect"/>
</antcall>
<!-- Div Schema : sect and div element -->
<antcall target="opale_conversion">
<!-- Div Schema : sect and div element -->
<antcall target="Makehdoc">
<param name="hdocName" value="div"/>
</antcall>
<!-- Div Schema : sect, div and p element -->
<antcall target="opale_conversion">
<!-- Div Schema : sect, div and p element -->
<antcall target="Makehdoc">
<param name="hdocName" value="three"/>
</antcall>
<!-- <delete dir="${basedir}/temp"/> -->
<delete dir="${basedir}/temp"/>
<echo>----------------------------End of conversion----------------------------------</echo>
</target>
<target name="preparation">
<echo>Setting up the conversion</echo>
<delete dir="${basedir}/temp"></delete>
<mkdir dir="${basedir}/temp" />
<delete dir="${resultFile}/hdoc"></delete>
<mkdir dir="${resultFile}/hdoc" />
<delete dir="${resultFile}/scar"></delete>
<mkdir dir="${resultFile}/scar" />
<!--<condition>
<equals arg1="${foo}" arg2=""/>