svn commit: samba-docs r640 - in trunk/xslt: .

jelmer at samba.org jelmer at samba.org
Tue Jun 14 19:55:01 GMT 2005


Author: jelmer
Date: 2005-06-14 19:55:00 +0000 (Tue, 14 Jun 2005)
New Revision: 640

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=640

Log:
Add hack for ignoring link/text() for LaTeX output.

Modified:
   trunk/xslt/latex.xsl


Changeset:
Modified: trunk/xslt/latex.xsl
===================================================================
--- trunk/xslt/latex.xsl	2005-06-14 14:33:47 UTC (rev 639)
+++ trunk/xslt/latex.xsl	2005-06-14 19:55:00 UTC (rev 640)
@@ -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', at 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 -->



More information about the samba-cvs mailing list