1 <?xml version=
"1.0" encoding=
"utf-8"?>
2 <xsl:stylesheet xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform"
3 xmlns:xlink='http://www.w3.org/
1999/xlink'
4 exclude-result-prefixes=
"xlink"
7 <xsl:param name=
"base.dir" select=
"'../htmldocs/'"/>
8 <xsl:param name=
"bridgehead.in.toc" select=
"1"/>
9 <xsl:param name=
"citerefentry.link" select=
"'1'"/>
10 <xsl:param name=
"css.decoration" select=
"1"/>
11 <xsl:param name=
"html.stylesheet" select=
"'../samba.css'"/>
12 <xsl:param name=
"html.stylesheet.type">text/css
</xsl:param>
13 <xsl:param name=
"use.extensions" select=
"'0'"/>
14 <xsl:param name=
"use.id.as.filename" select=
"'1'"/>
15 <xsl:param name=
"use.local.olink.style" select=
"1"/>
16 <xsl:param name=
"use.role.as.xrefstyle" select=
"1"/>
17 <xsl:param name=
"use.role.for.mediaobject" select=
"1"/>
19 <xsl:template name=
"generate.citerefentry.link">
20 <xsl:value-of select=
"refentrytitle"/><xsl:text>.
</xsl:text><xsl:value-of select=
"manvolnum"/><xsl:text>.html
</xsl:text>
23 <xsl:template match=
"author">
26 <xsl:template match=
"link" name=
"link">
27 <xsl:param name=
"linkend" select=
"@linkend"/>
28 <xsl:param name=
"a.target"/>
29 <xsl:param name=
"xhref" select=
"@xlink:href"/>
31 <xsl:variable name=
"content">
32 <xsl:call-template name=
"anchor"/>
34 <xsl:when test=
"count(child::node()) > 0">
35 <!-- If it has content, use it -->
36 <xsl:apply-templates/>
38 <!-- else look for an endterm -->
39 <xsl:when test=
"@endterm">
40 <xsl:variable name=
"etargets" select=
"key('id',@endterm)"/>
41 <xsl:variable name=
"etarget" select=
"$etargets[1]"/>
43 <xsl:when test=
"count($etarget) = 0">
45 <xsl:value-of select=
"count($etargets)"/>
46 <xsl:text>Endterm points to nonexistent ID:
</xsl:text>
47 <xsl:value-of select=
"@endterm"/>
49 <xsl:text>???
</xsl:text>
52 <xsl:apply-templates select=
"$etarget" mode=
"endterm"/>
58 <xsl:when test=
"key('id', @linkend)/title[1]">
59 <xsl:call-template name=
"gentext.startquote"/>
60 <xsl:value-of select=
"key('id', @linkend)/title[1]"/>
61 <xsl:call-template name=
"gentext.endquote"/>
65 <xsl:text>Link element has no content and no Endterm. And linkend's pointer has no title.
</xsl:text>
66 <xsl:text>Nothing to show in the link to
</xsl:text>
67 <xsl:value-of select=
"(@linkend)[1]"/>
75 <xsl:call-template name=
"simple.xlink">
76 <xsl:with-param name=
"node" select=
"."/>
77 <xsl:with-param name=
"linkend" select=
"$linkend"/>
78 <xsl:with-param name=
"content" select=
"$content"/>
79 <xsl:with-param name=
"a.target" select=
"$a.target"/>
80 <xsl:with-param name=
"xhref" select=
"$xhref"/>