From: Duncan C. <dun...@us...> - 2005-01-08 07:37:21
|
Update of /cvsroot/gtk2hs/gtk2hs/tools/apiGen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22606/tools/apiGen Modified Files: format-docs.xsl Log Message: Extend the XSLT script to extract module level documentation, the summary, description and any extra sections including program listings. The object hierarchy has not yet been added. Index: format-docs.xsl =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/tools/apiGen/format-docs.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- format-docs.xsl 6 Jan 2005 01:02:22 -0000 1.1 +++ format-docs.xsl 8 Jan 2005 07:37:11 -0000 1.2 @@ -13,7 +13,7 @@ </xsl:template> <xsl:template match="xref"> -<xref-other><xsl:value-of select="."/></xref-other> +<xref-other><xsl:value-of select="@linkend"/></xref-other> </xsl:template> <xsl:template match="emphasis"> @@ -30,6 +30,31 @@ <xsl:template match="/"> <apidoc> + <module> + <name><xsl:value-of select="/book/refentry/refnamediv/refname"/></name> + <summary><xsl:value-of select="/book/refentry/refnamediv/refpurpose"/></summary> + <description> + <xsl:for-each select="/book/refentry/refsect1[title='Description']/para"> + <para><xsl:apply-templates/></para> + </xsl:for-each> + </description> + <extra-sections> + <xsl:for-each select="/book/refentry/refsect1[title='Description']/section"> + <section> + <title><xsl:value-of select="title"/></title> + <xsl:for-each select="para | programlisting"> + <xsl:if test="name()='para'"> + <para><xsl:apply-templates/></para> + </xsl:if> + <xsl:if test="name()='programlisting'"> + <xsl:copy-of select="."/> + </xsl:if> + </xsl:for-each> + </section> + </xsl:for-each> + </extra-sections> + <object-hierarchy></object-hierarchy> + </module> <xsl:for-each select="/book/refentry/refsect1[title='Details']/refsect2[contains(title,' ()')]"> <function> <name><xsl:value-of select="indexterm/primary"/></name> |