Commit 0995aa24 authored by Bastien FREMONDIERE's avatar Bastien FREMONDIERE
Browse files

Merge branch 'mindmapping'

parents 34894f9e 1f7ea5e7
ant -buildfile mindmapping_to_hdoc.ant -DinputPath samples/the_witcher.mm
cp temp/sect/content.xml temp/sect/content.html
......@@ -25,7 +25,8 @@
<xsl:template match="node[1]" mode="header">
<title>
<xsl:value-of select="@TEXT"/><xsl:value-of select="richcontent"></xsl:value-of>
<xsl:value-of select="@TEXT"/>
<xsl:value-of select="richcontent"/>
</title>
<meta charset="utf-8"/>
<meta name="author" content=""/>
......@@ -46,11 +47,11 @@
<!-- Behavior when node has no children -->
<xsl:template
match="node[not(node)]|node[contains(//@TEXT, '#p')]|node[contains(//@TEXT, '#a')]"
match="node[not(node)]|node[child::*[contains(@TEXT, '#p')]]|node[child::*[contains(@TEXT, '#a')]]"
priority="1">
<xd:doc xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl">
<xd:desc>
<xd:p></xd:p>
<xd:p/>
</xd:desc>
</xd:doc>
<xsl:element name="section">
......@@ -61,7 +62,7 @@
<xsl:value-of select="richcontent"/>
</h1>
</header>
<!--<xsl:apply-templates/>-->
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
......@@ -90,12 +91,13 @@
<xsl:function name="utc:string-remove-all" as="xs:string">
<xsl:param name="text" as="xs:string"/>
<xsl:param name="replace" as="xs:string"/>
<!--
<xsl:variable name="ret">
<xsl:call-template name="string-remove-all">
<xsl:with-param name="text" select="$text" />
<xsl:with-param name="replace" select="$replace" />
</xsl:call-template>-->
<xsl:value-of select="$text"/>
<xsl:with-param name="text" select="$text"/>
<xsl:with-param name="replace" select="$replace"/>
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="$ret"></xsl:value-of>
</xsl:function>
<xsl:template name="string-remove-all">
......
......@@ -57,15 +57,45 @@
</ant>
</target>
<!-- Connect this to the work of the other group about hdoc to opale (configure and call their ant etc.) -->
<target name="opale_conversion">
<!-- <condition property="converting.set" else="false"> -->
<ant antfile="${basedir}/hdoc_to_opale/hdoc_to_opale.ant" dir="${basedir}/hdoc_to_opale">
<property name="InputPath" value="${resultFile}/hdoc/${hdocName}.hdoc"/>
<property name="OutputPath" value="${resultFile}/scar/${hdocName}.scar"/>
</ant>
<target depends="ifOSWindows, ifOSUnix" name="opale_conversion"/>
<condition property="isOSUnix">
<os family="unix" />
</condition>
<condition property="isOSWindows">
<os family="windows" />
</condition>
<!-- if the OS is windows call the target run.script.windows -->
<target name="ifOSWindows" if="isOSWindows">
<echo>is Windows........</echo>
<antcall target="opale_conversion.windows"/>
</target>
<!-- if the OS is not windows call the target run.script.unix-->
<target name="ifOSUnix" if="isOSUnix">
<echo>is Unix........</echo>
<antcall target="opale_conversion.unix"/>
</target>
<target name="opale_conversion.windows">
<echo>This is a Windows machine.</echo>
<copy file="${resultFile}/hdoc/${hdocName}.hdoc" todir="${basedir}/../hdoc_to_opale/input/${hdocName}.hdoc"/>
<exec dir="." executable="cmd">
<arg value="${basedir}/../hdoc_to_opale/run.bat"/>
</exec>
<!-- <copy file="${basedir}/../hdoc_to_opale/output/output.scar" todir="${resultFile}/scar/${hdocName}.scar"/>-->
</target>
<target name="opale_conversion.unix">
<echo>This is an Unix machine.</echo>
<copy file="${resultFile}/hdoc/${hdocName}.hdoc" todir="${basedir}/../hdoc_to_opale/input/${hdocName}.hdoc"/>
<exec dir="." executable="/bin/sh">
<arg value="${basedir}/../hdoc_to_opale/run.sh"/>
</exec>
<!-- <copy file="${basedir}/../hdoc_to_opale/output/output.scar" todir="${resultFile}/scar/${hdocName}.scar"/>-->
</target>
</project>
......
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