Move all Doxygen-to-Docbook rules into a single transform, remove redundant rules...
authorDean Camera <dean@fourwalledcubicle.com>
Tue, 23 Apr 2013 15:08:32 +0000 (15:08 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Tue, 23 Apr 2013 15:08:32 +0000 (15:08 +0000)
LUFA/StudioIntegration/Blob/LUFA.dll
LUFA/StudioIntegration/HV1/lufa_docbook_transform.xsl
LUFA/StudioIntegration/HV1/transform_base.xsl [deleted file]

index 2a23ed6..1146cba 100644 (file)
Binary files a/LUFA/StudioIntegration/Blob/LUFA.dll and b/LUFA/StudioIntegration/Blob/LUFA.dll differ
index dbbc64b..c51944b 100644 (file)
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-       <xsl:import href="transform_base.xsl"/>
 
        <xsl:output method="xml" indent="no"/>
 
 
        <xsl:template name="generate.top.level.page">
                <xsl:param name="top.level.page"/>
+
                <chapter id="{$top.level.page/@id}">
                        <title>
                                <xsl:value-of select="$top.level.page/title"/>
                        </title>
+
                        <xsl:apply-templates select="$top.level.page/detaileddescription"/>
+
                        <xsl:for-each select="$top.level.page/innerpage">
                                <xsl:apply-templates select="ancestor::*/compounddef[@kind = 'page' and @id = current()/@refid]"/>
                        </xsl:for-each>
                </chapter>
        </xsl:template>
 
+       <xsl:template match="compounddef">
+               <!-- Discard compounddef elements unless a later template matches -->
+       </xsl:template>
+
        <xsl:template match="compounddef[@kind = 'page']">
                <section id="{@id}">
                        <title>
                                <xsl:value-of select="title"/>
                        </title>
+
                        <xsl:apply-templates select="detaileddescription"/>
+
                        <xsl:for-each select="innerpage">
                                <xsl:apply-templates select="ancestor::*/compounddef[@kind = 'page' and @id = current()/@refid]"/>
                        </xsl:for-each>
                <section id="{@id}" xreflabel="{name}">
                        <title>
                                <xsl:text>Function </xsl:text>
-                               <xsl:value-of select="name"/>
+                               <xsl:value-of select="$name"/>
                                <xsl:text>()</xsl:text>
                        </title>
 
 
                        <programlisting language="c">
                                <emphasis role="keyword">
-                                 <xsl:value-of select="type"/>
+                                       <xsl:value-of select="type"/>
                                </emphasis>
-                                               <xsl:text> </xsl:text>
+                               <xsl:text> </xsl:text>
                                <xsl:value-of select="name"/>
                                <xsl:text>(</xsl:text>
 
                                <xsl:choose>
-                                 <xsl:when test="argsstring = '(void)'">
-                                       <emphasis role="keyword">void</emphasis>
-                                 </xsl:when>
-
-                                 <xsl:otherwise>
-                                       <xsl:for-each select="param">
-                                         <xsl:if test="position() > 1">
-                                               <xsl:text>,</xsl:text>
-                                         </xsl:if>
-                                         <xsl:text>&#10;&#9;&#9;</xsl:text>
-                                         <emphasis role="keyword">
-                                               <xsl:value-of select="type"/>
-                                         </emphasis>
-                                         <xsl:text> </xsl:text>
-                                         <xsl:value-of select="declname"/>
-                                       </xsl:for-each>
-                                 </xsl:otherwise>
+                                       <xsl:when test="argsstring = '(void)'">
+                                               <emphasis role="keyword">void</emphasis>
+                                       </xsl:when>
+
+                                       <xsl:otherwise>
+                                               <xsl:for-each select="param">
+                                                       <xsl:if test="position() > 1">
+                                                               <xsl:text>,</xsl:text>
+                                                       </xsl:if>
+                                                       <xsl:text>&#10;&#9;&#9;</xsl:text>
+                                                       <emphasis role="keyword">
+                                                               <xsl:value-of select="type"/>
+                                                       </emphasis>
+                                                       <xsl:text> </xsl:text>
+                                                       <xsl:value-of select="declname"/>
+                                               </xsl:for-each>
+                                       </xsl:otherwise>
                                </xsl:choose>
 
                                <xsl:text>)</xsl:text>
                <section id="{@id}" xreflabel="{name}">
                        <title>
                                <xsl:text>Enum </xsl:text>
-                               <xsl:value-of select="name"/>
+                               <xsl:value-of select="$name"/>
                        </title>
 
                        <xsl:call-template name="generate.index.id">
                                                                <entry>
                                                                        <para id="{@id}" xreflabel="{name}">
                                                                                <xsl:value-of select="name"/>
+                                                                               <indexterm id="{$keyword.namespace}.{$name}.{name}"/>
                                                                        </para>
                                                                </entry>
                                                                <entry>
                                        </xsl:call-template>
 
                                        <programlisting language="c">
-                                       <emphasis role="keyword">
-                                               <xsl:value-of select="type"/>
-                                       </emphasis>
-                                       <xsl:text> </xsl:text>
-                                       <xsl:value-of select="name"/>
+                                               <emphasis role="keyword">
+                                                       <xsl:value-of select="type"/>
+                                               </emphasis>
+                                               <xsl:text> </xsl:text>
+                                               <xsl:value-of select="name"/>
                                        </programlisting>
                                </xsl:otherwise>
                        </xsl:choose>
        </xsl:template>
 
        <xsl:template match="linebreak">
-               <xsl:text>&#10;</xsl:text>
+               <literallayout>
+               </literallayout>
+       </xsl:template>
+
+       <xsl:template match="verbatim">
+               <programlisting>
+                       <xsl:apply-templates/>
+               </programlisting>
+       </xsl:template>
+
+       <xsl:template match="sectiondef">
+               <para>
+                       <xsl:value-of select="description"/>
+               </para>
+
+               <xsl:apply-templates select="memberdef"/>
+       </xsl:template>
+
+       <xsl:template match="simplesect" mode="struct">
+               <footnote>
+                       <xsl:apply-templates/>
+               </footnote>
+       </xsl:template>
+
+       <xsl:template match="simplesect">
+               <xsl:choose>
+                       <xsl:when test="@kind = 'warning'">
+                               <warning>
+                                       <title>Warning</title>
+                                       <xsl:apply-templates select="para"/>
+                               </warning>
+                       </xsl:when>
+
+                       <xsl:when test="@kind = 'return'">
+                               <note>
+                                       <title>Returns</title>
+                                       <xsl:apply-templates select="para"/>
+                               </note>
+                       </xsl:when>
+
+                       <xsl:when test="@kind = 'pre'">
+                               <note>
+                                       <title>Precondition</title>
+                                       <xsl:apply-templates select="para"/>
+                               </note>
+                       </xsl:when>
+
+                       <xsl:when test="@kind = 'par'">
+                               <note>
+                                       <title>
+                                               <xsl:value-of select="title"/>
+                                       </title>
+                                       <xsl:apply-templates select="para"/>
+                               </note>
+                       </xsl:when>
+
+                       <xsl:when test="@kind = 'see'">
+                               <note>
+                                       <title>See also</title>
+                                       <xsl:apply-templates select="para"/>
+                               </note>
+                       </xsl:when>
+
+                       <xsl:when test="@kind = 'note'">
+                               <note>
+                                       <title>Note</title>
+                                       <xsl:apply-templates select="para"/>
+                               </note>
+                       </xsl:when>
+
+               </xsl:choose>
+       </xsl:template>
+
+       <xsl:template match="parameterlist[@kind = 'param']">
+               <table tabstyle="striped">
+                       <title>Parameters</title>
+                       <tgroup cols="3">
+                               <thead>
+                                       <row>
+                                               <entry>Data Direction</entry>
+                                               <entry>Parameter Name</entry>
+                                               <entry>Description</entry>
+                                       </row>
+                               </thead>
+                               <tbody>
+                                       <xsl:for-each select="parameteritem">
+                                               <row>
+                                                       <xsl:apply-templates select="."/>
+                                               </row>
+                                       </xsl:for-each>
+                               </tbody>
+                       </tgroup>
+               </table>
+       </xsl:template>
+
+       <xsl:template match="parameterlist[@kind = 'retval']">
+               <table tabstyle="striped">
+                       <title>Return Values</title>
+                       <tgroup cols="2">
+                               <thead>
+                                       <row>
+                                               <entry>Return Value</entry>
+                                               <entry>Description</entry>
+                                       </row>
+                               </thead>
+                               <tbody>
+                                       <xsl:for-each select="parameteritem">
+                                               <row>
+                                                       <xsl:apply-templates select="."/>
+                                               </row>
+                                       </xsl:for-each>
+                               </tbody>
+                       </tgroup>
+               </table>
+       </xsl:template>
+
+       <xsl:template match="parameteritem">
+               <xsl:if test="parent::parameterlist/@kind = 'param'">
+                       <entry>
+                               <para>
+                                       <xsl:choose>
+                                               <xsl:when test="not(descendant::parametername/@direction)">
+                                                       <emphasis role="italic">?</emphasis>
+                                               </xsl:when>
+                                               <xsl:otherwise>
+                                                       <emphasis role="bold">
+                                                               [<xsl:value-of select="descendant::parametername/@direction"/>]
+                                                       </emphasis>
+                                               </xsl:otherwise>
+                                       </xsl:choose>
+                               </para>
+                       </entry>
+               </xsl:if>
+
+               <entry>
+                       <para>
+                               <xsl:value-of select="parameternamelist/parametername"/>
+                       </para>
+               </entry>
+
+               <entry>
+                       <xsl:apply-templates select="parameterdescription"/>
+               </entry>
+       </xsl:template>
+
+       <xsl:template match="type">
+               <xsl:apply-templates/>
+       </xsl:template>
+
+       <xsl:template match="para">
+               <para>
+                       <xsl:apply-templates/>
+               </para>
+       </xsl:template>
+
+       <xsl:template match="bold">
+               <emphasis role="bold">
+                       <xsl:value-of select="."/>
+               </emphasis>
+       </xsl:template>
+
+       <xsl:template match="emphasis">
+               <emphasis role="italic">
+                       <xsl:value-of select="."/>
+               </emphasis>
+       </xsl:template>
+
+       <xsl:template match="computeroutput">
+               <computeroutput>
+                       <xsl:value-of select="."/>
+               </computeroutput>
+       </xsl:template>
+
+       <xsl:template match="ulink">
+               <ulink url="{@url}">
+                       <xsl:value-of select="."/>
+               </ulink>
+       </xsl:template>
+
+       <xsl:template match="registered">
+               <xsl:text>&#174;</xsl:text>
+       </xsl:template>
+
+       <xsl:template match="copy">
+               <xsl:text>&#169;</xsl:text>
+       </xsl:template>
+
+       <xsl:template match="trademark">
+               <xsl:text>&#8482;</xsl:text>
+       </xsl:template>
+
+       <xsl:template match="superscript">
+               <superscript>
+                       <xsl:value-of select="."/>
+               </superscript>
+       </xsl:template>
+
+       <xsl:template match="subscript">
+               <subscript>
+                       <xsl:value-of select="."/>
+               </subscript>
+       </xsl:template>
+
+       <xsl:template match="ref">
+               <xsl:choose>
+                       <!-- Don't show links inside program listings -->
+                       <xsl:when test="ancestor::programlisting">
+                               <xsl:value-of select="."/>
+                       </xsl:when>
+
+                       <!-- Show links outside program listings -->
+                       <xsl:otherwise>
+                               <link linkend="{@refid}">
+                                       <xsl:value-of select="text()"/>
+                               </link>
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+
+       <xsl:template match="table">
+               <xsl:choose>
+                       <xsl:when test="caption">
+                               <table tabstyle="striped">
+                                       <title>
+                                               <xsl:value-of select="caption"/>
+                                       </title>
+                                       <xsl:call-template name="write.table.content"/>
+                               </table>
+                       </xsl:when>
+                       <xsl:otherwise>
+                               <informaltable tabstyle="striped">
+                                       <xsl:call-template name="write.table.content"/>
+                               </informaltable>
+                       </xsl:otherwise>
+               </xsl:choose>
+       </xsl:template>
+
+       <xsl:template name="write.table.content">
+               <tgroup cols="{@cols}">
+                       <thead>
+                               <xsl:for-each select="row[1]">
+                                       <row>
+                                               <xsl:for-each select="entry">
+                                                       <entry>
+                                                               <xsl:apply-templates select="."/>
+                                                       </entry>
+                                               </xsl:for-each>
+                                       </row>
+                               </xsl:for-each>
+                       </thead>
+                       <tbody>
+                               <xsl:for-each select="row[position() != 1]">
+                                       <row>
+                                               <xsl:for-each select="entry">
+                                                       <entry>
+                                                               <xsl:apply-templates select="."/>
+                                                       </entry>
+                                               </xsl:for-each>
+                                       </row>
+                               </xsl:for-each>
+                       </tbody>
+               </tgroup>
+       </xsl:template>
+
+       <xsl:template match="itemizedlist">
+               <itemizedlist>
+                       <xsl:apply-templates select="listitem"/>
+               </itemizedlist>
+       </xsl:template>
+
+       <xsl:template match="orderedlist">
+               <orderedlist>
+                       <xsl:apply-templates select="listitem"/>
+               </orderedlist>
+       </xsl:template>
+
+       <xsl:template match="listitem">
+               <listitem>
+                       <xsl:apply-templates/>
+               </listitem>
+       </xsl:template>
+
+       <xsl:template match="programlisting">
+               <programlisting language="c">
+                       <xsl:for-each select="codeline[position() > 1 or highlight]">
+                               <xsl:apply-templates select="."/>
+                               <xsl:text>&#10;</xsl:text>
+                       </xsl:for-each>
+               </programlisting>
+       </xsl:template>
+
+       <xsl:template match="highlight">
+               <emphasis role="{@class}">
+                       <xsl:apply-templates/>
+               </emphasis>
+       </xsl:template>
+
+       <xsl:template match="sp[ancestor::codeline]">
+               <xsl:text> </xsl:text>
        </xsl:template>
 
        <xsl:template match="image">
                        <mediaobject>
                                <imageobject>
                                        <imagedata>
-                                               <xsl:attribute name="fileref">images/<xsl:value-of select="@name"/></xsl:attribute>
+                                               <xsl:attribute name="fileref">
+                                                       <xsl:text>images/</xsl:text>
+                                                       <xsl:value-of select="@name"/>
+                                               </xsl:attribute>
                                        </imagedata>
                                </imageobject>
                        </mediaobject>
 
        <xsl:template match="title"/>
 
-       <xsl:template match="indexentry">
-               <xsl:variable name="prim">
-                       <xsl:choose>
-                               <xsl:when test="contains(primaryie, ',')">
-                                       <xsl:value-of select="normalize-space(substring-before(primaryie, ','))"/>
-                               </xsl:when>
-                               <xsl:otherwise>
-                                       <xsl:value-of select="primaryie"/>
-                               </xsl:otherwise>
-                       </xsl:choose>
-               </xsl:variable>
-
-               <xsl:variable name="sec">
-                       <xsl:choose>
-                               <xsl:when test="contains(primaryie, ',')">
-                                       <xsl:value-of select="normalize-space(substring-after(primaryie, ','))"/>
-                               </xsl:when>
-                               <xsl:when test="seondariye">
-                                       <xsl:value-of select="secondaryie"/>
-                               </xsl:when>
-                               <xsl:otherwise/>
-                       </xsl:choose>
-               </xsl:variable>
-
-               <xsl:variable name="tert">
-                       <xsl:choose>
-                               <xsl:when test="contains(primaryie, ',')">
-                                       <xsl:choose>
-                                               <xsl:when test="secondaryie">
-                                                       <xsl:value-of select="secondaryie"/>
-                                               </xsl:when>
-                                       </xsl:choose>
-                               </xsl:when>
-                               <xsl:when test="tertiaryie">
-                                       <xsl:value-of select="tertiaryie"/>
-                               </xsl:when>
-                               <xsl:otherwise/>
-                       </xsl:choose>
-               </xsl:variable>
-
-               <indexterm>
-                       <xsl:if test="@id">
-                               <xsl:attribute name="id">
-                                       <xsl:value-of select="@id"/>
-                               </xsl:attribute>
-                       </xsl:if>
-                       <xsl:if test="$prim">
-                               <primary>
-                                       <xsl:value-of select="$prim"/>
-                               </primary>
-                       </xsl:if>
-                       <xsl:if test="$sec">
-                               <secondary>
-                                       <xsl:value-of select="$sec"/>
-                               </secondary>
-                       </xsl:if>
-                       <xsl:if test="$tert">
-                               <tertiary>
-                                       <xsl:value-of select="$tert"/>
-                               </tertiary>
-                       </xsl:if>
-               </indexterm>
-       </xsl:template>
 </xsl:stylesheet>
diff --git a/LUFA/StudioIntegration/HV1/transform_base.xsl b/LUFA/StudioIntegration/HV1/transform_base.xsl
deleted file mode 100644 (file)
index 8ff3428..0000000
+++ /dev/null
@@ -1,823 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<xsl:stylesheet\r
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\r
-  xmlns:exsl="http://exslt.org/common"\r
-  extension-element-prefixes="exsl"\r
-  exclude-result-prefixes="exsl"\r
-  version="1.0">\r
-\r
-  <xsl:output\r
-    method="xml" indent="no"\r
-    doctype-public="-//OASIS//DTD DocBook XML V4.5//EN"\r
-    doctype-system="http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"/>\r
-\r
-  <xsl:template name="write.api.overview.contents">\r
-\r
-      <xsl:if test="count(ancestor::*/sectiondef[memberdef/@kind = 'variable' or memberdef/@kind = 'typedef']) > 0">\r
-        <section>\r
-          <title>Variable and Type Definitions</title>\r
-\r
-          <xsl:for-each select="ancestor::*/sectiondef[memberdef/@kind = 'variable' or memberdef/@kind = 'typedef']">\r
-            <section>\r
-              <title>\r
-                <xsl:value-of select="header"/>\r
-              </title>\r
-\r
-              <xsl:apply-templates select="description"/>\r
-              <xsl:apply-templates select="memberdef[@kind = 'variable' or @kind = 'typedef']"/>\r
-            </section>\r
-          </xsl:for-each>\r
-        </section>\r
-      </xsl:if>\r
-\r
-      <xsl:if test="count(ancestor::*/innerclass) > 0">\r
-        <section>\r
-          <title>Structure Definitions</title>\r
-\r
-          <xsl:for-each select="ancestor::*/innerclass">\r
-            <xsl:apply-templates select="ancestor::*/compounddef[@id = current()/@refid]"/>\r
-          </xsl:for-each>\r
-        </section>\r
-      </xsl:if>\r
-\r
-      <xsl:if test="count(ancestor::*/sectiondef[memberdef/@kind = 'define']) > 0">\r
-        <section>\r
-          <title>Macro Definitions</title>\r
-\r
-          <xsl:for-each select="ancestor::*/sectiondef[memberdef/@kind = 'define']">\r
-            <section>\r
-              <title>\r
-                <xsl:value-of select="header"/>\r
-              </title>\r
-\r
-              <xsl:apply-templates select="description"/>\r
-              <xsl:apply-templates select="memberdef[@kind = 'define']"/>\r
-            </section>\r
-          </xsl:for-each>\r
-        </section>\r
-      </xsl:if>\r
-\r
-      <xsl:if test="count(ancestor::*/sectiondef[memberdef/@kind = 'function']) > 0">\r
-        <section>\r
-          <title>Function Definitions</title>\r
-\r
-          <xsl:for-each select="ancestor::*/sectiondef[memberdef/@kind = 'function']">\r
-            <section>\r
-              <title>\r
-                <xsl:value-of select="header"/>\r
-              </title>\r
-\r
-              <xsl:apply-templates select="description"/>\r
-              <xsl:apply-templates select="memberdef[@kind = 'function']"/>\r
-            </section>\r
-          </xsl:for-each>\r
-        </section>\r
-      </xsl:if>\r
-\r
-      <xsl:if test="count(ancestor::*/sectiondef[@kind = 'enum']) > 0">\r
-        <section>\r
-          <title>Enumeration Definitions</title>\r
-\r
-          <xsl:apply-templates select="ancestor::*/sectiondef[@kind = 'enum']"/>\r
-        </section>\r
-      </xsl:if>\r
-\r
-  </xsl:template>\r
-\r
-  <xsl:template match="compounddef">\r
-    <!-- Discard compounddef elements unless a later template matches -->\r
-  </xsl:template>\r
-\r
-  <xsl:template match="compounddef[@kind = 'struct' or @kind = 'union']">\r
-    <section id="{@id}" xreflabel="{compoundname}">\r
-      <title>\r
-        <xsl:choose>\r
-          <xsl:when test="@kind = 'struct'">\r
-            <xsl:text>Struct </xsl:text>\r
-          </xsl:when>\r
-          <xsl:when test="@kind = 'union'">\r
-            <xsl:text>Union </xsl:text>\r
-          </xsl:when>\r
-        </xsl:choose>\r
-\r
-        <xsl:value-of select="compoundname"/>\r
-      </title>\r
-\r
-      <xsl:apply-templates select="detaileddescription"/>\r
-\r
-      <xsl:for-each select="sectiondef[@kind = 'public-attrib']">\r
-        <table tabstyle="striped">\r
-          <title>Members</title>\r
-\r
-          <tgroup cols="3">\r
-            <thead>\r
-              <row>\r
-                <entry>Type</entry>\r
-                <entry>Name</entry>\r
-                <entry>Description</entry>\r
-              </row>\r
-            </thead>\r
-            <tbody>\r
-              <xsl:for-each select="memberdef">\r
-                <row id="{@id}" xreflabel="{name}">\r
-                  <entry>\r
-                    <xsl:apply-templates select="type"/>\r
-                  </entry>\r
-                  <entry>\r
-                    <xsl:value-of select="name"/>\r
-                    <xsl:if test="starts-with(argsstring, '[')">\r
-                      <xsl:text>[]</xsl:text>\r
-                    </xsl:if>\r
-                  </entry>\r
-                  <entry>\r
-                    <xsl:apply-templates select="detaileddescription" mode="struct"/>\r
-                  </entry>\r
-                </row>\r
-              </xsl:for-each>\r
-            </tbody>\r
-          </tgroup>\r
-        </table>\r
-        <para>&#xa0;</para>\r
-      </xsl:for-each>\r
-    </section>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="memberdef[@kind = 'function']">\r
-    <section id="{@id}" xreflabel="{name}">\r
-      <title> Function <xsl:value-of select="name"/>() </title>\r
-\r
-      <para>\r
-        <emphasis role="italic">\r
-          <xsl:value-of select="briefdescription"/>\r
-        </emphasis>\r
-      </para>\r
-\r
-      <programlisting language="c">\r
-        <emphasis role="keyword">\r
-          <xsl:value-of select="type"/>\r
-        </emphasis>\r
-        <xsl:text> </xsl:text>\r
-        <xsl:value-of select="name"/>\r
-        <xsl:text>(</xsl:text>\r
-\r
-        <xsl:choose>\r
-          <xsl:when test="argsstring = '(void)'">\r
-            <emphasis role="keyword">void</emphasis>\r
-          </xsl:when>\r
-\r
-          <xsl:otherwise>\r
-            <xsl:for-each select="param">\r
-              <xsl:if test="position() > 1">\r
-                <xsl:text>,</xsl:text>\r
-              </xsl:if>\r
-              <xsl:text>&#10;&#9;&#9;</xsl:text>\r
-              <emphasis role="keyword">\r
-                <xsl:value-of select="type"/>\r
-              </emphasis>\r
-              <xsl:text> </xsl:text>\r
-              <xsl:value-of select="declname"/>\r
-            </xsl:for-each>\r
-          </xsl:otherwise>\r
-        </xsl:choose>\r
-\r
-        <xsl:text>)</xsl:text>\r
-      </programlisting>\r
-\r
-      <xsl:apply-templates select="detaileddescription"/>\r
-\r
-      <para>&#xa0;</para>\r
-    </section>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="memberdef[@kind = 'enum']">\r
-    <section id="{@id}" xreflabel="{name}">\r
-      <title> Enum <xsl:value-of select="name"/> </title>\r
-\r
-      <xsl:apply-templates select="detaileddescription"/>\r
-\r
-      <table tabstyle="striped">\r
-        <title>Members</title>\r
-        <tgroup cols="2">\r
-          <thead>\r
-            <row>\r
-              <entry>Enum value</entry>\r
-              <entry>Description</entry>\r
-            </row>\r
-          </thead>\r
-          <tbody>\r
-            <xsl:for-each select="enumvalue">\r
-              <row>\r
-                <entry>\r
-                  <para id="{@id}" xreflabel="{name}">\r
-                    <xsl:value-of select="name"/>\r
-                  </para>\r
-                </entry>\r
-                <entry>\r
-                  <xsl:apply-templates select="detaileddescription"/>\r
-                </entry>\r
-              </row>\r
-            </xsl:for-each>\r
-          </tbody>\r
-        </tgroup>\r
-      </table>\r
-\r
-      <para>&#xa0;</para>\r
-    </section>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="memberdef[@kind = 'define']">\r
-    <section id="{@id}" xreflabel="{name}">\r
-      <title> Macro <xsl:value-of select="name"/> </title>\r
-\r
-      <programlisting language="c">\r
-        <emphasis role="preprocessor">\r
-          <xsl:text>#define </xsl:text>\r
-          <xsl:value-of select="name"/>\r
-          <xsl:if test="count(param) > 0">\r
-            <xsl:text>(</xsl:text>\r
-            <xsl:for-each select="param/defname">\r
-              <xsl:if test="position() > 1">\r
-                <xsl:text>, </xsl:text>\r
-              </xsl:if>\r
-              <xsl:value-of select="."/>\r
-            </xsl:for-each>\r
-            <xsl:text>)</xsl:text>\r
-          </xsl:if>\r
-          <xsl:text> </xsl:text>\r
-\r
-          <!-- Split long macro definitions across multiple lines -->\r
-          <xsl:if test="(string-length(initializer) > 50) or (count(param) > 0)">\r
-            <xsl:text>\&#10;&#09;&#9;</xsl:text>\r
-          </xsl:if>\r
-\r
-          <xsl:value-of select="initializer"/>\r
-        </emphasis>\r
-        <xsl:text> </xsl:text>\r
-      </programlisting>\r
-\r
-      <xsl:apply-templates select="detaileddescription"/>\r
-\r
-      <para>&#xa0;</para>\r
-    </section>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="memberdef[@kind = 'variable' or @kind = 'typedef']">\r
-    <section id="{@id}" xreflabel="{name}">\r
-      <!-- Doxygen gets confused and thinks function pointer type definitions\r
-           are variables, so we need to map them to this common section and\r
-           check the definition to see which of the two it is. -->\r
-      <xsl:choose>\r
-        <xsl:when test="contains(definition,'typedef')">\r
-          <title> Type <xsl:value-of select="name"/></title>\r
-\r
-          <programlisting language="c">\r
-            <emphasis role="keyword">\r
-              <xsl:text>typedef </xsl:text>\r
-              <xsl:value-of select="type"/>\r
-            </emphasis>\r
-            <xsl:text> </xsl:text>\r
-            <xsl:value-of select="name"/>\r
-            <xsl:text> </xsl:text>\r
-            <xsl:value-of select="argsstring"/>\r
-          </programlisting>\r
-        </xsl:when>\r
-\r
-        <xsl:otherwise>\r
-          <title> Variable <xsl:value-of select="name"/></title>\r
-\r
-          <programlisting language="c">\r
-            <emphasis role="keyword">\r
-              <xsl:value-of select="type"/>\r
-            </emphasis>\r
-            <xsl:text> </xsl:text>\r
-            <xsl:value-of select="name"/>\r
-          </programlisting>\r
-        </xsl:otherwise>\r
-      </xsl:choose>\r
-\r
-      <xsl:apply-templates select="detaileddescription"/>\r
-\r
-      <para>&#xa0;</para>\r
-    </section>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="sectiondef">\r
-    <para>\r
-      <xsl:value-of select="description"/>\r
-    </para>\r
-\r
-    <xsl:apply-templates select="memberdef"/>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="simplesect" mode="struct">\r
-    <footnote>\r
-      <xsl:apply-templates/>\r
-    </footnote>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="simplesect">\r
-    <xsl:choose>\r
-      <xsl:when test="@kind = 'warning'">\r
-        <warning>\r
-          <title>Warning</title>\r
-          <xsl:apply-templates select="para"/>\r
-        </warning>\r
-      </xsl:when>\r
-\r
-      <xsl:when test="@kind = 'return'">\r
-        <note>\r
-          <title>Returns</title>\r
-          <xsl:apply-templates select="para"/>\r
-        </note>\r
-      </xsl:when>\r
-\r
-      <xsl:when test="@kind = 'pre'">\r
-        <note>\r
-          <title>Precondition</title>\r
-          <xsl:apply-templates select="para"/>\r
-        </note>\r
-      </xsl:when>\r
-\r
-      <xsl:when test="@kind = 'par'">\r
-        <note>\r
-          <title>\r
-            <xsl:value-of select="title"/>\r
-          </title>\r
-          <xsl:apply-templates select="para"/>\r
-        </note>\r
-      </xsl:when>\r
-\r
-      <xsl:when test="@kind = 'see'">\r
-        <note>\r
-          <title>See also</title>\r
-          <xsl:apply-templates select="para"/>\r
-        </note>\r
-      </xsl:when>\r
-\r
-      <xsl:when test="@kind = 'note'">\r
-        <!-- Notes can have special prefix keywords to transform them into\r
-             special styles for training documents ("AlfonsoNotes(TM)") -->\r
-        <xsl:variable name="note.prefix" select="substring-before(para[1]/text(), ' ')"/>\r
-\r
-        <note>\r
-          <xsl:choose>\r
-            <xsl:when test="$note.prefix = 'TODO:'">\r
-              <xsl:attribute name="role">todo</xsl:attribute>\r
-              <title>To Do</title>\r
-            </xsl:when>\r
-\r
-            <xsl:when test="$note.prefix = 'TIPS:'">\r
-              <xsl:attribute name="role">tips</xsl:attribute>\r
-              <title>Tip</title>\r
-            </xsl:when>\r
-\r
-            <xsl:when test="$note.prefix = 'INFO:'">\r
-              <xsl:attribute name="role">info</xsl:attribute>\r
-              <title>Info</title>\r
-            </xsl:when>\r
-\r
-            <xsl:when test="$note.prefix = 'RESULT:'">\r
-              <xsl:attribute name="role">result</xsl:attribute>\r
-              <title>Result</title>\r
-            </xsl:when>\r
-\r
-            <xsl:when test="$note.prefix = 'EXECUTE:'">\r
-              <xsl:attribute name="role">execute</xsl:attribute>\r
-              <title>Execute</title>\r
-            </xsl:when>\r
-\r
-            <xsl:when test="$note.prefix = 'WARNING:'">\r
-              <xsl:attribute name="role">warning</xsl:attribute>\r
-              <title>Warning</title>\r
-            </xsl:when>\r
-\r
-            <xsl:otherwise/>\r
-          </xsl:choose>\r
-\r
-          <xsl:apply-templates select="para"/>\r
-        </note>\r
-      </xsl:when>\r
-\r
-    </xsl:choose>\r
-  </xsl:template>\r
-\r
-  <!-- Strip off the special note type prefix from the special training document\r
-       style notes ("AlfonsoNotes(TM)") if one is present. -->\r
-  <xsl:template match="para[parent::simplesect/@kind='note']/text()">\r
-    <xsl:variable name="note.prefix" select="substring-before(., ' ')"/>\r
-    <xsl:variable name="note.content" select="substring-after(., ' ')"/>\r
-\r
-    <xsl:choose>\r
-      <xsl:when test="$note.prefix = 'TODO:'">\r
-        <xsl:value-of select="$note.content"/>\r
-      </xsl:when>\r
-\r
-      <xsl:when test="$note.prefix = 'TIPS:'">\r
-        <xsl:value-of select="$note.content"/>\r
-      </xsl:when>\r
-\r
-      <xsl:when test="$note.prefix = 'INFO:'">\r
-        <xsl:value-of select="$note.content"/>\r
-      </xsl:when>\r
-\r
-      <xsl:when test="$note.prefix = 'RESULT:'">\r
-        <xsl:value-of select="$note.content"/>\r
-      </xsl:when>\r
-\r
-      <xsl:when test="$note.prefix = 'EXECUTE:'">\r
-        <xsl:value-of select="$note.content"/>\r
-      </xsl:when>\r
-\r
-      <xsl:when test="$note.prefix = 'WARNING:'">\r
-        <xsl:value-of select="$note.content"/>\r
-      </xsl:when>\r
-\r
-      <xsl:otherwise>\r
-        <xsl:value-of select="."/>\r
-      </xsl:otherwise>\r
-    </xsl:choose>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="parameterlist[@kind = 'param']">\r
-    <table tabstyle="striped">\r
-      <title>Parameters</title>\r
-      <tgroup cols="3">\r
-        <thead>\r
-          <row>\r
-            <entry>Data direction</entry>\r
-            <entry>Parameter name</entry>\r
-            <entry>Description</entry>\r
-          </row>\r
-        </thead>\r
-        <tbody>\r
-          <xsl:for-each select="parameteritem">\r
-            <row>\r
-              <xsl:apply-templates select="."/>\r
-            </row>\r
-          </xsl:for-each>\r
-        </tbody>\r
-      </tgroup>\r
-    </table>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="parameterlist[@kind = 'retval']">\r
-    <table tabstyle="striped">\r
-      <title>Return Values</title>\r
-      <tgroup cols="2">\r
-        <thead>\r
-          <row>\r
-            <entry>Return value</entry>\r
-            <entry>Description</entry>\r
-          </row>\r
-        </thead>\r
-        <tbody>\r
-          <xsl:for-each select="parameteritem">\r
-            <row>\r
-              <xsl:apply-templates select="."/>\r
-            </row>\r
-          </xsl:for-each>\r
-        </tbody>\r
-      </tgroup>\r
-    </table>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="parameteritem">\r
-    <xsl:if test="parent::parameterlist/@kind = 'param'">\r
-      <entry>\r
-        <para>\r
-          <xsl:choose>\r
-            <xsl:when test="not(descendant::parametername/@direction)">\r
-              <emphasis role="italic">?</emphasis>\r
-            </xsl:when>\r
-            <xsl:otherwise>\r
-              <emphasis role="bold">[<xsl:value-of select="descendant::parametername/@direction"/>]</emphasis>\r
-            </xsl:otherwise>\r
-          </xsl:choose>\r
-        </para>\r
-      </entry>\r
-    </xsl:if>\r
-\r
-    <entry>\r
-      <para>\r
-        <xsl:value-of select="parameternamelist/parametername"/>\r
-      </para>\r
-    </entry>\r
-\r
-    <entry>\r
-      <xsl:apply-templates select="parameterdescription"/>\r
-    </entry>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="type">\r
-    <xsl:apply-templates/>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="sect1">\r
-    <section id="{@id}" xreflabel="{title}">\r
-      <title>\r
-        <xsl:value-of select="title"/>\r
-      </title>\r
-\r
-      <xsl:apply-templates select="para"/>\r
-      <xsl:apply-templates select="sect2"/>\r
-    </section>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="sect2">\r
-    <section id="{@id}" xreflabel="{title}">\r
-      <title>\r
-        <xsl:value-of select="title"/>\r
-      </title>\r
-\r
-      <xsl:apply-templates select="para"/>\r
-      <xsl:apply-templates select="sect3"/>\r
-    </section>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="sect3">\r
-    <section id="{@id}" xreflabel="{title}">\r
-      <title>\r
-        <xsl:value-of select="title"/>\r
-      </title>\r
-\r
-      <xsl:apply-templates select="para"/>\r
-    </section>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="detaileddescription">\r
-    <xsl:apply-templates select="para"/>\r
-    <xsl:apply-templates select="sect1"/>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="para">\r
-    <para>\r
-      <xsl:apply-templates/>\r
-    </para>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="bold">\r
-    <emphasis role="bold">\r
-      <xsl:value-of select="."/>\r
-    </emphasis>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="emphasis">\r
-    <emphasis role="italic">\r
-      <xsl:value-of select="."/>\r
-    </emphasis>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="computeroutput">\r
-    <computeroutput>\r
-      <xsl:value-of select="."/>\r
-    </computeroutput>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="ulink">\r
-    <ulink url="{@url}">\r
-      <xsl:value-of select="."/>\r
-    </ulink>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="registered">\r
-    <xsl:text>&#174;</xsl:text>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="copy">\r
-    <xsl:text>&#169;</xsl:text>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="trademark">\r
-    <xsl:text>&#8482;</xsl:text>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="superscript">\r
-    <superscript>\r
-      <xsl:value-of select="."/>\r
-    </superscript>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="subscript">\r
-    <subscript>\r
-      <xsl:value-of select="."/>\r
-    </subscript>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="ref">\r
-    <xsl:choose>\r
-      <!-- Don't show links inside program listings -->\r
-      <xsl:when test="ancestor::programlisting">\r
-        <xsl:value-of select="."/>\r
-      </xsl:when>\r
-\r
-      <!-- Show links outside program listings -->\r
-      <xsl:otherwise>\r
-        <xsl:choose>\r
-          <!-- Use hard links for anchors to make the reference\r
-               look correct for figure and table references -->\r
-          <xsl:when test="//anchor[@id = current()/@refid]">\r
-            <xref linkend="{@refid}" xrefstyle="select: label title"/>\r
-          </xsl:when>\r
-          <xsl:otherwise>\r
-            <link linkend="{@refid}">\r
-              <xsl:value-of select="text()"/>\r
-            </link>\r
-          </xsl:otherwise>\r
-        </xsl:choose>\r
-      </xsl:otherwise>\r
-    </xsl:choose>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="formula">\r
-    <equation>\r
-      <!-- LaTeX equation generation requires JLatexMath and its associated\r
-           FOP plugin, or you will get missing equations in the output -->\r
-      <latex align="center" xmlns="http://forge.scilab.org/p/jlatexmath">\r
-        <xsl:value-of select="."/>\r
-      </latex>\r
-    </equation>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="table">\r
-    <xsl:choose>\r
-      <xsl:when test="caption">\r
-        <!-- Fetch the ID using a preceding doxygen \anchor to be\r
-             able to reference tables -->\r
-        <table tabstyle="striped" id="{preceding-sibling::anchor[last()]/@id}">\r
-          <title>\r
-            <xsl:value-of select="caption"/>\r
-          </title>\r
-          <xsl:call-template name="write.table.content"/>\r
-        </table>\r
-      </xsl:when>\r
-      <xsl:otherwise>\r
-        <informaltable tabstyle="striped">\r
-          <xsl:call-template name="write.table.content"/>\r
-        </informaltable>\r
-      </xsl:otherwise>\r
-    </xsl:choose>\r
-  </xsl:template>\r
-\r
-  <xsl:template name="write.table.content">\r
-    <tgroup cols="{@cols}">\r
-      <thead>\r
-        <xsl:for-each select="row[1]">\r
-          <row>\r
-            <xsl:for-each select="entry">\r
-              <entry>\r
-                <xsl:apply-templates select="."/>\r
-              </entry>\r
-            </xsl:for-each>\r
-          </row>\r
-        </xsl:for-each>\r
-      </thead>\r
-      <tbody>\r
-        <xsl:for-each select="row[position() != 1]">\r
-          <row>\r
-            <xsl:for-each select="entry">\r
-              <entry>\r
-                <xsl:apply-templates select="."/>\r
-              </entry>\r
-            </xsl:for-each>\r
-          </row>\r
-        </xsl:for-each>\r
-      </tbody>\r
-    </tgroup>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="itemizedlist">\r
-    <itemizedlist>\r
-      <xsl:apply-templates select="listitem"/>\r
-    </itemizedlist>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="orderedlist">\r
-    <orderedlist>\r
-      <xsl:apply-templates select="listitem"/>\r
-    </orderedlist>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="listitem">\r
-    <listitem>\r
-      <xsl:apply-templates/>\r
-    </listitem>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="programlisting">\r
-    <programlisting language="c">\r
-      <!-- Only allow really long code segments to split across pages -->\r
-      <xsl:if test="count(codeline) > 30">\r
-        <xsl:processing-instruction name="dbfo">keep-together="auto"</xsl:processing-instruction>\r
-      </xsl:if>\r
-\r
-      <xsl:for-each select="codeline[position() > 1 or highlight]">\r
-        <xsl:apply-templates select="."/>\r
-        <xsl:text>&#10;</xsl:text>\r
-      </xsl:for-each>\r
-    </programlisting>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="highlight">\r
-    <emphasis role="{@class}">\r
-      <xsl:apply-templates/>\r
-    </emphasis>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="sp[ancestor::codeline]">\r
-    <xsl:choose>\r
-      <!-- Need to check if this is the first part of the line - if so we may\r
-           need to strip off any leading <sp/> element indentation -->\r
-      <xsl:when test="count(../preceding-sibling::highlight) = 0">\r
-        <!-- Doxygen retains a level of indentation in some code fragments - obtain\r
-             the base indentation level by counting the leading <sp/> elements of the\r
-             first code line, and use that to remove the indentation on the rest -->\r
-        <xsl:variable name="leading.spaces" select="count(ancestor::programlisting/codeline[highlight][1]/highlight[1]/sp[not(preceding-sibling::text())])"/>\r
-\r
-        <xsl:if test="position() > $leading.spaces">\r
-          <xsl:text> </xsl:text>\r
-        </xsl:if>\r
-      </xsl:when>\r
-\r
-      <xsl:otherwise>\r
-        <xsl:text> </xsl:text>\r
-      </xsl:otherwise>\r
-    </xsl:choose>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="image">\r
-    <!-- Fetch the ID using a preceding doxygen \anchor to be\r
-         able to reference figures -->\r
-    <figure id="{preceding-sibling::anchor[last()]/@id}">\r
-      <title>\r
-        <xsl:value-of select="."/>\r
-      </title>\r
-\r
-      <mediaobject>\r
-        <imageobject>\r
-          <imagedata scalefit="1" width="{@width}">\r
-            <xsl:attribute name="fileref">\r
-              <xsl:text>html/</xsl:text>\r
-              <xsl:value-of select="@name"/>\r
-            </xsl:attribute>\r
-          </imagedata>\r
-        </imageobject>\r
-      </mediaobject>\r
-    </figure>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="anchor">\r
-    <!-- Remove anchors from the PDF output, as these are used for referencing\r
-         images and tables. -->\r
-  </xsl:template>\r
-\r
-  <xsl:template match="dot">\r
-    <!-- Fetch the ID using a preceding doxygen \anchor to be able to reference\r
-         figures -->\r
-    <xsl:variable name="dot.id" select="preceding-sibling::anchor[last()]/@id" />\r
-\r
-    <xsl:choose>\r
-      <!-- If the DOT graph has an ID, use that for the filename -->\r
-      <xsl:when test="$dot.id">\r
-        <xsl:call-template name="write.dot.content">\r
-          <xsl:with-param name="dot.filename" select="$dot.id"/>\r
-          <xsl:with-param name="dot.id" select="$dot.id"/>\r
-        </xsl:call-template>\r
-      </xsl:when>\r
-\r
-      <!-- Otherwise use the auto-generated ID for it in the document -->\r
-      <xsl:otherwise>\r
-        <xsl:call-template name="write.dot.content"/>\r
-      </xsl:otherwise>\r
-    </xsl:choose>\r
-  </xsl:template>\r
-\r
-  <xsl:template name="write.dot.content">\r
-    <xsl:param name="dot.filename" select="generate-id(.)"/>\r
-    <xsl:param name="dot.id" select="''"/>\r
-\r
-    <!-- We get raw DOT syntax rather than a rendered image: write the DOT code\r
-         to a external file, and make a image reference to a SVG version of that\r
-         file. The build system should then call dot to render all generated\r
-         DOT files into their SVG equivalents before rendering the PDF. -->\r
-    <exsl:document href="{$dot.filename}.dot" method="text">\r
-      <xsl:value-of select="." />\r
-    </exsl:document>\r
-\r
-    <figure id="{$dot.id}">\r
-      <title>\r
-        <xsl:value-of select="ancestor::*/title"/>\r
-      </title>\r
-      <mediaobject>\r
-        <imageobject>\r
-          <imagedata format="SVG">\r
-            <xsl:attribute name="fileref">\r
-                <xsl:value-of select="$dot.filename" />\r
-                <xsl:text>.svg</xsl:text>\r
-            </xsl:attribute>\r
-          </imagedata>\r
-        </imageobject>\r
-      </mediaobject>\r
-    </figure>\r
-  </xsl:template>\r
-\r
-</xsl:stylesheet>\r