]> granicus.if.org Git - docbook-dsssl/commitdiff
indexterm instances now produce groff comments like this:
authorMichael Smith <xmldoc@users.sourceforge.net>
Tue, 4 Mar 2008 03:38:53 +0000 (03:38 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Tue, 4 Mar 2008 03:38:53 +0000 (03:38 +0000)
  .\" primary: secondary: tertiary

remark instances, if non-empty, now produce groff comments

xsl/manpages/inline.xsl

index e04efce065c46c2c0630c391d97597a3dd53c25c..9160f84976dacda32115a54dfe8ac31991ae2d2f 100644 (file)
   <xsl:apply-templates/>
 </xsl:template>
 
+<!-- * indexterm instances produce groff comments like this: -->
+<!-- *  -->
+<!-- * .\" primary: secondary: tertiary -->
+<xsl:template match="indexterm">
+  <xsl:text>.\" </xsl:text>
+  <xsl:apply-templates/>
+  <xsl:text>&#10;</xsl:text>
+</xsl:template>
+
+<xsl:template match="primary">
+  <xsl:value-of select="normalize-space(.)"/>
+</xsl:template>
+
+<xsl:template match="secondary|tertiary">
+  <xsl:text>: </xsl:text>
+  <xsl:value-of select="normalize-space(.)"/>
+</xsl:template>
+
+<!-- * non-empty remark instances produce groff comments -->
+<xsl:template match="remark">
+  <xsl:variable name="content" select="normalize-space(.)"/>
+  <xsl:if test="not($content = '')">
+    <xsl:text>.\" </xsl:text>
+    <xsl:value-of select="$content"/>
+    <xsl:text>&#10;</xsl:text>
+  </xsl:if>
+</xsl:template>
+
 </xsl:stylesheet>