[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: xref to varlistentry/term/ulink
Hi,
it seems one of my collegue found a bug in processing xrefs in
varlistentrys. Consider the following snippet:
-----------------------
<variablelist>
<varlistentry id="foo">
<term><ulink url="http://foo.example.org">Foo</ulink></term>
<listitem> ... </listitem>
</varlistentry>
<varlistentry id="bar">
<term><ulink url="http://bar.example.org"/></term>
<listitem> ... </listitem>
</varlistentry>
</variablelist>
-----------------------
If I use <xref linkend="foo"/>, the xref will be correctly resolved. It
creates the word "Foo" as a (internal) link as expected.
However, if I use <xref linkend="bar"/>, the xref will be resolved to an
empty string.
After I've searched the stylesheets, I've found the no.anchor.mode for
ulink:
---------[ common/titles.xsl ]---------
<xsl:template match="ulink" mode="no.anchor.mode">
<xsl:apply-templates/>
</xsl:template>
---------------------------------------
I've played around and tried this modification:
---------------------------------------
<xsl:template match="ulink" mode="no.anchor.mode">
<xsl:param name="url" select="@url"/>
<xsl:choose>
<xsl:when test="count(child::node())=0">
<xsl:value-of select="$url"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
---------------------------------------
This works for me and it outputs the URL instead of an empty string.
Is this the correct place?
--
Gruß/Regards,
Thomas Schraitle
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]