From 98250ff6ab728b1ea9fd1905a6c4e84471385f16 Mon Sep 17 00:00:00 2001 From: g0dil <g0dil@wiback.org> Date: Tue, 30 Jan 2007 23:35:40 +0000 Subject: [PATCH] Fix parameter formating --- doclib/html-munge.xsl | 55 +++++++++++++++++++++---------------------- doclib/senf.css | 4 ++++ 2 files changed, 31 insertions(+), 28 deletions(-) diff --git a/doclib/html-munge.xsl b/doclib/html-munge.xsl index 241bc8b86..ce977f40b 100644 --- a/doclib/html-munge.xsl +++ b/doclib/html-munge.xsl @@ -2,46 +2,45 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> - <xsl:output method="html" encoding="html" /> - - <xsl:template match="/"> - <html> - <body bgcolor="#FFFFFF"> - <xsl:apply-templates/> - </body> - </html> - </xsl:template> - - <xsl:template match="dl[dt/b/a/text()='Bug:']"> + <xsl:output method="html" encoding="html"/> + + <xsl:template name="add-class"> + <xsl:param name="class"/> <xsl:copy> <xsl:for-each select="@*"><xsl:copy/></xsl:for-each> - <xsl:attribute name="class">xref-bug</xsl:attribute> + <xsl:attribute name="class"><xsl:value-of select="$class"/></xsl:attribute> <xsl:apply-templates/> </xsl:copy> </xsl:template> - <xsl:template match="dl[dt/b/a/text()='Fixme:']"> - <xsl:copy> - <xsl:for-each select="@*"><xsl:copy/></xsl:for-each> - <xsl:attribute name="class">xref-fixme</xsl:attribute> - <xsl:apply-templates/> - </xsl:copy> + <xsl:template match="dl[dt/b/a/text()='Bug:']"> + <xsl:call-template name="add-class"> + <xsl:with-param name="class">xref-bug</xsl:with-param> + </xsl:call-template> + </xsl:template> + + <xsl:template match="dl[dt/b/a/text()='Fix:']"> + <xsl:call-template name="add-class"> + <xsl:with-param name="class">xref-fix</xsl:with-param> + </xsl:call-template> </xsl:template> <xsl:template match="dl[dt/b/a/text()='Todo:']"> - <xsl:copy> - <xsl:for-each select="@*"><xsl:copy/></xsl:for-each> - <xsl:attribute name="class">xref-todo</xsl:attribute> - <xsl:apply-templates/> - </xsl:copy> + <xsl:call-template name="add-class"> + <xsl:with-param name="class">xref-todo</xsl:with-param> + </xsl:call-template> </xsl:template> <xsl:template match="dl[dt/b/a/text()='Idea:']"> - <xsl:copy> - <xsl:for-each select="@*"><xsl:copy/></xsl:for-each> - <xsl:attribute name="class">xref-idea</xsl:attribute> - <xsl:apply-templates/> - </xsl:copy> + <xsl:call-template name="add-class"> + <xsl:with-param name="class">xref-idea</xsl:with-param> + </xsl:call-template> + </xsl:template> + + <xsl:template match="dl[dt/b/text()='Parameters:']"> + <xsl:call-template name="add-class"> + <xsl:with-param name="class">parameters</xsl:with-param> + </xsl:call-template> </xsl:template> <xsl:template match="*"> diff --git a/doclib/senf.css b/doclib/senf.css index ddfeff0c0..95d434d81 100644 --- a/doclib/senf.css +++ b/doclib/senf.css @@ -252,3 +252,7 @@ div.qindex { padding: 2px; line-height: 140%; } + +dl.parameters dd table { + width: auto; +} \ No newline at end of file -- GitLab