]> granicus.if.org Git - docbook-dsssl/commitdiff
Fix for problem of multiple Arg instances in Group not being
authorMichael Smith <xmldoc@users.sourceforge.net>
Thu, 3 Nov 2005 09:27:54 +0000 (09:27 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Thu, 3 Nov 2005 09:27:54 +0000 (09:27 +0000)
separated by vertical bars. Closes #1346716. Thanks to Costin
Stroie for reporting the problem.

xsl/manpages/synop.xsl

index fb2e15c77340e0d1808c7e33f4d2572ae37d6b53..656481b4f51577121640f14d734b65129c2e5173 100644 (file)
@@ -14,6 +14,8 @@
 
      ******************************************************************** -->
 
+<xsl:variable name="arg.or.sep"> |</xsl:variable>
+
 <!-- * Note: If you are looking for the <synopsis> element, you won't -->
 <!-- * find any code here for handling it. It is a _verbatim_ -->
 <!-- * environment; check the block.xsl file instead. -->
@@ -64,7 +66,7 @@
   <xsl:apply-templates/>
 </xsl:template>
 
-<xsl:template match="group|arg">
+<xsl:template match="group|arg" name="group-or-arg">
   <xsl:variable name="choice" select="@choice"/>
   <xsl:variable name="rep" select="@rep"/>
   <xsl:variable name="sepchar">
   </xsl:choose>
 </xsl:template>
 
+<xsl:template match="group/arg">
+  <xsl:variable name="choice" select="@choice"/>
+  <xsl:variable name="rep" select="@rep"/>
+  <xsl:if test="position()>1"><xsl:value-of select="$arg.or.sep"/></xsl:if>
+  <xsl:call-template name="group-or-arg"/>
+</xsl:template>
+
+
 <xsl:template match="command">
   <xsl:call-template name="suppress.hyphenation"/>
   <xsl:apply-templates mode="bold" select="."/>