Commit c08edc5b authored by Decorde Jeffrey's avatar Decorde Jeffrey
Browse files

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

parents da86dac8 355e15ff
......@@ -2,9 +2,6 @@
<project name="project" default="clean" basedir=".">
<property file="build.properties"/>
<property name="InputPath" value="" />
<property name="OutputPath" value="" />
<taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask">
<classpath>
......@@ -12,7 +9,13 @@
</classpath>
</taskdef>
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="lib/ant-contrib.jar"/>
</classpath>
</taskdef>
<target name="init">
<mkdir dir="${outdir}"/>
<chmod perm="777" dir="${outdir}"></chmod>
......@@ -21,17 +24,32 @@
</target>
<target name="unzipSource" depends="init">
<echo>Fichier en entree : ${InputPath}</echo>
<echo>Fichier de sortie : ${OutputPath}</echo>
<unzip src="${InputPath}" dest="${srcdir}"></unzip>
<for param="file">
<path>
<fileset dir="${InputPath}" id="inputsId">
<include name="*.zip"/>
<include name="*.scar"/>
</fileset>
</path>
<sequential>
<local name="TODAY_MY"/>
<tstamp>
<format property="TODAY_MY" pattern="yyyyMMdd-HHmmss" locale="en,UK" />
</tstamp>
<var name="name" unset="true"/>
<basename file="@{file}" property="name" />
<unzip src="${InputPath}/${name}" dest="${srcdir}/${TODAY_MY}"></unzip>
<sleep seconds="1"> </sleep>
</sequential>
</for>
</target>
<target name="buildOutput" depends="unzipSource">
<xslt classpath="${libdir}/saxon9he.jar" style="${xsldir}/refToTerm.xsl" basedir="${srcdir}" destdir="${outdir}" followsymlinks="false" extension=".term">
<xslt classpath="${libdir}/saxon9he.jar" style="${xsldir}/refToTerm.xsl" basedir="${srcdir}" destdir="${OutputPath}" followsymlinks="false" extension=".term">
<include name="**/*.ref"/>
</xslt>
<copy file="lexique.wspmeta" tofile="${OutputPath}/.wspmeta"></copy>
<!--<jing rngfile="${rngdir}/lx_term.rng">
<fileset dir="${outdir}">
<include name="**/*.term"/>
......@@ -39,12 +57,8 @@
</jing>-->
</target>
<target name="exportOutput" depends="buildOutput">
<copy file="lexique.wspmeta" tofile="${outdir}/.wspmeta"></copy>
<zip basedir="${outdir}" destfile="${OutputPath}" encoding="UTF-8"></zip>
</target>
<target name="clean" depends="exportOutput">
<target name="clean" depends="buildOutput">
<delete dir="${srcdir}" />
<delete dir="${outdir}" />
</target>
......
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<sng:grammar 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" xmlns:sng="http://relaxng.org/ns/structure/1.0" xmlns:snga="http://relaxng.org/ns/compatibility/annotations/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<sng:start>
<sng:element name="sc:item">
<sng:ref name="of_def"/>
</sng:element>
</sng:start>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="of_def">
<sng:element name="of:def" snga:title="Définition">
<snga:documentation>Est un item de référence qui permet d'expliciter un terme ou une notion.</snga:documentation>
<sng:ref name="of_defM"/>
<sng:element name="sp:def" snga:title="Définition">
<sng:ref xmlns:sng="http://relaxng.org/ns/structure/1.0" name="of_sTxt"/>
</sng:element>
</sng:element>
</sng:define>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="of_sTxt">
<sng:element name="of:sTxt" snga:title="Texte">
<snga:documentation> Texte riche</snga:documentation>
<sng:ref name="of_sTxt_blocs"/>
</sng:element>
</sng:define>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="of_sTxt_blocs">
<sng:oneOrMore>
<sng:choice>
<sng:element name="sc:para" snga:title="Paragraphe">
<sng:ref name="of_sTxt_id"/>
<sng:optional>
<sng:attribute name="xml:space">
<sng:value>preserve</sng:value>
</sng:attribute>
</sng:optional>
<sng:ref name="of_sTxt_inline"/>
</sng:element>
<sng:element name="sc:itemizedList" snga:title="Liste à puce">
<sng:optional>
<sng:attribute name="role">
<sng:value/>
</sng:attribute>
</sng:optional>
<sng:ref name="of_sTxt_id"/>
<sng:zeroOrMore>
<sng:element name="sc:listItem">
<sng:ref name="of_sTxt_id"/>
<sng:ref name="of_sTxt_blocs"/>
</sng:element>
</sng:zeroOrMore>
</sng:element>
<sng:element name="sc:orderedList" snga:title="Liste ordonnée">
<sng:optional>
<sng:attribute name="role">
<sng:value/>
</sng:attribute>
</sng:optional>
<sng:ref name="of_sTxt_id"/>
<sng:zeroOrMore>
<sng:element name="sc:listItem">
<sng:ref name="of_sTxt_id"/>
<sng:ref name="of_sTxt_blocs"/>
</sng:element>
</sng:zeroOrMore>
</sng:element>
</sng:choice>
</sng:oneOrMore>
</sng:define>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="of_sTxt_inline">
<sng:zeroOrMore>
<sng:choice>
<sng:text/>
<sng:element name="sc:uLink" snga:title="Adresse web, email">
<sng:attribute name="role">
<sng:value>url</sng:value>
</sng:attribute>
<sng:ref name="of_sTxt_id"/>
<sng:optional>
<sng:attribute name="url">
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:attribute>
</sng:optional>
<sng:optional>
<sng:attribute name="sc:refUri">
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:attribute>
</sng:optional>
<sng:ref name="of_sTxt_inline"/>
</sng:element>
<sng:element name="sc:phrase" snga:title="Citation">
<sng:attribute name="role">
<sng:value>quote</sng:value>
</sng:attribute>
<sng:ref name="of_sTxt_id"/>
<sng:optional>
<sng:attribute name="xml:lang">
<sng:data type="string"/>
</sng:attribute>
</sng:optional>
<sng:ref name="of_sTxt_inline"/>
</sng:element>
<sng:element name="sc:phrase" snga:title="Terme spécifique">
<sng:attribute name="role">
<sng:value>special</sng:value>
</sng:attribute>
<sng:ref name="of_sTxt_id"/>
<sng:optional>
<sng:attribute name="xml:lang">
<sng:data type="string"/>
</sng:attribute>
</sng:optional>
<sng:ref name="of_sTxt_inline"/>
</sng:element>
<sng:element name="sc:inlineStyle" snga:title="Mise en relief">
<sng:attribute name="role">
<sng:value>emphasis</sng:value>
</sng:attribute>
<sng:ref name="of_sTxt_id"/>
<sng:ref name="of_sTxt_inline"/>
</sng:element>
<sng:element name="sc:inlineImg" snga:title="Imagette">
<sng:attribute name="role">
<sng:value>ico</sng:value>
</sng:attribute>
<sng:ref name="of_sTxt_id"/>
<sng:attribute name="sc:refUri">
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:attribute>
<sng:text/>
</sng:element>
</sng:choice>
</sng:zeroOrMore>
</sng:define>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="of_sTxt_id">
<sng:optional>
<sng:attribute name="sc:id">
<sng:data type="ID"/>
</sng:attribute>
</sng:optional>
</sng:define>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="of_defM">
<sng:element name="of:defM" snga:title="Définition">
<snga:documentation>Bloc de texte permettant de saisir la définition.</snga:documentation>
<sng:element name="sp:term" snga:title="Terme">
<snga:documentation>Permet de saisir le mot ou la notion à définir.</snga:documentation>
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:element>
</sng:element>
</sng:define>
</sng:grammar>
\ No newline at end of file
# Converter optim_to_lexique
In order to use this converter, follow those steps :
1. Copy your Optim files (.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.
libdir=${basedir}/lib
rngdir=${basedir}/rng
xsldir=${basedir}/xsl
srcdir=${basedir}/in
outdir=${basedir}/out
\ No newline at end of file
libdir=${basedir}/lib
rngdir=${basedir}/rng
xsldir=${basedir}/xsl
srcdir=${basedir}/in
outdir=${basedir}/out
InputPath=${basedir}/input
OutputPath=${basedir}/output
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<wspType defaultCode="lexicon" title="Lexique 1.0 (fr-FR)" description="" uri="lexicon1-0_fr-FR_006" key="lexicon1-0" lang="fr-FR" version="1.0.006"><wspUpdate localAutoUpdate="minor"><res key="lexicon1-0.wsp"/></wspUpdate><systemSpace space="~param/lexicon1-0/ss"><res key="lexicon1-0.ss"/></systemSpace><systemSpace space="~param/lexicon1-0/bs" optional="true"><res key="lexicon1-0.bs"/></systemSpace><systemSpace space="~param/lexicon1-0/gen/lexiconW"><res key="lexicon1-0.gen.lexiconW"/></systemSpace><systemSpace space="~param/lexicon1-0/gen/control"><res key="lexicon1-0.gen.control"/></systemSpace><systemSpace space="~param/lexicon1-0/gen/lexiconWpre"><res key="lexicon1-0.gen.lexiconWpre"/></systemSpace><ssOverlay ssUri="/~param/lexicon1-0/ss/lx_webSite.ss.xml"><ssFragment xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"><module code="gen_lexiconW" type="eu.scenari.wsp.module.gen.ModuleGenLoader"><skin sc:refUri="/~param/lexicon1-0/gen/lexiconW/skin/default.doss" code="default" title="Skin Classique" owner="lexicon1-0"/></module></ssFragment></ssOverlay><ssOverlay ssUri="/~param/lexicon1-0/ss/lx_term.ss.xml"><ssFragment xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"><module code="gen_lexiconWpre" type="eu.scenari.wsp.module.gen.ModuleGenLoader"><skin sc:refUri="/~param/lexicon1-0/gen/lexiconWpre/skin/default.doss" code="default" title="Skin Classique" owner="lexicon1-0"/></module></ssFragment></ssOverlay><editionSheet pack="lexicon1-0_fr-FR_006" brickSelector="{lexicon1-0.moz;1.0.006;fr-FR}"/></wspType>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project name="project" default="clean" basedir=".">
<property file="build.properties"/>
<property name="InputPath" value="" />
<property name="OutputPath" value="" />
<taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask">
<classpath>
<pathelement location="${libdir}/jing.jar"/>
</classpath>
</taskdef>
<target name="init">
<mkdir dir="${outdir}"/>
<chmod perm="777" dir="${outdir}"></chmod>
<mkdir dir="${srcdir}"/>
<chmod perm="777" dir="${srcdir}"></chmod>
</target>
<target name="unzipSource" depends="init">
<echo>Fichier en entree : ${InputPath}</echo>
<echo>Fichier de sortie : ${OutputPath}</echo>
<unzip src="${InputPath}" dest="${srcdir}"></unzip>
</target>
<target name="buildOutput" depends="unzipSource">
<xslt classpath="${libdir}/saxon9he.jar" style="${xsldir}/refsToTerm.xsl" basedir="${srcdir}" destdir="${outdir}" followsymlinks="false" extension=".term">
<include name="**/*.refs"/>
</xslt>
<!--<jing rngfile="${rngdir}/lx_term.rng">
<fileset dir="${outdir}">
<include name="**/*.term"/>
</fileset>
</jing>-->
</target>
<target name="imageCopy" depends="unzipSource">
<copy todir="${outdir}">
<fileset dir="${srcdir}">
<include name="**/*.jpg"/>
<include name="**/*.png"/>
<include name="**/*.gif"/>
</fileset>
</copy>
</target>
<target name="exportOutput" depends="buildOutput,imageCopy">
<copy file="lexique.wspmeta" tofile="${outdir}/.wspmeta"></copy>
<zip basedir="${outdir}" destfile="${OutputPath}" encoding="UTF-8"></zip>
</target>
<target name="clean" depends="exportOutput">
<delete dir="${srcdir}" />
<delete dir="${outdir}" />
</target>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project name="project" default="clean" basedir=".">
<property file="build.properties"/>
<taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask">
<classpath>
<pathelement location="${libdir}/jing.jar"/>
</classpath>
</taskdef>
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="lib/ant-contrib.jar"/>
</classpath>
</taskdef>
<target name="init">
<mkdir dir="${outdir}"/>
<chmod perm="777" dir="${outdir}"></chmod>
<mkdir dir="${srcdir}"/>
<chmod perm="777" dir="${srcdir}"></chmod>
</target>
<target name="unzipSource" depends="init">
<for param="file">
<path>
<fileset dir="${InputPath}" id="inputsId">
<include name="*.zip"/>
<include name="*.scar"/>
</fileset>
</path>
<sequential>
<local name="TODAY_MY"/>
<tstamp>
<format property="TODAY_MY" pattern="yyyyMMdd-HHmmss" locale="en,UK" />
</tstamp>
<var name="name" unset="true"/>
<basename file="@{file}" property="name" />
<unzip src="${InputPath}/${name}" dest="${srcdir}/${TODAY_MY}"></unzip>
<sleep seconds="1"> </sleep>
</sequential>
</for>
</target>
<target name="buildOutput" depends="unzipSource">
<xslt classpath="${libdir}/saxon9he.jar" style="${xsldir}/refsToTerm.xsl" basedir="${srcdir}" destdir="${OutputPath}" followsymlinks="false" extension=".term">
<include name="**/*.refs"/>
</xslt>
<copy file="lexique.wspmeta" tofile="${OutputPath}/.wspmeta"></copy>
<!--<jing rngfile="${rngdir}/lx_term.rng">
<fileset dir="${outdir}">
<include name="**/*.term"/>
</fileset>
</jing>-->
</target>
<target name="imageCopy" depends="unzipSource">
<copy todir="${OutputPath}">
<fileset dir="${srcdir}">
<include name="**/*.jpg"/>
<include name="**/*.png"/>
<include name="**/*.gif"/>
</fileset>
</copy>
</target>
<target name="clean" depends="buildOutput,imageCopy">
<delete dir="${srcdir}" />
<delete dir="${outdir}" />
</target>
</project>
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<sng:grammar 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" xmlns:sng="http://relaxng.org/ns/structure/1.0" xmlns:snga="http://relaxng.org/ns/compatibility/annotations/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<sng:start>
<sng:element name="sc:item">
<sng:ref name="of_def"/>
</sng:element>
</sng:start>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="of_def">
<sng:element name="of:def" snga:title="Définition">
<snga:documentation>Est un item de référence qui permet d'expliciter un terme ou une notion.</snga:documentation>
<sng:ref name="of_defM"/>
<sng:element name="sp:def" snga:title="Définition">
<sng:ref xmlns:sng="http://relaxng.org/ns/structure/1.0" name="of_sTxt"/>
</sng:element>
</sng:element>
</sng:define>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="of_sTxt">
<sng:element name="of:sTxt" snga:title="Texte">
<snga:documentation> Texte riche</snga:documentation>
<sng:ref name="of_sTxt_blocs"/>
</sng:element>
</sng:define>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="of_sTxt_blocs">
<sng:oneOrMore>
<sng:choice>
<sng:element name="sc:para" snga:title="Paragraphe">
<sng:ref name="of_sTxt_id"/>
<sng:optional>
<sng:attribute name="xml:space">
<sng:value>preserve</sng:value>
</sng:attribute>
</sng:optional>
<sng:ref name="of_sTxt_inline"/>
</sng:element>
<sng:element name="sc:itemizedList" snga:title="Liste à puce">
<sng:optional>
<sng:attribute name="role">
<sng:value/>
</sng:attribute>
</sng:optional>
<sng:ref name="of_sTxt_id"/>
<sng:zeroOrMore>
<sng:element name="sc:listItem">
<sng:ref name="of_sTxt_id"/>
<sng:ref name="of_sTxt_blocs"/>
</sng:element>
</sng:zeroOrMore>
</sng:element>
<sng:element name="sc:orderedList" snga:title="Liste ordonnée">
<sng:optional>
<sng:attribute name="role">
<sng:value/>
</sng:attribute>
</sng:optional>
<sng:ref name="of_sTxt_id"/>
<sng:zeroOrMore>
<sng:element name="sc:listItem">
<sng:ref name="of_sTxt_id"/>
<sng:ref name="of_sTxt_blocs"/>
</sng:element>
</sng:zeroOrMore>
</sng:element>
</sng:choice>
</sng:oneOrMore>
</sng:define>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="of_sTxt_inline">
<sng:zeroOrMore>
<sng:choice>
<sng:text/>
<sng:element name="sc:uLink" snga:title="Adresse web, email">
<sng:attribute name="role">
<sng:value>url</sng:value>
</sng:attribute>
<sng:ref name="of_sTxt_id"/>
<sng:optional>
<sng:attribute name="url">
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:attribute>
</sng:optional>
<sng:optional>
<sng:attribute name="sc:refUri">
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:attribute>
</sng:optional>
<sng:ref name="of_sTxt_inline"/>
</sng:element>
<sng:element name="sc:phrase" snga:title="Citation">
<sng:attribute name="role">
<sng:value>quote</sng:value>
</sng:attribute>
<sng:ref name="of_sTxt_id"/>
<sng:optional>
<sng:attribute name="xml:lang">
<sng:data type="string"/>
</sng:attribute>
</sng:optional>
<sng:ref name="of_sTxt_inline"/>
</sng:element>
<sng:element name="sc:phrase" snga:title="Terme spécifique">
<sng:attribute name="role">
<sng:value>special</sng:value>
</sng:attribute>
<sng:ref name="of_sTxt_id"/>
<sng:optional>
<sng:attribute name="xml:lang">
<sng:data type="string"/>
</sng:attribute>
</sng:optional>
<sng:ref name="of_sTxt_inline"/>
</sng:element>
<sng:element name="sc:inlineStyle" snga:title="Mise en relief">
<sng:attribute name="role">
<sng:value>emphasis</sng:value>
</sng:attribute>
<sng:ref name="of_sTxt_id"/>
<sng:ref name="of_sTxt_inline"/>
</sng:element>
<sng:element name="sc:inlineImg" snga:title="Imagette">
<sng:attribute name="role">
<sng:value>ico</sng:value>
</sng:attribute>
<sng:ref name="of_sTxt_id"/>
<sng:attribute name="sc:refUri">
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:attribute>
<sng:text/>
</sng:element>
</sng:choice>
</sng:zeroOrMore>
</sng:define>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="of_sTxt_id">
<sng:optional>
<sng:attribute name="sc:id">
<sng:data type="ID"/>
</sng:attribute>
</sng:optional>
</sng:define>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="of_defM">
<sng:element name="of:defM" snga:title="Définition">
<snga:documentation>Bloc de texte permettant de saisir la définition.</snga:documentation>
<sng:element name="sp:term" snga:title="Terme">
<snga:documentation>Permet de saisir le mot ou la notion à définir.</snga:documentation>
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:element>
</sng:element>
</sng:define>
</sng:grammar>
\ 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