[PATCH 3/9] doc: preserve links produced by Doxygen

Pekka Paalanen ppaalanen at gmail.com
Tue Nov 25 06:46:47 PST 2014


On Tue, 11 Nov 2014 18:42:56 -0800
Bill Spitzak <spitzak at gmail.com> wrote:

> These links are pretty useful for navigation, though sometimes excessive
> (you can turn them off by putting % before the word in the comment).
> 
> I had to turn off validation because it failed on missing and duplicate
> target id's, which this produces.

Yeah, very useful. Do we have a plan how to get validation back and
working? I assume it's not useless.


Thanks,
pq


> ---
>  doc/publican/Makefile.am             |    1 +
>  doc/publican/doxygen-to-publican.xsl |   23 ++++++++---------------
>  2 files changed, 9 insertions(+), 15 deletions(-)
> 
> diff --git a/doc/publican/Makefile.am b/doc/publican/Makefile.am
> index b30a471..9fc4e0b 100644
> --- a/doc/publican/Makefile.am
> +++ b/doc/publican/Makefile.am
> @@ -47,6 +47,7 @@ if HAVE_XMLTO
>  if HAVE_XSLTPROC
>  noinst_DATA = Wayland $(publican_targets)
>  XMLTO_PARAM = \
> +	--skip-validation \
>  	--stringparam chunk.section.depth=0 \
>  	--stringparam toc.section.depth=1 \
>  	--stringparam html.stylesheet=css/default.css
> diff --git a/doc/publican/doxygen-to-publican.xsl b/doc/publican/doxygen-to-publican.xsl
> index 99193e1..7f7abe9 100644
> --- a/doc/publican/doxygen-to-publican.xsl
> +++ b/doc/publican/doxygen-to-publican.xsl
> @@ -61,7 +61,7 @@
>  </xsl:template>
>  
>  <xsl:template match="ref">
> -  <emphasis><xsl:apply-templates /></emphasis>
> +  <link linkend="{@refid}"><xsl:value-of select="." /></link>
>  </xsl:template>
>  
>  <xsl:template match="simplesect[@kind='return']">
> @@ -81,10 +81,7 @@
>    <itemizedlist>
>      <listitem>
>        <para>
> -        See also:
> -        <xsl:for-each select="para/ref">
> -          <emphasis><xsl:apply-templates /><xsl:text> </xsl:text></emphasis>
> -        </xsl:for-each>
> +        See also: <xsl:apply-templates />
>        </para>
>      </listitem>
>    </itemizedlist>
> @@ -94,7 +91,7 @@
>    <itemizedlist>
>      <listitem>
>        <para>
> -        Since: <xsl:apply-templates select="para"/>
> +        Since: <xsl:apply-templates />
>        </para>
>      </listitem>
>    </itemizedlist>
> @@ -104,10 +101,6 @@
>    <emphasis>Note: <xsl:apply-templates /></emphasis>
>  </xsl:template>
>  
> -<xsl:template match="programlisting//sp">
> -  <xsl:text> </xsl:text>
> -</xsl:template>
> -
>  <xsl:template match="sp">
>    <xsl:text> </xsl:text>
>  </xsl:template>
> @@ -135,9 +128,9 @@
>  <!-- methods -->
>  <xsl:template match="memberdef" >
>    <xsl:if test="@kind = 'function' and @static = 'no'">
> -    <varlistentry>
> +    <varlistentry id="{@id}">
>          <term>
> -          <xsl:apply-templates select="name"/>
> +          <xsl:value-of select="name"/>
>          - <xsl:apply-templates select="briefdescription" />
>          </term>
>          <listitem>
> @@ -154,8 +147,8 @@
>  
>  <!-- classes -->
>  <xsl:template match="compounddef" >
> -    <xsl:if test="@kind = 'class' ">
> -    <varlistentry>
> +    <xsl:if test="@kind = 'class'">
> +    <varlistentry id="{@id}">
>          <term>
>              <xsl:apply-templates select="compoundname" />
>              <xsl:if test="briefdescription">
> @@ -164,7 +157,7 @@
>          </term>
>  
>          <listitem>
> -          <xsl:apply-templates select="detaileddescription/para" />
> +          <xsl:apply-templates select="detaileddescription" />
>          </listitem>
>      </varlistentry>
>      </xsl:if>



More information about the wayland-devel mailing list