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>
......
<?xml version="1.0" encoding="UTF-8"?>
<sng:grammar xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive"
xmlns:sc="http://www.utc.fr/ics/scenari/v3/core" xmlns:lx="scpf.org:lexicon"
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="lx_term"/>
</sng:element>
</sng:start>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="lx_term">
<sng:element name="lx:term" snga:title="Terme">
<snga:documentation>L'item Terme permet de définir un mot du lexique.</snga:documentation>
<sng:ref name="lx_termM"/>
<sng:optional>
<sng:element name="sp:pronunciation" snga:title="Prononciation">
<snga:documentation>Permet de donner la forme phonétique et d'écouter la prononciation du terme.</snga:documentation>
<sng:attribute name="sc:refUri">
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:attribute>
<sng:ref name="lx_pronunciationM"/>
<sng:empty/>
</sng:element>
</sng:optional>
<sng:zeroOrMore>
<sng:element xmlns:sng="http://relaxng.org/ns/structure/1.0" name="sp:def"
snga:title="Définition">
<snga:documentation>Permet de saisir une ou plusieurs définitions du terme en question.</snga:documentation>
<sng:choice>
<sng:group>
<sng:attribute name="sc:refUri">
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:attribute>
<sng:empty/>
</sng:group>
<sng:ref xmlns:sng="http://relaxng.org/ns/structure/1.0"
name="lx_definition"/>
</sng:choice>
</sng:element>
</sng:zeroOrMore>
<sng:optional>
<sng:element name="sp:index" snga:title="Indexation">
<snga:documentation>Permet de lier des Tags au terme défini afin de le rattacher à des critères de recherche (thèmes, catégories...)</snga:documentation>
<sng:ref xmlns:sng="http://relaxng.org/ns/structure/1.0" name="lx_index"/>
</sng:element>
</sng:optional>
</sng:element>
</sng:define>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="lx_index">
<sng:element name="lx:index" snga:title="Indexation">
<sng:oneOrMore>
<sng:element xmlns:sng="http://relaxng.org/ns/structure/1.0" name="sp:tag"
snga:title="Tag">
<snga:documentation> Permet de créer un critère de recherche. Les Tags sont liés aux termes du lexique et permettent ainsi une entrée alternative, par thèmes ou catégories, aux définitions du lexique, via la recherche avancée.</snga:documentation>
<sng:attribute name="sc:refUri">
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:attribute>
<sng:empty/>
</sng:element>
</sng:oneOrMore>
</sng:element>
</sng:define>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="lx_definition">
<sng:element name="lx:definition" snga:title="Définition">
<sng:element name="sp:desc" snga:title="Texte">
<sng:ref xmlns:sng="http://relaxng.org/ns/structure/1.0" name="lx_defTxt"/>
</sng:element>
<sng:optional>
<sng:element name="sp:source" snga:title="Source">
<snga:documentation> Permet d'identifier l'origine d'une définition (site internet, bibliographie,...).</snga:documentation>
<sng:choice>
<sng:group>
<sng:attribute name="sc:refUri">
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:attribute>
<sng:empty/>
</sng:group>
<sng:ref xmlns:sng="http://relaxng.org/ns/structure/1.0" name="lx_source"/>
</sng:choice>
</sng:element>
</sng:optional>
<sng:optional>
<sng:element name="sp:links" snga:title="Liens vers d'autres termes">
<snga:documentation>Permet de faire des liens vers d'autres termes du lexique en fonction des relations entre ces termes.</snga:documentation>
<sng:ref name="lx_linkTermM"/>
<sng:empty/>
</sng:element>
</sng:optional>
<sng:zeroOrMore>
<sng:element xmlns:sng="http://relaxng.org/ns/structure/1.0" name="sp:moreInfo"
snga:title="Complément">
<snga:documentation>Permet de donner des informations complémentaires concernant le terme défini.</snga:documentation>
<sng:ref name="lx_moreInfoM"/>
<sng:ref xmlns:sng="http://relaxng.org/ns/structure/1.0" name="lx_txt"/>
</sng:element>
</sng:zeroOrMore>
</sng:element>
</sng:define>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="lx_defTxt">
<sng:element name="lx:defTxt" snga:title="Texte de la définition d'un terme">
<sng:ref name="lx_defTxt_blocs"/>
</sng:element>
</sng:define>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="lx_defTxt_blocs">
<sng:oneOrMore>
<sng:choice>
<sng:element name="sc:para" snga:title="Paragraphe">
<sng:ref name="lx_defTxt_id"/>
<sng:optional>
<sng:attribute name="xml:space">
<sng:value>preserve</sng:value>
</sng:attribute>
</sng:optional>
<sng:ref name="lx_defTxt_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="lx_defTxt_id"/>
<sng:zeroOrMore>
<sng:element name="sc:listItem">
<sng:ref name="lx_defTxt_id"/>
<sng:ref name="lx_defTxt_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="lx_defTxt_id"/>
<sng:zeroOrMore>
<sng:element name="sc:listItem">
<sng:ref name="lx_defTxt_id"/>
<sng:ref name="lx_defTxt_blocs"/>
</sng:element>
</sng:zeroOrMore>
</sng:element>
<sng:element name="sc:table" snga:title="Tableau">
<sng:optional>
<sng:attribute name="role">
<sng:value/>
</sng:attribute>
</sng:optional>
<sng:ref name="lx_defTxt_id"/>
<sng:optional>
<sng:element name="sc:caption" snga:title="">
<sng:ref name="lx_defTxt_id"/>
<sng:ref name="lx_defTxt_inline"/>
<sng:optional>
<sng:attribute name="xml:space">
<sng:value>preserve</sng:value>
</sng:attribute>
</sng:optional>
</sng:element>
</sng:optional>
<sng:zeroOrMore>
<sng:choice>
<sng:element name="sc:column" snga:title="Colonne">
<sng:optional>
<sng:attribute name="role">
<sng:value/>
</sng:attribute>
</sng:optional>
<sng:ref name="lx_defTxt_id"/>
<sng:attribute name="width">
<sng:data type="string"/>
</sng:attribute>
</sng:element>
<sng:element name="sc:column" snga:title="Colonne de total">
<sng:attribute name="role">
<sng:value>total</sng:value>
</sng:attribute>
<sng:ref name="lx_defTxt_id"/>
<sng:attribute name="width">
<sng:data type="string"/>
</sng:attribute>
</sng:element>
</sng:choice>
</sng:zeroOrMore>
<sng:zeroOrMore>
<sng:choice>
<sng:element name="sc:row" snga:title="Ligne">
<sng:optional>
<sng:attribute name="role">
<sng:value/>
</sng:attribute>
</sng:optional>
<sng:ref name="lx_defTxt_id"/>
<sng:ref name="lx_defTxt_cells_"/>
</sng:element>
<sng:element name="sc:row" snga:title="Ligne d'entête">
<sng:attribute name="role">
<sng:value>head</sng:value>
</sng:attribute>
<sng:ref name="lx_defTxt_id"/>
<sng:ref name="lx_defTxt_cells_"/>
</sng:element>
<sng:element name="sc:row" snga:title="Ligne de total">
<sng:attribute name="role">
<sng:value>total</sng:value>
</sng:attribute>
<sng:ref name="lx_defTxt_id"/>
<sng:ref name="lx_defTxt_cells_"/>
</sng:element>
</sng:choice>
</sng:zeroOrMore>
<sng:ref name="lx_defTxt_cells_"/>
</sng:element>
<sng:element name="sc:extBlock" snga:title="Image informative">
<sng:attribute name="role">
<sng:value>img</sng:value>
</sng:attribute>
<sng:ref name="lx_defTxt_id"/>
<sng:attribute name="sc:refUri">
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:attribute>
</sng:element>
<sng:element name="sc:extBlock" snga:title="Image décorative">
<sng:attribute name="role">
<sng:value>illus</sng:value>
</sng:attribute>
<sng:ref name="lx_defTxt_id"/>
<sng:attribute name="sc:refUri">
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:attribute>
</sng:element>
<sng:element name="sc:extBlock" snga:title="Animation">
<sng:attribute name="role">
<sng:value>anim</sng:value>
</sng:attribute>
<sng:ref name="lx_defTxt_id"/>
<sng:attribute name="sc:refUri">
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:attribute>
</sng:element>
</sng:choice>
</sng:oneOrMore>
</sng:define>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="lx_defTxt_inline">
<sng:zeroOrMore>
<sng:choice>
<sng:text/>
<sng:element name="sc:uLink" snga:title="Lien vers un autre terme">
<sng:attribute name="role">
<sng:value>lnkTerm</sng:value>
</sng:attribute>
<sng:ref name="lx_defTxt_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="lx_defTxt_inline"/>
</sng:element>
<sng:element name="sc:uLink" snga:title="Lien vers un document interne">
<sng:attribute name="role">
<sng:value>ref</sng:value>
</sng:attribute>
<sng:ref name="lx_defTxt_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="lx_defTxt_inline"/>
</sng:element>
<sng:element name="sc:phrase"
snga:title="Adresse web, email, lien vers un document externe">
<sng:attribute name="role">
<sng:value>url</sng:value>
</sng:attribute>
<sng:ref name="lx_defTxt_id"/>
<sng:optional>
<sng:attribute name="xml:lang">
<sng:data type="string"/>
</sng:attribute>
</sng:optional>
<sng:ref name="lx_urlM"/>
<sng:ref name="lx_defTxt_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="lx_defTxt_id"/>
<sng:optional>
<sng:attribute name="xml:lang">
<sng:data type="string"/>
</sng:attribute>
</sng:optional>
<sng:optional>
<sng:ref name="lx_langM"/>
</sng:optional>
<sng:ref name="lx_defTxt_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="lx_defTxt_id"/>
<sng:optional>
<sng:attribute name="xml:lang">
<sng:data type="string"/>
</sng:attribute>
</sng:optional>
<sng:optional>
<sng:ref name="lx_langM"/>
</sng:optional>
<sng:ref name="lx_defTxt_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="lx_defTxt_id"/>
<sng:ref name="lx_defTxt_inline"/>
</sng:element>
<sng:element name="sc:inlineImg" snga:title="Imagette informative">
<sng:attribute name="role">
<sng:value>ico</sng:value>
</sng:attribute>
<sng:ref name="lx_defTxt_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:element name="sc:inlineImg" snga:title="Imagette décorative">
<sng:attribute name="role">
<sng:value>icoIllus</sng:value>
</sng:attribute>
<sng:ref name="lx_defTxt_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="lx_defTxt_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="lx_defTxt_cells_">
<sng:zeroOrMore>
<sng:choice>
<sng:element name="sc:cell" snga:title="Cellule de texte">
<sng:optional>
<sng:attribute name="role">
<sng:value/>
</sng:attribute>
</sng:optional>
<sng:ref name="lx_defTxt_id"/>
<sng:optional>
<sng:attribute name="rowSpan">
<sng:data type="string"/>
</sng:attribute>
</sng:optional>
<sng:optional>
<sng:attribute name="colSpan">
<sng:data type="string"/>
</sng:attribute>
</sng:optional>
<sng:optional>
<sng:ref name="lx_defTxt_blocs"/>
</sng:optional>
</sng:element>
<sng:element name="sc:cell" snga:title="Cellule de nombre">
<sng:attribute name="role">
<sng:value>num</sng:value>
</sng:attribute>
<sng:ref name="lx_defTxt_id"/>
<sng:optional>
<sng:attribute name="rowSpan">
<sng:data type="string"/>
</sng:attribute>
</sng:optional>
<sng:optional>
<sng:attribute name="colSpan">
<sng:data type="string"/>
</sng:attribute>
</sng:optional>
<sng:optional>
<sng:ref name="lx_defTxt_blocs"/>
</sng:optional>
</sng:element>
<sng:element name="sc:cell" snga:title="Cellule de mot">
<sng:attribute name="role">
<sng:value>word</sng:value>
</sng:attribute>
<sng:ref name="lx_defTxt_id"/>
<sng:optional>
<sng:attribute name="rowSpan">
<sng:data type="string"/>
</sng:attribute>
</sng:optional>
<sng:optional>
<sng:attribute name="colSpan">
<sng:data type="string"/>
</sng:attribute>
</sng:optional>
<sng:optional>
<sng:ref name="lx_defTxt_blocs"/>
</sng:optional>
</sng:element>
</sng:choice>
</sng:zeroOrMore>
</sng:define>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="lx_urlM">
<sng:element name="lx:urlM" snga:title="Url">
<sng:element name="sp:url" snga:title="Url, adresse web">
<snga:documentation>Permet de saisir l'adresse de la source sur internet.</snga:documentation>
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:element>
<sng:optional>
<sng:element name="sp:title" snga:title="Titre">
<snga:documentation>Permet de décrire la fonction et la destination du lien, lorsque le texte sur lequel est rattachée l'URL n'est pas explicite.</snga:documentation>
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:element>
</sng:optional>
<sng:optional>
<sng:element name="sp:doc" snga:title="Compléments pour un document lié">
<snga:documentation>Permet de saisir des précisions sir l'url conduit à un document bureautique.</snga:documentation>
<sng:optional>
<sng:element name="sp:type" snga:title="Format du document (PDF...)">
<snga:documentation>Permet de définir le format du document (PDF, RTF...).</snga:documentation>
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:element>
</sng:optional>
<sng:optional>
<sng:element name="sp:weight" snga:title="Poids">
<snga:documentation>Permet de saisir le poids (en kO) du document, afin d'anticiper le temps de téléchargement.</snga:documentation>
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:element>
</sng:optional>
<sng:optional>
<sng:element name="sp:lang" snga:title="Langue">
<snga:documentation>Permet de préciser le code de la langue du fichier, notamment pour les lecteurs d'écran. Une liste de suggestions apparaît au fur et à mesure de la saisie. </snga:documentation>
<sng:choice>
<sng:ref name="lx_langM"/>
</sng:choice>
</sng:element>
</sng:optional>
</sng:element>
</sng:optional>
</sng:element>
</sng:define>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="lx_langM">
<sng:element name="lx:langM" snga:title="Propriété de langue">
<sng:optional>
<sng:element name="sp:code" snga:title="Code">
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:element>
</sng:optional>
</sng:element>
</sng:define>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="lx_source">
<sng:element name="lx:source" snga:title="Source">
<snga:documentation>L'item Source permet d'identifier l'origine d'une définition (site internet, bibliographie,...).</snga:documentation>
<sng:ref name="lx_sourceM"/>
</sng:element>
</sng:define>
<sng:define xmlns:sng="http://relaxng.org/ns/structure/1.0" name="lx_sourceM">
<sng:element name="lx:sourceM" snga:title="Source">
<sng:element name="sp:title" snga:title="Titre">
<snga:documentation>Permet de saisir le nom qui sera affiché comme étant la source de la définition.</snga:documentation>
<sng:data type="string">
<sng:param name="minLength">1</sng:param>
</sng:data>
</sng:element>
<sng:optional>
<sng:element name="sp:url" snga:title="Url">
<snga:documentation>Permet de saisir l'adresse de la source sur internet.</snga:documentation>
<sng:data type="string">
<sng:param name="minLength">1</sng:param>