[publican-list] Publican Windows Issues

Jeffrey Fearn jfearn at redhat.com
Thu Jan 28 22:57:57 UTC 2010


Hi Misty :)

Misty wrote:
> I've got a couple of issues that seem to be unique to Publican Windows. 
> I'm running Publican 1.3, freshly downloaded today, on Windows 7.
> 
> The first problem I found is that if I have a dot (.) in the title of my 
> document in the <articleinfo> sectiion of Article_info.xml, I get a 
> parse error. It looks like this:
> 
> Could not create file parser context for file 
> "Overview_of_the_elev.at_API.xml": No error at Publican/Builder.pm line 498

This error usually indicates that the title does not match the name the 
books was created with.

If you create a book named Foo, then the main file is Foo.xml and the 
title will be Foo. If you change the title from Foo to Bar then publican 
will look for Bar.xml and will not be able to find it.

You can stop publican from using the title as the book name by setting 
docname in the publican.cfg file.

e.g.

docname: Foo

You can then set the title to any value.

I have added a check for the main file to give a more useful error:

Cannot locate main XML file: 'Foo.xml' at /usr/bin/publican line 477

> In this particular instance I wanted the dot, because I was documenting 
> the API at http://elev.at.  Removing the dot resolved the issue, but 
> someone in the Publican IRC channel confirmed that this behavior does 
> not exist on Linux.
> 
> The second problem I am having is with generating a PDF.  Here is the 
> output:
> 
> C:\Users\misty\docbook\elevat>publican build --formats=pdf --langs=en-US
> Setting up en-US
>         Processing file tmp/en-US/xml/Common_Content/Conventions.xml
>         Processing file tmp/en-US/xml/Common_Content/Feedback.xml
>         Processing file tmp/en-US/xml/Common_Content/Legal_Notice.xml
>         Processing file tmp/en-US/xml_tmp/Article_Info.xml
>         Processing file tmp/en-US/xml_tmp/Author_Group.xml
>         Processing file tmp/en-US/xml_tmp/Revision_History.xml
>         Processing file tmp/en-US/xml_tmp/overview_of_the_elev_AT_api.xml
> Beginning work on en-US
>         Starting pdf
>         Using XML::LibXSLT on C:/Program Files/Publican/xsl/pdf.xsl
> Making portrait pages on A4 paper (210mmx297mm)
> 'classpath' is not recognized as an internal or external command,
> operable program or batch file.
>         Finished pdf
> 
> No PDF gets written. I tried Googling for this, but found nothing. I 
> assume that a - is getting eaten somewhere. It is supposed to be 
> -classpath, correct?
> 
> FYI, the HTML builds just fine. Thanks for your assistance!

PDFs have not been tested on Windows :( It requires installing Java, FOP 
and Batik separately from publican. No one has tested and documented how 
to do this.

The issue here is that on Linux you can set environmental variables by 
prepending them to the front of a command.

e.g.

classpath='/usr/share/java' fop ...

This doesn't work on Windows, well at least not in this form. I added a 
check for Windows and removed the classpath from the command, however 
I'm not sure this will work as it requires the classpath to be able to 
find all the Java libraries FOP uses.

I do have a Windows machine, but I don't have the time to test PDFs 
before 1.4 ships :( It should however be closer to working and if the 
classpath is set fully for the shell then it should work.

Thanks for your feedback, and welcome to the list :)

Cheers, Jeff.

-- 
Jeff Fearn <jfearn at redhat.com>
Software Engineer
Engineering Operations
Red Hat, Inc
Freedom ... courage ... Commitment ... ACCOUNTABILITY




More information about the publican-list mailing list