Re: Trouble with Repeatable Arguments in cmdsynopsis

Mike Detwiler <[email protected]> Wed, 26 Apr 2006 14:38:12 -0400
Newsgroups gmane.text.docbook.docbook2x.general
Message-ID <[email protected]>
Steve Cheng wrote:
> Do you have a test case?

[mike@terrapin:43 tmp]$ cat /etc/redhat-release
Fedora Core release 5 (Bordeaux)
[mike@terrapin:44 tmp]$ uname -r
2.6.16-1.2096_FC5
[mike@terrapin:45 tmp]$ db2x_docbook2man --version
/usr/bin/db2x_docbook2man (part of docbook2X 0.8.6)
$Revision: 1.11 $ $Date: 2006/03/19 19:59:08 $
<URL:http://docbook2x.sourceforge.net/>

Copyright (C) 2003-2004 Steve Cheng
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[mike@terrapin:46 tmp]$ db2x_docbook2man --debug ls.xml
/usr/bin/xsltproc --nonet --debug 
http://docbook2x.sf.net/latest/xslt/man/docbook.xsl ls.xml
Unable to recognise encoding of this document at 
/usr/lib/perl5/vendor_perl/5.8.8/XML/SAX/PurePerl/EncodingDetect.pm line 96.
Document requires an element [Ln: 1, Col: 0]
[mike@terrapin:47 tmp]$ db2x_xsltproc --debug -s man -o ls.mxml ls.xml
/usr/bin/xsltproc --nonet --debug --output ls.mxml 
http://docbook2x.sf.net/latest/xslt/man/docbook.xsl ls.xml
[mike@terrapin:48 tmp]$ db2x_manxml ls.mxml
/usr/bin/iconv: illegal input sequence at position 299
/usr/bin/db2x_manxml: program in pipeline exited with an error
[mike@terrapin:49 tmp]$

I have also attached the input file ls.xml, the intermediate file 
ls.mxml, and the partial output file ls.1. Let me know if you need 
anything else.

-Mike
ls.1 (text/plain, 299 B)
.\" -*- coding: us-ascii -*-
.if \n(.g .ds T< \\FC
.if \n(.g .ds T> \\F[\n[.fam]]
.TH ls 1 "26 April 2006"  
.SH NAME
ls \- list contents of a directory
.SH SYNOPSIS
'nh
.fi
.ad l
\fB/usr/bin/ls\fR \kx
.if (\nx>(\n(.l/2)) .nr x (\n(.l/5)
'in \n(.iu+\nxu
[
\fBaAbcCdfFgilLmnopqrRstux1\fR
] [file]\(^a
ls.mxml (text/xml, 738 B)
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<manpageset xmlns="http://docbook2x.sourceforge.net/xmlns/Man-XML"><manpage title="ls" sect="1" h1="ls" h2="1" h3="26 April 2006" h4="" h5="" preprocessors=""><SH>NAME</SH><refnameline><refname>ls</refname><refpurpose>list contents of a directory</refpurpose></refnameline><SH>SYNOPSIS</SH><nh><TPauto align="l"><TPtag><b>/usr/bin/ls</b> </TPtag><TPitem><para> [
  <b>aAbcCdfFgilLmnopqrRstux1</b>
] [file]…</para></TPitem></TPauto></nh><SH>DESCRIPTION</SH><para>
For each file that is a directory, <b>ls</b> lists the contents of
the directory; for each file that is an ordinary file, <b>ls</b>
repeats its name and any other information requested.
</para></manpage></manpageset>
ls.xml (text/xml, 831 B)
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
          "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<refentry id="ls">

<refmeta>
<refentrytitle>ls</refentrytitle>
<manvolnum>1</manvolnum>
</refmeta>

<refnamediv>
<refname>ls</refname>
<refpurpose>list contents of a directory</refpurpose>
</refnamediv>

<refsynopsisdiv>
<cmdsynopsis>
<command>/usr/bin/ls</command>
<arg choice="opt">
  <option>aAbcCdfFgilLmnopqrRstux1</option>
</arg>
<arg choice="opt" rep="repeat">file</arg>
</cmdsynopsis>
</refsynopsisdiv>

<refsect1><title>Description</title>
<para>
For each file that is a directory, <command>ls</command> lists the contents of
the directory; for each file that is an ordinary file, <command>ls</command>
repeats its name and any other information requested.
</para>

</refsect1>
</refentry>