Problem converting Mallard document to HTML

Shaun McCance <shaunm at gnome.org>
Sun Jan 16 18:15:24 EST 2011

On Sun, 2011-01-16 at 15:08 -0500, Luis Felipe López Acevedo wrote:
> El 16 de enero de 2011 12:38, Shaun McCance <shaunm at gnome.org>
> escribió:
>         On Sat, 2011-01-15 at 18:56 -0500, Luis Felipe López Acevedo
>         wrote:
>         > Hi,
>         >
>         > I'm trying to convert a Mallard document to HTML following
>         the steps I
>         > found in the list archives[1], but I get some errors:
>         >
>         > $ gnome-doc-tool html -c index.css index.page
>         > /usr/bin/gnome-doc-tool: 1: Bad substitution
>         > file://:1: parser error : Document is empty
>         >
>         > ^
>         > file://:1: parser error : Start tag expected, '<' not found
>         >
>         > ^
>         >
>         > The document I'm trying to convert is the "First page" from
>         the Ten
>         > Minute Tour[2].
>         
>         
>         What version of gnome-doc-tool are you using?
>         
>         $ gnome-doc-tool --version
>         
> 
> gnome-doc-html (gnome-doc-utils) 0.20.0
>  
>         Also, what's the full path of the directory you're running
>         it in? gnome-doc-tool is known to have issues when paths
>         contain spaces, non-ASCII characters, and some other stuff.
>         
> 
> /home/sirgazil/mallard-test

Strange. I'm not sure why it's not working. But you got yelp-build
working, and that's the future anyway, so...

>         Also, if you want to be bleeding edge, you could try using
>         yelp-build from yelp-tools instead. You'll have to build it
>         from git. Here's how:
>         
> 
> This worked for me :) I added some details of the process below.
>  
>         First, if you don't have git installed, install it:
>         
>         $ sudo apt-get install git
>         
>         Next, to build most package from Gnome git, you'll need the
>         gnome-common package installed. You can get this from apt:
>         
>         $ sudo apt-get install gnome-common
>         
>         Next, you'll need a very recent copy of yelp-xsl installed.
>         
>         $ git clone git://git.gnome.org/yelp-xsl
>         $ cd yelp-xsl
>         $ ./autogen.sh --prefix=/usr
>         $ make
>         $ sudo make install
>         
> 
> For this to work I had to install two dependencies: libxml2-dev,
> libxslt1-dev.

Ah, right. Actually, those packages might not be necessary
(depending on whether Ubuntu packages xsltproc in the -dev
package or not). But I do check for libxml-2.0 and libxslt
using pkg-config, so they end up being required. I should
look into checking for the xmllint and xsltproc binaries
instead. Though I do still want to check minimum versions.

>         Finally, install yelp-tools.
>         
>         $ git clone git://git.gnome.org/yelp-tools
>         $ cd yelp-tools
>         $ ./autogen.sh --prefix=/usr
>         $ make
>         $ sudo make install
>         
> 
> I got some errors and warnings while doind this. I attached the text
> just in case you are interested.

Thanks for those. I haven't actually packages yelp-tools
yet, so it's not surprising it has a few issues. In this
cases, it's because you don't have the required DocBook
packages to build xml2po's man page. My configure script
isn't checking for them, which is wrong. But I'm going
to remove xml2po from yelp-tools anyway.

>         You should now be able to build HTML with this command:
>         
>         $ yelp-build html *.page
>         
> 
> And it works great! Thank you very much for your help, Shaun and Mike.

Glad I could help, and I'm happy yelp-tools does what you
need. If you have any problems, or need it to do something
it doesn't, please let me know.

--
Shaun