padding: 5px 10px 5px 10px;
margin-left: 2.5em;
}
+
+a.headerlink {
+ text-decoration: none!important;
+ visibility: hidden;
+}
+
+h2:hover > a.headerlink,
+h3:hover > a.headerlink,
+h4:hover > a.headerlink,
+h5:hover > a.headerlink,
+h6:hover > a.headerlink {
+ visibility: visible;
+}
<xsl:apply-templates select="exsl:node-set($inchtml)/html:html/html:body/*" mode="content"/>
</xsl:template>
+
+ <xsl:template match="html:h2 | html:h3 | html:h4 | html:h5 | html:h6" mode="content">
+ <xsl:element name="{name()}" namespace="{namespace-uri()}">
+ <xsl:apply-templates mode="copy" />
+ <xsl:if test="./html:a/@name">
+ <a class="headerlink" href="#{html:a/@name}" title="Permalink to this headline">¶</a>
+ </xsl:if>
+ </xsl:element>
+ </xsl:template>
+
+ <xsl:template match="text()" mode="copy">
+ <xsl:value-of select="."/>
+ </xsl:template>
+
+ <xsl:template match="node()" mode="copy">
+ <xsl:element name="{name()}" namespace="{namespace-uri()}">
+ <xsl:copy-of select="./@*"/>
+ <xsl:apply-templates mode="copy" />
+ </xsl:element>
+ </xsl:template>
</xsl:stylesheet>