Add doxygen_to_devhelp.xsl (from Fedora, via Debian)
[platform/upstream/dbus.git] / doc / doxygen_to_devhelp.xsl
1 <xsl:stylesheet
2     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3     xmlns:fo="http://www.w3.org/1999/XSL/Format"
4     version="1.0">
5
6 <xsl:output method="xml" version="1.0" indent="yes"/>
7
8 <xsl:param name="prefix"></xsl:param>
9
10 <xsl:template match="/">
11   <book title="D-Bus: A system for interprocess communication"
12         name="dbus"
13         link="dbus-tutorial.html">
14   <chapters>
15      <sub name="Tutorial" link="{$prefix}dbus-tutorial.html"/>
16      <sub name="FAQ" link="{$prefix}dbus-faq.html"/>
17      <sub name="Specification" link="{$prefix}dbus-specification.html"/>
18      <sub name="API Reference" link="{$prefix}api/index.html"/>
19   </chapters>
20
21   <functions>
22     <xsl:apply-templates select="doxygenindex/compound[@kind='group']/member[@kind='function']"/>
23   </functions>
24   </book>
25 </xsl:template>
26
27 <xsl:template match="member">
28   <xsl:param name="name"><xsl:value-of select="name"/></xsl:param>
29   <xsl:param name="refid"><xsl:value-of select="@refid"/></xsl:param>
30   <xsl:param name="before"><xsl:value-of select="substring-before($refid,'_1')"/></xsl:param>
31   <xsl:param name="after"><xsl:value-of select="substring-after($refid,'_1')"/></xsl:param>
32   <xsl:param name="link"><xsl:value-of select="$before"/>.html#<xsl:value-of select="$after"/></xsl:param>
33   <xsl:if test="starts-with($name,'dbus') or starts-with($name, 'DBus')">
34     <xsl:if test="starts-with($refid,'group__') and contains($refid, '_1')">
35        <function name="{$name}" link="{$prefix}api/{$link}"/>
36     </xsl:if>
37   </xsl:if>
38 </xsl:template>
39
40 </xsl:stylesheet>