This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: <cmdsynopsis> output problem


Okay, I found it.

The problem is that, in the synop.xsl and dbsynop.dsl files, the repeat
function is specified for <arg> but not for the <arg> as a child of
<group>. I tested, and--sure enough--the repeat attribute works as expected
in a naked <arg>.

In the case of the synop.xsl files, I managed to correct the problem with
the following addition to my customization layer:

<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:apply-templates/>
   <xsl:choose>
     <xsl:when test="$rep='repeat'">
       <xsl:value-of select="$arg.rep.repeat.str"/>
     </xsl:when>
     <xsl:when test="$rep='norepeat'">
       <xsl:value-of select="$arg.rep.norepeat.str"/>
     </xsl:when>
     <xsl:otherwise>
       <xsl:value-of select="$arg.rep.def.str"/>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>

 I'll post this as a bug on sourceforge.

 The necessary change is probably similar for the dsssl, but I get lost in
 all those parentheses and don't know what all the function names mean, so
 I'll leave fiddling with those to someone who does.

 Dennis Grace

 Information Developer
 IBM Linux Technology Center
 (512) 838-3937  T/L 678-3937  cell: (512)-296-7830
 dgrace@us.ibm.com

 There are only 10 kinds of people in the world: those who understand
 binary and those who don't.


                                                                                                                                       
                      Dennis                                                                                                           
                      Grace/Austin/IBM@        To:       Tom Olsen <olsen@lsil.com>                                                    
                      IBMUS                    cc:       docbook-apps@lists.oasis-open.org                                             
                                               Subject:  Re: DOCBOOK-APPS: <cmdsynopsis> output problem                                
                      09/04/2002 11:07                                                                                                 
                      AM                                                                                                               
                                                                                                                                       
                                                                                                                                       





Tom asks, "Does anybody know what could be causing this?" Not really, but I
can confirm it and expand a bit. The same behavior appertains in XML. In
the XSL (synop.xsl files in the html, fo, and manpage directories) , the
repeat calls a variable in common.xsl named arg.rep.repeat.str, which
apparently only gives an ellipsis if no text value is present for the arg
in question.

I'd call this a bug.

Dennis Grace

Information Developer
IBM Linux Technology Center
(512) 838-3937  T/L 678-3937  cell: (512)-296-7830
dgrace@us.ibm.com

There are only 10 kinds of people in the world: those who understand binary
and those who don't.



                      Tom Olsen
                      <olsen@lsil.com>         To:
docbook-apps@lists.oasis-open.org
                                               cc:
                      09/03/2002 04:48         Subject:  DOCBOOK-APPS:
<cmdsynopsis> output problem
                      PM





Using DocBook SGML 4.1, the modular stylesheets, and docbook-to-man, I'm
having a problem producing the correct <cmdsynopsis> output in PDF and
HTML.
What I need to produce is this:

{file ... | dir ...}

To make it appear OK in HTML and PDF, I have to use the following
"incorrect" markup:

<cmdsynopsis>
  <command>fakecommand</command>
    <arg choice="req" rep="repeat">
      <group choice="plain">
        <arg choice="plain"><replaceable>file</replaceable>
          <arg choice="plain" rep="repeat"></arg>
        </arg>
        <arg choice="plain"><replaceable>dir</replaceable></arg>
      </group>
    </arg>
</cmdsynopsis>

In short, I have to force the signifier for "repeatable" after file by
adding an element and attributes tag that shouldn't be there.

When using more "correct" markup (which happens to produce the desired
output in *roff), such as the following:

<cmdsynopsis>
  <command>fakecommand</command>
    <group choice="req">
      <arg choice="plain" rep="repeat">
        <replaceable>file</replaceable>
      </arg>
      <arg choice="plain" rep="repeat">
        <replaceable>dir</replaceable>
      </arg>
    </group>
</cmdsynopsis>

I get the following output in PDF and HTML:

{file | dir}

Does anyone have any idea what could be causing this?

Any help is appreciated. Thank you in advance.

Tom Olsen
LSI Logic Storage Systems, Inc.


(See attached file: winmail.dat)






#### winmail.dat has been removed from this note on September 05 2002 by
Dennis Grace





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]