summaryrefslogtreecommitdiff
path: root/docs/xslt/latex.xsl
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-06-14 19:55:00 +0000
committerGerald W. Carter <jerry@samba.org>2008-04-23 08:46:48 -0500
commitcfb79825bb727ec3076cb631d6ebdf5da2359be3 (patch)
treeb9e177e808ef700979f5edf4bb487f273d598f88 /docs/xslt/latex.xsl
parentf75a6fddf064d8e1ce436d3e4457a4aaca0904bd (diff)
downloadsamba-cfb79825bb727ec3076cb631d6ebdf5da2359be3.tar.gz
samba-cfb79825bb727ec3076cb631d6ebdf5da2359be3.tar.bz2
samba-cfb79825bb727ec3076cb631d6ebdf5da2359be3.zip
Add hack for ignoring link/text() for LaTeX output.
(This used to be commit 14198df840f952b8f357b8b56fac7d1f453536f3)
Diffstat (limited to 'docs/xslt/latex.xsl')
-rw-r--r--docs/xslt/latex.xsl22
1 files changed, 18 insertions, 4 deletions
diff --git a/docs/xslt/latex.xsl b/docs/xslt/latex.xsl
index 0abd611312..17ae95e18e 100644
--- a/docs/xslt/latex.xsl
+++ b/docs/xslt/latex.xsl
@@ -27,10 +27,24 @@
</xsl:param>
<!-- Show real name of the link rather then user specified description -->
-<xsl:template name="link">
- <xsl:element name="link">
- <xsl:copy-of select="@*"/>
- </xsl:element>
+<xsl:template match="link">
+ <xsl:variable name="target" select="key('id',@linkend)[1]"/>
+ <xsl:variable name="refelem" select="local-name($target)"/>
+ <xsl:if test="$refelem=''">
+ <xsl:message><xsl:text>XRef to nonexistent id: </xsl:text><xsl:value-of select="@linkend"/></xsl:message>
+ <xsl:text>XrefId[?</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>?]</xsl:text>
+ </xsl:if>
+
+ <xsl:call-template name="generate.hyperlink">
+ <xsl:with-param name="target" select="$target"/>
+ <xsl:with-param name="text">
+ <xsl:call-template name="generate.xref.text">
+ <xsl:with-param name="target" select="$target"/>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
</xsl:template>
<!-- LaTeX doesn't accept verbatim stuff in titles -->