Hi Dick,
I've checked the code. Problem is that for refentry usual gentext
templating is not being used. E.g. xref to section is handled by the
following template:
<xsl:template match="section|simplesect
|sect1|sect2|sect3|sect4|sect5
|refsect1|refsect2|refsect3|refsection"></xsl:template>
mode="xref-to">
<xsl:param name="referrer"></xsl:param>
<xsl:param name="xrefstyle"></xsl:param>
<xsl:param name="verbose" select="1"></xsl:param>
<xsl:apply-templates select="." mode="object.xref.markup">
...
And mode object.xref.markup handles template processing.
However for refentry code is different:
<xsl:template match="refentry" mode="xref-to">
<xsl:param name="referrer"></xsl:param>
<xsl:param name="xrefstyle"></xsl:param>
<xsl:choose>
<xsl:when test="refmeta/refentrytitle">
<xsl:apply-templates select="refmeta/refentrytitle"></xsl:apply-templates>
mode="no.anchor.mode"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="refnamediv/refname[1]"></xsl:apply-templates>
mode="no.anchor.mode"/>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="refmeta/manvolnum" mode="no.anchor.mode"></xsl:apply-templates>
</xsl:template>
Quick solution is to override this template in your customization layer.
Jirka
On 12.09.2026 0:11, Richard Hamilton via OASIS wrote:
> Hi,
>
> My message got clobbered by the mailer, so you may have seen a truncated
> message. Here it is, hopefully now readable:
>
> ==================
> I'm trying to customize gentext to generate text appropriately when I
> use xref with a linkend attribute that points to a refentry. The
> stylesheets generate the name of the refentry by default, however, I
> have been unable to create a gentext entry that changes the default.
>
> Here is how the refentry is marked up:
>
> <refentry xml:id="topic_pmn_4mp_yyb">
> <refnamediv>
> <refname>function</refname>
> .....
>
> I added the following line to gentext.xsl:
>
> <l:template name="refentry" text="the reference page for
> %t">
>
> The line was added inside context "xref", "xref-with-number-title",
> "xref-with-number", "title", and "refentry", and none of them worked.
>
> Any idea what's going on here? I have used this gentext.xsl file
> successfully for sections, parts, appendixes, etc., so I know this is
> the gentext file that the stylesheets use.
>
> Thanks,
> Dick Hamilton
--
------------------------------------------------------------------
Jirka Kosek e-mail:
jirka@kosek.cz http://xmlguru.cz------------------------------------------------------------------
Professional XML and Web consulting and training services
DocBook/DITA customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
Bringing you XML Prague conference
http://xmlprague.cz