mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
doc: Reduce the validation errors of the docbook input
(this is different from previous version as it removes some broken and irrelevant changes to the protocol appendix). This removes all the validation errors except for missing link targets. You can test this by removing the --skip-validation from doc/publican/Makefile.am. Main changes are to avoid nesting <para> commands. I also used <simpara> in some places to reduce the amount of blank space. And the reference id's are prefixed with the chapter name to avoid collisions between libclient and libserver. PS: it would be useful if somebody who actually knows something about xslt would come up with a way to translate a block of text makde of <para> commands unchanged, but add <para> around plain text. Most of the difficulty is that doxygen's output is rather inconsistent here. Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
parent
75ec915da8
commit
dfc64f9ffe
3 changed files with 23 additions and 33 deletions
|
|
@ -37,20 +37,16 @@
|
|||
</para>
|
||||
|
||||
<xsl:if test="/doxygen/compounddef[@kind='class']">
|
||||
<para>
|
||||
<variablelist>
|
||||
<xsl:apply-templates select="/doxygen/compounddef" />
|
||||
</variablelist>
|
||||
</para>
|
||||
<variablelist>
|
||||
<xsl:apply-templates select="/doxygen/compounddef" />
|
||||
</variablelist>
|
||||
</xsl:if>
|
||||
|
||||
<para>Methods for the respective classes.</para>
|
||||
|
||||
<para>
|
||||
<variablelist>
|
||||
<xsl:apply-templates select="/doxygen/compounddef/sectiondef/memberdef" />
|
||||
<xsl:apply-templates select="/doxygen/compounddef/sectiondef/memberdef" />
|
||||
</variablelist>
|
||||
</para>
|
||||
</appendix>
|
||||
</xsl:template>
|
||||
|
||||
|
|
@ -60,7 +56,7 @@
|
|||
<xsl:apply-templates select="parameternamelist/parametername"/>
|
||||
</term>
|
||||
<listitem>
|
||||
<xsl:apply-templates select="parameterdescription"/>
|
||||
<simpara><xsl:apply-templates select="parameterdescription"/></simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</xsl:template>
|
||||
|
|
@ -74,7 +70,7 @@
|
|||
</xsl:template>
|
||||
|
||||
<xsl:template match="ref">
|
||||
<link linkend="{@refid}"><xsl:value-of select="." /></link>
|
||||
<link linkend="{$which}{@refid}"><xsl:value-of select="." /></link>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="simplesect[@kind='return']">
|
||||
|
|
@ -82,22 +78,18 @@
|
|||
<varlistentry>
|
||||
<term>Returns:</term>
|
||||
<listitem>
|
||||
<xsl:apply-templates />
|
||||
<simpara><xsl:apply-templates /></simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="simplesect[@kind='see']">
|
||||
<para>
|
||||
See also: <xsl:apply-templates />
|
||||
</para>
|
||||
See also: <xsl:apply-templates />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="simplesect[@kind='since']">
|
||||
<para>
|
||||
Since: <xsl:apply-templates />
|
||||
</para>
|
||||
Since: <xsl:apply-templates />
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="simplesect[@kind='note']">
|
||||
|
|
@ -131,7 +123,7 @@
|
|||
<!-- methods -->
|
||||
<xsl:template match="memberdef" >
|
||||
<xsl:if test="@kind = 'function' and @static = 'no'">
|
||||
<varlistentry id="{@id}">
|
||||
<varlistentry id="{$which}{@id}">
|
||||
<term>
|
||||
<xsl:value-of select="name"/>
|
||||
<xsl:if test="normalize-space(briefdescription) != ''">
|
||||
|
|
@ -139,21 +131,19 @@
|
|||
</xsl:if>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
<synopsis>
|
||||
<xsl:apply-templates select="definition"/><xsl:apply-templates select="argsstring"/>
|
||||
</synopsis>
|
||||
</para>
|
||||
<synopsis>
|
||||
<xsl:apply-templates select="definition"/><xsl:apply-templates select="argsstring"/>
|
||||
</synopsis>
|
||||
<xsl:apply-templates select="detaileddescription" />
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<!-- classes -->
|
||||
<xsl:template match="compounddef" >
|
||||
<xsl:if test="@kind = 'class'">
|
||||
<varlistentry id="{@id}">
|
||||
<xsl:if test="@kind = 'class'">
|
||||
<varlistentry id="{$which}{@id}">
|
||||
<term>
|
||||
<xsl:value-of select="compoundname" />
|
||||
<xsl:if test="normalize-space(briefdescription) != ''">
|
||||
|
|
@ -165,6 +155,6 @@
|
|||
<xsl:apply-templates select="detaileddescription" />
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
|
|
|||
|
|
@ -37,11 +37,13 @@
|
|||
<term>
|
||||
<link linkend="protocol-spec-interface-{@name}">
|
||||
<xsl:value-of select="@name" />
|
||||
<xsl:if test="description/@summary">
|
||||
- <xsl:value-of select="description/@summary" />
|
||||
</xsl:if>
|
||||
</link>
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<xsl:value-of select="description/@summary" />
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</xsl:template>
|
||||
|
||||
|
|
|
|||
|
|
@ -95,9 +95,7 @@
|
|||
<para>Value: <xsl:value-of select="@value"/></para>
|
||||
</xsl:if>
|
||||
<xsl:if test="@summary" >
|
||||
<para>
|
||||
<xsl:value-of select="@summary"/>
|
||||
</para>
|
||||
<para><xsl:value-of select="@summary"/></para>
|
||||
</xsl:if>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue