[xsl] docbook: xref to generic elements

Subject: [xsl] docbook: xref to generic elements
From: Bernd Kuemmerlen <bkuemmer@xxxxxxx>
Date: Mon, 06 Sep 2004 10:41:29 +0200
Hello there,

our docbook users often make xrefs to a lot of elements which do not have gentext templates and therefore, using the docbook-xsl stylsheets, in the html or pdf output they have links of the form ??? (which at least point to the correct location in the html output).

I tried to add gentext templates for some of the used elements like described in <http://www.sagehill.net/docbookxsl/CustomXrefs.html> in my customization layer:

<xsl:param name="local.l10n.xml" select="document('')"/>
<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0";>
  <l:l10n language="en">
    <l:context name="xref">
      <l:template name="classname" text="(p. %p)"/>
      <l:template name="constant" text="(p. %p)"/>
    </l:context>
  </l:l10n>
</l:i18n>

However when transforming using xsltproc, I get messages like

Don't know what gentext to create for xref to: "classname", ("TypeInfosBase")

I guess I am doing something wrong here... Can anyone help?

I also tried to set xreflabels on individual xrefs, but still only "???" is shown.

Is there a more generic solution to create xref text for elements which otherwise don't have a valid label? It would be for example great to have (page XY) for pdf output and (chapter XY) for html output

Thanks for any help or pointers on how to do this
	Bernd
--
"I'm a doctor, I am supposed to tell people where it hurts (so I can
fix it and make money)."
					-- Mark S.

Current Thread