2 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:fo="http://www.w3.org/1999/XSL/Format"
6 <!-- Based on the XSL stylesheet from gtkmm - Lennart -->
8 <xsl:output method="xml" version="1.0" indent="yes"/>
10 <xsl:param name="reference_prefix">../../../doc/avahi-docs/html/</xsl:param>
12 <xsl:template match="/">
13 <book title="Avahi Reference Manual"
15 link="{$reference_prefix}main.html">
17 <sub name="Headers" link="{$reference_prefix}files.html">
18 <xsl:apply-templates select="doxygenindex/compound[@kind='file']">
19 <xsl:sort select="."/>
20 </xsl:apply-templates>
25 <!-- @todo: maybe select only the real functions, ie those with kind=="function"? -->
26 <xsl:apply-templates select="doxygenindex/compound/function" mode="as-function"/>
31 <xsl:template match="compound">
32 <xsl:param name="name"><xsl:value-of select="name"/></xsl:param>
33 <xsl:param name="link"><xsl:value-of select="@refid"/>.html</xsl:param>
34 <sub name="{$name}" link="{$reference_prefix}{$link}">
35 <xsl:apply-templates select="member" mode="as-sub">
36 <xsl:sort select="."/>
37 </xsl:apply-templates>
41 <xsl:template match="member" mode="as-function">
43 <function name="atk_set_value" link="atk-atkvalue.html#ATK-SET-VALUE"/>
45 <xsl:param name="name"><xsl:value-of select="name"/></xsl:param>
46 <!-- Link is refid attribute of parent element + "#" + diff between refid of parent and own refid -->
47 <xsl:param name="refid_parent"><xsl:value-of select="parent::node()/@refid"/></xsl:param>
48 <xsl:param name="own_refid"><xsl:value-of select="@refid"/></xsl:param>
49 <xsl:param name="offset"><xsl:value-of select="string-length($refid_parent) + 3"/></xsl:param>
50 <xsl:param name="ref_diff"><xsl:value-of select="substring($own_refid, $offset, 32)"/></xsl:param>
51 <xsl:param name="link"><xsl:value-of select="$refid_parent"/>.html#<xsl:value-of select="$ref_diff"/></xsl:param>
52 <function name="{$name}" link="{$reference_prefix}{$link}"/>
55 <xsl:template match="member" mode="as-sub">
56 <xsl:param name="name"><xsl:value-of select="name"/></xsl:param>
57 <!-- Link is refid attribute of parent element + "#" + diff between refid of parent and own refid -->
58 <xsl:param name="refid_parent"><xsl:value-of select="parent::node()/@refid"/></xsl:param>
59 <xsl:param name="own_refid"><xsl:value-of select="@refid"/></xsl:param>
60 <xsl:param name="offset"><xsl:value-of select="string-length($refid_parent) + 3"/></xsl:param>
61 <xsl:param name="ref_diff"><xsl:value-of select="substring($own_refid, $offset, 32)"/></xsl:param>
62 <xsl:param name="link"><xsl:value-of select="$refid_parent"/>.html#<xsl:value-of select="$ref_diff"/></xsl:param>
63 <sub name="{$name}" link="{$reference_prefix}{$link}"/>