]> granicus.if.org Git - docbook-dsssl/commitdiff
Bug #413982, easy support for man page CGI links on citerefentry
authorNorman Walsh <ndw@nwalsh.com>
Wed, 18 Apr 2001 17:57:50 +0000 (17:57 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Wed, 18 Apr 2001 17:57:50 +0000 (17:57 +0000)
xsl/html/inline.xsl
xsl/html/param.xsl

index 95358ba1bd125fd6072648a773284c0a9e50fb2b..5b2575aedf0366166fb156f31845bf1738d0be32 100644 (file)
 </xsl:template>
 
 <xsl:template match="citerefentry">
-  <xsl:call-template name="inline.charseq"/>
+  <xsl:choose>
+    <xsl:when test="$citerefentry.link != '0'">
+      <a>
+        <xsl:attribute name="href">
+          <xsl:call-template name="generate.citerefentry.link"/>
+        </xsl:attribute>
+        <xsl:call-template name="inline.charseq"/>
+      </a>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="inline.charseq"/>
+    </xsl:otherwise>
+  </xsl:choose>
 </xsl:template>
 
-<xsl:template match="citetitle">
-  <xsl:call-template name="inline.italicseq"/>
+<xsl:template name="generate.citerefentry.link">
+  <!-- nop -->
+</xsl:template>
+
+<xsl:template name="x.generate.citerefentry.link">
+  <xsl:text>http://example.com/cgi-bin/man.cgi?</xsl:text>
+  <xsl:value-of select="refentrytitle"/>
+  <xsl:text>(</xsl:text>
+  <xsl:value-of select="manvolnum"/>
+  <xsl:text>)</xsl:text>
 </xsl:template>
 
 <xsl:template match="emphasis">
index 06a6c1cae9615c17b5a13400f8cdbc4baaa7db51..71095541fc81193b7f52141f10e38325af62fa8a 100644 (file)
@@ -1097,4 +1097,17 @@ they will be numbered monotonically throughout each
 </refdescription>
 </doc:param>
 
+<!-- ==================================================================== -->
+<xsl:param name="citerefentry.link" select="'0'" doc:type='boolean'/>
+
+<doc:param name="citerefentry.link" xmlns="">
+<refpurpose>Generate URL links when cross-referencing RefEntrys?</refpurpose>
+<refdescription>
+<para>If true, a web link will be generated, presumably
+to an online man->HTML gateway. The text of the link is
+generated by the generate.citerefentry.link template.
+</para>
+</refdescription>
+</doc:param>
+
 </xsl:stylesheet>