Skip to content

Instantly share code, notes, and snippets.

View infotexture's full-sized avatar

Roger Sheen infotexture

View GitHub Profile
@infotexture
infotexture / numbered-headings-custom.xsl
Created April 23, 2012 21:17
DITA-OT Customization: Numbered Headings in PDF output
<?xml version='1.0' encoding='UTF-8'?>
<xsl:stylesheet version="2.0" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
Numbered Headings in PDF output per <http://tech.groups.yahoo.com/group/dita-users/message/26819>, 26827, 26828 & 26794
Template created via DITA-OT PDF plug-in generator <http://dita-generator.appspot.com/pdf-plugin> by Jarno Elovirta -->
<xsl:template match="*" mode="getTitle">
<xsl:variable name="topic" select="ancestor-or-self::*[contains(@class, &apos; topic/topic &apos;)][1]" />
<xsl:variable name="id" select="$topic/@id" />
<xsl:variable name="mapTopics" select="key(&apos;map-id&apos;, $id)" />