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

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

parents f52d22d3 1ff3b8cc
@echo off
set lib=lib
set ant=ant/wiki_to_opale.ant
set scJarList=%lib%\*
java.exe -classpath "%scJarList%" -Xmx150m org.apache.tools.ant.Main -buildfile %ant%
pause
REM start /MIN java.exe -classpath "%scJarList%" -Xmx150m org.apache.tools.ant.Main -buildfile %ant% %antparam%
......@@ -2,7 +2,7 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" version="2.0">
<xsl:output method="xml" indent="yes"/>
<xsl:output method="xml"/>
<xsl:template match="node()|@*">
<xsl:copy>
......@@ -14,5 +14,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"/>
<xsl:template match="/html/body/div/div/div/div[@class!='mw-highlight mw-content-ltr']"/>
</xsl:stylesheet>
\ No newline at end of file
......@@ -80,6 +80,7 @@
<!-- If there is text right below the section name, copy it -->
<xsl:if test="not(following-sibling::*[1] intersect following-sibling::h3) and not(following-sibling::*[1] intersect following-sibling::h4) and not(following-sibling::*[1] intersect following-sibling::h5) and not(following-sibling::*[1] intersect following-sibling::h6)">
<div>
<!--IIICCIIII -->
<xsl:for-each select="following-sibling::* intersect following-sibling::h2[1]/preceding-sibling::*">
<xsl:if test="not(preceding-sibling::h3 intersect $currentSectionTitle/following-sibling::h3) and not($currentSectionTitle/following-sibling::h4 intersect preceding-sibling::h4) and not($currentSectionTitle/following-sibling::h5 intersect preceding-sibling::h5) and not($currentSectionTitle/following-sibling::h6 intersect preceding-sibling::h6) and not(self::h3) and not(self::h4) and not(self::h5) and not(self::h6)">
<xsl:apply-templates select="." mode="textOnly"/>
......@@ -238,6 +239,27 @@
<xsl:value-of select="."/>
</xsl:template>
<!-- Listing -->
<xsl:template match="div[@class='mw-highlight mw-content-ltr']" mode="textOnly">
<xsl:apply-templates select="pre" mode="textOnly"/>
</xsl:template>
<xsl:template match="pre" mode="textOnly">
<xsl:variable name="vUid">
<xsl:number level="any" count="pre"/>
</xsl:variable>
<object type="application/pdf" data="listing/listing{$vUid}.txt"> <!--Modifier le application/pdf lorsque le rng sera changé-->
<xsl:result-document href="listing/listing{$vUid}.txt" method="text">
<xsl:copy-of select="@*|node()"></xsl:copy-of>
</xsl:result-document>
</object>
</xsl:template>
<xsl:template match="span" mode="textOnly">
<xsl:apply-templates/>
</xsl:template>
<!-- ===== Ignored content ===== -->
<!-- Only keeping a with information: we give up page references -->
......
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