Commit 8cc8cc2a authored by Neveux Anais's avatar Neveux Anais
Browse files

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

parents 6618d4db d77c17a9
......@@ -194,6 +194,13 @@
</element>
</optional>
<ref name="Flow"/>
<optional>
<element name="div">
<ref name="DivType"/>
<ref name="Text"/>
</element>
</optional>
</element>
</oneOrMore>
</define>
......
......@@ -48,9 +48,14 @@
<value>advice</value>
<!-- quiz management -->
<value>question</value>
<value>singlechoicequestion</value>
<value>choice</value>
<value>solution</value>
<value>choice-correct</value>
<value>choice-incorrect</value>
<value>explanation</value>
<value>explanation-choice-correct</value>
<value>explanation-choice-incorrect</value>
</choice>
</attribute>
</optional>
......
......@@ -30,9 +30,9 @@
<target name="move_output_hdoc_wikipediaToHdoc_into_input_hdocToCanoprof">
<!--copy .hdoc file from wikipedia_to_hdoc_result into input of hdoc_to_canoprof -->
<!-- <delete dir="../hdoc_to_canoprof/input"/>
<delete dir="../hdoc_to_canoprof/input"/>
<mkdir dir="../hdoc_to_canoprof/input"/>
<copy todir="../hdoc_to_canoprof/input" file="../wikipedia_to_hdoc/result/${filename}/${filename}.hdoc"/> -->
<copy todir="../hdoc_to_canoprof/input" file="../wikipedia_to_hdoc/result/${filename}/${filename}.hdoc"/>
<mkdir dir="./testing_ant"/>
<copy todir="./testing_ant" file="../wikipedia_to_hdoc/result/${filename}/${filename}.hdoc"/>
</target>
......@@ -60,22 +60,22 @@
<!-- Run hdoc_to_canoprof bat -->
<target name="run_hdoc_to_canoprof_windows" if="${is_windows}">
<!-- <exec executable="cmd" dir="${hdoc_to_canoprof}">
<exec executable="cmd" dir="${hdoc_to_canoprof}">
<arg value="/c"/>
<arg value="${hdoc_to_canoprof}/run.bat"/>
</exec> -->
</exec>
</target>
<!-- Run hdoc_to_canoprof sh -->
<target name="run_hdoc_to_canoprof_unix" if="${is_unix}">
<!-- <exec executable="/bin/bash" dir="${hdoc_to_canoprof}">
<exec executable="/bin/bash" dir="${hdoc_to_canoprof}">
<arg value="${hdoc_to_canoprof}/run.sh"/>
</exec> -->
</exec>
</target>
<target name="move_output_hdocToCanoprof_into_ouput_wikipediaToCanoprof">
<!-- <copy todir="${resultPath}" failonerror="false">
<copy todir="${resultPath}" failonerror="false">
<fileset dir="../hdoc_to_canoprof/output" includes="**"/>
</copy> -->
</copy>
</target>
</project>
\ No newline at end of file
......@@ -18,10 +18,10 @@
</target>
<target name="move_output_hdoc_wikipediaToHdoc_into_input_hdocToCanoprof">
<!--copy .hdoc file from wikipedia_to_hdoc_result into input of hdoc_to_opale -->
<!--<delete dir="../hdoc_to_canoprof/input"/>
<!-- copy .hdoc file from wikipedia_to_hdoc_result into input of hdoc_to_canoprof -->
<delete dir="../hdoc_to_canoprof/input"/>
<mkdir dir="../hdoc_to_canoprof/input"/>
<copy todir="../hdoc_to_canoprof/input" file="../wikipedia_to_hdoc/result/${filename}/${filename}.hdoc"/> -->
<copy todir="../hdoc_to_canoprof/input" file="../wikipedia_to_hdoc/result/${filename}/${filename}.hdoc"/>
<mkdir dir="./testing_ant"/>
<copy todir="./testing_ant" file="../wikipedia_to_hdoc/result/${filename}/${filename}.hdoc"/>
</target>
......@@ -49,22 +49,22 @@
<!-- Run hdoc_to_canoprof bat -->
<target name="run_hdoc_to_canoprof_windows" if="${is_windows}">
<!--<exec executable="cmd" dir="${hdoc_to_canoprof}">
<exec executable="cmd" dir="${hdoc_to_canoprof}">
<arg value="/c"/>
<arg value="${hdoc_to_canoprof}/run.bat"/>
</exec>-->
</exec>
</target>
<!-- Run hdoc_to_canoprof sh -->
<target name="run_hdoc_to_canoprof_unix" if="${is_unix}">
<!--<exec executable="/bin/bash" dir="${hdoc_to_canoprof}">
<exec executable="/bin/bash" dir="${hdoc_to_canoprof}">
<arg value="${hdoc_to_canoprof}/run.sh"/>
</exec>-->
</exec>
</target>
<target name="move_output_hdocToCanoprof_into_ouput_wikipediaToCanoprof">
<!--<copy todir="${resultPath}" failonerror="false">
<copy todir="${resultPath}" failonerror="false">
<fileset dir="../hdoc_to_canoprof/output" includes="**"/>
</copy>-->
</copy>
</target>
</project>
\ No newline at end of file
......@@ -37,5 +37,5 @@
<xsl:template match="script"/>
<!-- Ignoring divs that are not useful and that might interfere with the true xslt transformation -->
<xsl:template match="/html/body/div/div/div/div[@class!='mw-highlight mw-content-ltr']"/>
<xsl:template match="/html/body/div/div/div/div[@class!='mw-highlight mw-content-ltr' and not(descendant::table)]"/>
</xsl:stylesheet>
\ No newline at end of file
......@@ -198,7 +198,9 @@
<xsl:template match="li[@class='gallerybox']" mode="#all">
<xsl:element name="{local-name()}" namespace="http://www.utc.fr/ics/hdoc/xhtml">
<img src="./ressources/{translate(tokenize(.//img/@src, '/')[last()],'?%','_')}" alt="{.//img/@alt}"/>
<p>
<xsl:value-of select=".//div[@class='galerytext']/p"/>
</p>
</xsl:element>
</xsl:template>
......@@ -360,11 +362,7 @@
</xsl:if>
</xsl:template>
<<<<<<< HEAD
=======
>>>>>>> 9e71c9879b4cfdf2138a088b173de4011fd5869f
<!-- Simple Tables -->
<xsl:template match="table" mode="#all">
<xsl:choose>
......@@ -498,7 +496,9 @@
match=" h2[following-sibling::div[@class='references-small decimal'] and preceding-sibling::h2][last()]"/>
<xsl:template match="h2[following-sibling::h3[span[@id='Notes']]][last()]"/>
<xsl:template match="div[@id='mw-navigation']/h2"/>
<xsl:template match="h2[span[@id='Voir_aussi']]"/>
<xsl:template match="h2[span[@id='Notes_et_r.C3.A9f.C3.A9rences']]"/>
<!-- Ignoring divs by default: they are not relevant to us -->
<xsl:template match="div" mode="#all"/>
<xsl:template match="div[not(descendant::table) and not(descendant::img)]" mode="#all"/>
</xsl:stylesheet>
Supports Markdown
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