Commit 4560bda7 authored by Decorde Jeffrey's avatar Decorde Jeffrey

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

parents e10c46c3 794dc845
......@@ -27,9 +27,9 @@
<!-- Clean : delete old files -->
<target name="clean">
<!-- delete folders -->
<!--delete dir="${UnzipSourcePath}"/-->
<!--delete dir="${TmpPath}"/-->
<!--delete dir="${HdocPath}"/-->
<delete dir="${UnzipSourcePath}"/>
<delete dir="${TmpPath}"/>
<delete dir="${HdocPath}"/>
</target>
<!-- Check if only one xml file -->
......
......@@ -12,6 +12,10 @@
xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive"
xmlns:op="utc.fr:ics/opale3">
<xsl:template match="sc:item">
<xsl:apply-templates/>
</xsl:template>
<!-- MODULE -->
<xsl:template match="op:ue">
......@@ -109,7 +113,11 @@
</header>
<!-- currently : grain & introduction & conclusion -->
<xsl:apply-templates select="./op:courseUa/child::*[name() != 'op:uM'][name() != 'sp:quest']"/>
<!-- <xsl:apply-templates select="./op:courseUa/child::*[name() != 'op:uM'][name() != 'sp:quest']"/>-->
<xsl:apply-templates select="./op:courseUa/sp:courseUc"/>
<xsl:apply-templates select="./op:courseUa/sp:intro"/>
<xsl:apply-templates select="./op:courseUa/sp:conclu"/>
<xsl:apply-templates select="./op:courseUa/sp:obj"/>
<!-- overview questions : regroup questions into a section-->
<xsl:if test="./op:courseUa/sp:quest">
......@@ -140,7 +148,8 @@
</header>
<!-- call for blocs and parts -->
<xsl:apply-templates select="./op:expUc/child::*[name() != 'op:uM']"/>
<!-- <xsl:apply-templates select="./op:expUc/child::*[name() != 'op:uM']"/>-->
<xsl:apply-templates select="./op:expUc/sp:pb/op:pb/*"/>
<footer>
<xsl:apply-templates select="./op:expUc/op:uM/sp:info/op:info/sp:keywds"/>
......@@ -186,6 +195,12 @@
</section>
</xsl:template>
<xsl:template match="sp:filtered">
<xsl:if test="op:filter/sp:exclude/text() = 'short'">
<xsl:apply-templates select="./op:res/*"/>
</xsl:if>
</xsl:template>
<!-- Overview questions (fr : question de synthèse) -->
<xsl:template match="sp:quest">
<xsl:apply-templates select="./op:txt/*"/>
......@@ -437,4 +452,6 @@
</p>
</xsl:template>
<xsl:template match="*"></xsl:template>
</xsl:stylesheet>
......@@ -7,8 +7,7 @@ Put `.scar` files in the input folder, run `run.bat` or `run.sh` and get results
Todo list
---------
- tests more files (with As We May)
- add schema validation
- tests more files
- clean output of optim source files
- resolve bugs
- test the entier process from optim to opale
......@@ -17,7 +16,8 @@ Todo list
Bugs
----
- references of sections or fragments inside a paragraphe ;
- references of sections or fragments inside a paragraphe
- can create divs with only h6
Transformation
......
......@@ -2,6 +2,11 @@
<project basedir="." name="optim_to_hdoc">
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
<taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask">
<classpath>
<pathelement location="lib/jing.jar"/>
</classpath>
</taskdef>
<property name="in" location="${basedir}/input"/>
<property name="out" location="${basedir}/output"/>
......@@ -27,7 +32,7 @@
</path>
<sequential>
<local name="archive_name"/>
<basename property="archive_name" file="@{archive}"/>
<basename property="archive_name" file="@{archive}" suffix=".scar"/>
<unzip src="@{archive}" dest="${tmp}/extract/${archive_name}"></unzip>
</sequential>
</for>
......@@ -49,7 +54,6 @@
<echo message="Convert to hdoc..."/>
<xslt basedir="${tmp}/internationalisation" destdir="${out}" style="${xsl}/optim_to_hdoc.xsl"/>
<echo message="Copy ressources files..."/>
......@@ -78,6 +82,16 @@
<fileset dir="@{folder}" includes="*.html" />
</first>
<move file="${toString:first}" tofile="@{folder}/content.xml"/>
<trycatch property="foo" reference="bar">
<try>
<jing file="@{folder}/META-INF/container.xml" rngfile="../schemas/container/hdoc1-container.rng"></jing>
<jing file="@{folder}/content.xml" rngfile="../schemas/xhtml/hdoc1-xhtml.rng"></jing>
</try>
<catch>
<echo>Validation error of hdoc output</echo>
</catch>
</trycatch>
</sequential>
</for>
......
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