summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier <olivier.hallot@libreoffice.org>2016-12-25 20:54:54 -0200
committerOlivier Hallot <olivier.hallot@edx.srv.br>2016-12-25 22:57:42 +0000
commitb6d54386f19adf3a6a967ae6e24a06f5473a8dca (patch)
tree6a3eaf91f44722c746557acb5e1ce465e7c6d528
parent6f19c099aa6852d0ec0570d9f56281e7f7032f81 (diff)
HC3 tweaks
1) Add level to embedded headings 2) Add id= to paragraphs and headings Change-Id: Id6ba1fe6518295e08f99bb1f28cf59c9893d8ddd Reviewed-on: https://gerrit.libreoffice.org/32426 Reviewed-by: Olivier Hallot <olivier.hallot@edx.srv.br> Tested-by: Olivier Hallot <olivier.hallot@edx.srv.br>
-rw-r--r--source/online_transform.xsl8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/online_transform.xsl b/source/online_transform.xsl
index 3f629d7a3b..4ff8d2a26e 100644
--- a/source/online_transform.xsl
+++ b/source/online_transform.xsl
@@ -369,9 +369,10 @@
<xsl:choose>
<xsl:when test="@role='heading'"> <!-- increase the level of headings that are embedded -->
- <xsl:variable name="level"><xsl:value-of select="number(@level)+1"/></xsl:variable>
+<!-- <xsl:variable name="level"><xsl:value-of select="number(@level)+1"/></xsl:variable> -->
<xsl:call-template name="insertheading">
- <xsl:with-param name="embedded" select="'yes'"/>
+ <xsl:with-param name="embedded" select="'yes'"/>
+ <xsl:with-param name="level" select="@level"/>
</xsl:call-template>
</xsl:when>
@@ -563,7 +564,7 @@
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <p class="{$role}"><xsl:apply-templates /></p>
+ <p id="{@id}" class="{$role}"><xsl:apply-templates /></p>
</xsl:template>
<!-- Insert Basic code snippet -->
@@ -673,6 +674,7 @@
<xsl:param name="level" />
<xsl:param name="embedded" />
<xsl:element name="{concat('h',$level)}">
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
<xsl:choose>
<xsl:when test="$embedded = 'yes'">
<xsl:apply-templates mode="embedded"/>