Commit 1a3ea405 authored by Hachem Rihab's avatar Hachem Rihab

[hdoc_to_optim] numbered sections

parent 2e02c1e8
This diff is collapsed.
......@@ -91,7 +91,7 @@
<xsl:template match="h:body/h:section">
<xsl:variable name="chapi" select="(.//text())[1]"/>
<xsl:message><xsl:value-of select="$chapi"/></xsl:message>
<xsl:variable name="chap">
<xsl:variable name="chap-norm">
<xsl:choose>
<xsl:when test="contains($chapi,':')">
<xsl:message>Yescontiiii!</xsl:message>
......@@ -100,11 +100,19 @@
<xsl:otherwise><xsl:value-of select="normalize-space($chapi)"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:message><xsl:value-of select="$chap"/></xsl:message>
<xsl:message><xsl:value-of select="$chap-norm"/></xsl:message>
<xsl:message>test</xsl:message>
<sp:slide sc:refUri="slides/{$chap}.section">
<xsl:variable name="secNum">
<xsl:number count="h:body/h:section" format="1" level="any"/>
</xsl:variable>
<xsl:variable name="chap-num">
<xsl:value-of select="concat($secNum,'-',$chap-norm)"/>
</xsl:variable>
<sp:slide sc:refUri="slides/{$chap-num}.section">
<xsl:call-template name="sec-body1">
<xsl:with-param name="chap" select = "$chap" />
<xsl:with-param name="chap" select = "$chap-num" />
</xsl:call-template>
</sp:slide>
</xsl:template>
......
......@@ -91,7 +91,7 @@
<xsl:template match="h:body/h:section">
<xsl:variable name="chapi" select="(.//text())[1]"/>
<xsl:message><xsl:value-of select="$chapi"/></xsl:message>
<xsl:variable name="chap">
<xsl:variable name="chap-norm">
<xsl:choose>
<xsl:when test="contains($chapi,':')">
<xsl:message>Yescontiiii!</xsl:message>
......@@ -100,14 +100,23 @@
<xsl:otherwise><xsl:value-of select="normalize-space($chapi)"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:message><xsl:value-of select="$chap"/></xsl:message>
<xsl:message><xsl:value-of select="$chap-norm"/></xsl:message>
<xsl:message>test</xsl:message>
<sp:page sc:refUri="pages/{$chap}.section">
<xsl:variable name="secNum">
<xsl:number count="h:body/h:section" format="1" level="any"/>
</xsl:variable>
<xsl:variable name="chap-num">
<xsl:value-of select="concat($secNum,'-',$chap-norm)"/>
</xsl:variable>
<sp:page sc:refUri="pages/{$chap-num}.section">
<of:filter/>
<xsl:call-template name="sec-body1">
<xsl:with-param name="chap" select = "$chap" />
<xsl:with-param name="chap" select = "$chap-num" />
</xsl:call-template>
</sp:page>
</xsl:template>
<xsl:template match="h:section">
......
......@@ -86,11 +86,17 @@
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="h:body/h:section[1]" priority="2">
<sp:main>
<xsl:call-template name="sec-body"/>
</sp:main>
</xsl:template>
<!--hdoc sections can become chapters or sections in Optim, we must differentiate the two-->
<xsl:template match="h:body/h:section">
<xsl:variable name="chapi" select="(.//text())[1]"/>
<xsl:message><xsl:value-of select="$chapi"/></xsl:message>
<xsl:variable name="chap">
<xsl:variable name="chap-norm">
<xsl:choose>
<xsl:when test="contains($chapi,':')">
<xsl:message>Yescontiiii!</xsl:message>
......@@ -99,21 +105,23 @@
<xsl:otherwise><xsl:value-of select="normalize-space($chapi)"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:message><xsl:value-of select="$chap"/></xsl:message>
<xsl:message><xsl:value-of select="$chap-norm"/></xsl:message>
<xsl:message>test</xsl:message>
<sp:subPage sc:refUri="pages/{$chap}.section">
<xsl:variable name="secNum">
<xsl:number count="h:body/h:section" format="1" level="any"/>
</xsl:variable>
<xsl:variable name="chap-num">
<xsl:value-of select="concat($secNum,'-',$chap-norm)"/>
</xsl:variable>
<sp:subPage sc:refUri="pages/{$chap-num}.section">
<of:filter/>
<xsl:call-template name="sec-body1">
<xsl:with-param name="chap" select = "$chap" />
<xsl:with-param name="chap" select = "$chap-num" />
</xsl:call-template>
</sp:subPage>
</xsl:template>
<xsl:template match="h:body/h:section[1]">
<sp:main>
<xsl:call-template name="sec-body"/>
</sp:main>
</xsl:template>
<xsl:template match="h:section">
<sp:sec>
......
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