Re: Trouble with Repeatable Arguments in cmdsynopsis
Mike Detwiler <[email protected]> Wed, 26 Apr 2006 22:37:34 -0400
| Newsgroups | gmane.text.docbook.docbook2x.general |
|---|---|
| Message-ID | <[email protected]> |
Steve Cheng wrote: >> [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] > Now that's a strange error, that seemingly > doesn't even have to do with the problem of the ellipsis character ... > >> [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]$ > > By the way, did you install docbook2X from the source package, > or distribution package (the "db2x_docbook2man" name > for the command differs from the default)? I installed the package from the Fedora Extras yum repository. Here is some information from yumex that may or may not be of help: Information: Group : Applications/Text Source : docbook2X-0.8.6-1.fc5.src.rpm Build Time : Mon Apr 10 14:09:19 2006 Install Time : Tue Apr 11 21:31:18 2006 License : BSD Changelog: Fri Feb 17 17:00:00 2006 Patrice Dumas <[email protected]> - 0.8.6-1 - update to 0.8.6 - drop patch as SGMLSpl.pm is included in the scripts, not distributed - BR perl-XML-SAX (close 188481) Fri Feb 3 17:00:00 2006 Patrice Dumas <[email protected]> - 0.8.5-1 - FE submission > > In any case, please check the top of the db2x_manxml Perl script > (probably in /usr/bin/db2x_manxml or /usr/local/bin/db2x_manxml) > and see if it looks like this: (my copy of the script) > > == cut == > #!/usr/bin/perl > > my %db2x_config = > ( > 'docbook2X-version' => q<0.8.8>, > > # Used by db2x_manxml and db2x_texixml only > 'utf8trans-program' => q</usr/local/bin/utf8trans>, > 'utf8trans-map-roff' => > q</usr/local/share/docbook2X/charmaps/roff.charmap>, > 'utf8trans-map-texi' => > q</usr/local/share/docbook2X/charmaps/texi.charmap>, > 'iconv-program' => q</usr/bin/iconv>, > 'makeinfo-program' => q</usr/bin/makeinfo>, > > == cut == > > I'm guessing that maybe, for some reason, the path to the "utf8trans" program > in your copy of the script is not being entered here. > e.g. /usr/local/bin/utf8trans > Please also check if the 'utf8trans-map-roff' entry is there > and is correct too. [mike@terrapin:16 lab01]$ head --lines=12 /usr/bin/db2x_manxml #!/usr/bin/perl my %db2x_config = ( 'docbook2X-version' => q<0.8.6>, # Used by db2x_manxml and db2x_texixml only 'utf8trans-program' => q</usr/bin/utf8trans>, 'utf8trans-map-roff' => q</usr/share/docbook2X/charmaps/roff.charmap>, 'utf8trans-map-texi' => q</usr/share/docbook2X/charmaps/texi.charmap>, 'iconv-program' => q</usr/bin/iconv>, 'makeinfo-program' => q<>, The utf8trans entries appear to be correct. > > What happens, if these entries are not set, is that > db2x_manxml will then not use the utf8trans program, > which as you've seen, will lead to an error. > > (In hindsight, it would have better if the script warned the user > if the configuration is not correct. I can fix that > in the next release.) > >> 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. > > Thanks, but I can convert them to man pages just fine > on my system. So that's why I suspect a docbook2X > config glitch on your side. I included the .mxml file because I thought it might contain a clue as to what was going wrong. When I open this file using vim, and look at the character in question, there is single character that looks like an ellipsis, however when I open the file using a hex editor, it does not appear to be U+2026. The hex values at that character are E2 80 A6. The E2 and the A6 show up in the generated roff file (if I run db2x_manxml --encoding=utf-8), and man displays the corresponding ascii/unicode characters (00E2 -> lowercase 'a' with circumflex, and a 00A6 -> | (pipe)) I'm not sure if the character translation is supposed to have taken place by this stage, and I know very little about unicode and character mapping, but I thought it was worth mentioning. > > Anyway, as I've said, it would be very helpful if you would provide > the steps that you took in installing docbook2X, as to help me fix > a possible problem in the docbook2X build/install system. I've never > seen any reports of this problem before. I just installed the package using yumex. Everything works fine except for the repeatable arguments. > > Hope this helps, and thanks again for the report, > -- > Steve Cheng > 鄭君博 http://gold-saucer.afraid.org > ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642