]> granicus.if.org Git - docbook-dsssl/commitdiff
(internal) Added support for TDG hyperlinking with <tag> (instead
authorMichael Smith <xmldoc@users.sourceforge.net>
Wed, 6 Jul 2005 05:16:18 +0000 (05:16 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Wed, 6 Jul 2005 05:16:18 +0000 (05:16 +0000)
of just <sgmltag>. Also added support for ignoring <tag>s and
<sgmltag>s that have a "namespace" attribute whose value contains
"http://docbook.sf.net/" or "http://docbook.sourceforge.net/"
(that is, those don't get turned into TDG hyperlinks).

(Note: This change has no effect on the behavior of the DocBook XSL
stylesheets; it only affects the build used to create the actual)
DocBook XSL releases.)

xsl/docsrc/clrefentry.xsl
xsl/docsrc/tdg-link.xsl

index fe86b1dbab68621b9bd21e3a8faa9885eb087feb..0531044fe259f90cec9d4060bc0d075a5ebe9c88 100644 (file)
   </a>
 </xsl:template>
 
-<xsl:template match="sgmltag[(not(@class) or @class='element')
-                             and (not(@role) or @role != 'html')]">
-  <!-- link sgmltags to thier reference pages -->
+<!-- * Check for both <sgmltag> and <tag>, but ignore those -->
+<!-- * with role="html" or namespace="http://docbook.sf.net/*" -->
+<!-- * or namespace="http://docbook.sourceforge.net/*" -->
+<xsl:template match="*[name() = 'sgmltag' or name() = 'tag']
+                     [(not(@class) or @class='element')
+                       and (not(@role) or @role != 'html')
+                       and (not(@namespace)
+                         or not(
+                         contains(@namespace, 'http://docbook.sf.net/')
+                         or contains(@namespace, 'http://docbook.sourceforge.net/')
+                         ))]">
+  <!-- link sgmltags to their reference pages -->
   <a href="http://docbook.org/tdg/en/html/{.}.html">
     <xsl:apply-imports/>
   </a>
index 7bd55a73a8ebb827a92e2d931a0a5db29090fc6b..1903c6a504956e676c29f1053a333f85cb27bcde 100644 (file)
@@ -6,7 +6,7 @@
 
 <xsl:param name="tdg-baseuri" select="'http://www.docbook.org/tdg/en/html/'"/>
 
-<xsl:template match="sgmltag">
+<xsl:template match="sgmltag|tag">
   <xsl:variable name="tagmarkup">
     <xsl:apply-imports/>
   </xsl:variable>