[pmwiki-users] Wikipublisher error

Nigel Thomas nigel.thomas at preferisco.com
Sat Mar 6 04:26:20 CST 2010


Bernard

My experience in using Wikipublisher in the past suggests that you have used
PmWiki features in such a way as to result in the XML that wikipublisher
generates being invalid. The easiest to spot is unbalanced markup (for
example, using the wiki equivalent of <b> <i> some text </b> </i> which
works in HTML but has to be properly nested in XML <b> <i> some text </i> </b>


I wrote a mini-guide a couple of years ago on how to debug your
wikipublisher problems for the engineers I was working with - here it is
(sorry, cut and pasted from an intranet wiki, and refers to wikipublisher
2.2.2 - but I think the lessons are unchanged).

NB you might want to cross post to the wikipublisher forum
wikipublisher at googlegroups.com.

HTH

Regards Nigel
*
My Wiki doesn't publish: What do I do?*

You have pressed the PDF icon at the top right of the page, or the [options]
button next to it.

   1. On the followup page, you will see:

 Wikipublisher: turn web pages into a PDF file, delivered to your desktop

 Wikipublisher is preparing the ''name of your page'' file for
download. This takes a few seconds for short pages and up to two
minutes for large page collections.

 This version typesets text, lists, tables and images.

 [ blank space for your email ] [email]
 [ download ] [ debug]
 [ back to page ]

 Version wikipublisher-2.2.3: support the project

Normally you either fill in your email address and press [email], or you
press [download] to see the PDF as soon as it is generated.

To debug, press (what a surprise) the [debug] button.

After seeing a message:

Wikibook v1.0.5 is composing pdf; please wait.

The XML is generated and you should either see:

   1. a message saying everything is OK
   2. a message saying “Document at <url> does not appear to be in
   Wikipublisher XML”
   3. an XMLLINT message telling you exactly what went wrong, with the XML
   and LATEX source

This can take a while (especially if it is all going wrong).

If you get an unhelpful message, it is worth checking whether the XML is
valid. WikiPublisher uses a URL like this:(with your wiki name and trailpage
name, of course)

http://www.wikipublisher.org/cgi-bin/mkpdf.pl/http://my.wiki.com/pmwiki.php?action=print&ptype=print&format=pdf&n=GS.GS&PHPSESSID=3e33f5065406e5139547c68e73990be1&wpversion=2002003&email=&DEBUG=(debug)

The mkpdf.pl script is passed a parameter which is the URL that returns the
necessary XML for conversion. Copy the entire URL, remove
http://www.wikipublisher.org/cgi-bin/mkpdf.pl/ and then paste the new URL
into a browser address bar and press Go.
Validating XML

You will get XML data returned. You can now validate this using an online
service such as http://www.validome.org/xml/validate/.

Either save the XML to a file and then upload it to Validome, or simply
paste the URL into Validome. If you see XML entities like &amp; in the URL,
replace them with the real character (&).

   - If Validome can’t process the URL, then probably neither can
   WikiPublisher. You will see an error message like this:

Fatal Error
The Document `http://my.wiki.com/pmwiki.php?action=print&ptype=print&format=pdf&n=GS.GS&wpversion=2002003`
could not load!
Top


   - if you see something like this in the XML:

<!--PageText--><p><visual markup='bf'>Password required</visual>
</p>
<p><!--tbook:p ERROR-->
Password:

then obviously there is a problem with passwords

   - If the document isn’t XML, it is most likely that something is
   unbalanced. Perhaps there is an opening element (eg ''' for bold) but no
   matching closing element; or perhaps two markup elements have become
   interlaced (like <b><i> xxx </b></i>). HTML is quite forgiving, so these
   wiki pages often display correctly, but the transformation to XML doesn’t
   work.
   - if you start to see errors in the XML saying that the document doesn’t
   match the DTD:

**** XMLLINT
1: doc.xml:4: element report: validity error : Element report content
does not follow the DTD, expecting (surtitle? , title , subtitle ,
author* , date? , keywords? , year? , abstract? , meta* , typeset? ,
notice? , summary? , (dm | blockquote | h | tabular | verbatim | verse
| description | enumerate | itemize | p | multipar | hr | group | math
| ch | latex | figure | table | theorem | proof)* , (section+ ,
references?)? , colophon?), got (surtitle title subtitle date typeset
notice hr p hr summary section section section section section section
section section section section section section section hr p colophon
)
2: doc.xml:195: element subsection: validity error : Element
subsection content does not follow the DTD, expecting (heading , (dm |
blockquote | h | tabular | verbatim | verse | description | enumerate
| itemize | p | multipar | hr | group | math | ch | latex | figure |
table | theorem | proof)* , subsubsection*), got (heading p verbatim
CDATA visual CDATA visual CDATA verbatim p verbatim p)
3: doc.xml:242: element subsection: validity error : Element
subsection content does not follow the DTD, expecting (heading , (dm |
blockquote | h | tabular | verbatim | verse | description | enumerate
| itemize | p | multipar | hr | group | math | ch | latex | figure |
table | theorem | proof)* , subsubsection*), got (heading CDATA
verbatim p)
4: doc.xml:305: element subsubsection: validity error : Element
subsubsection content does not follow the DTD, expecting (heading ,
(dm | blockquote | h | tabular | verbatim | verse | description |
enumerate | itemize | p | multipar | hr | group | math | ch | latex |
figure | table | theorem | proof)* , paragraph*), got (heading CDATA
visual CDATA verbatim )
5: doc.xml:316: element subsubsection: validity error : Element
subsubsection content does not follow the DTD, expecting (heading ,
(dm | blockquote | h | tabular | verbatim | verse | description |
enumerate | itemize | p | multipar | hr | group | math | ch | latex |
figure | table | theorem | proof)* , paragraph*), got (heading CDATA
verbatim CDATA CDATA CDATA CDATA CDATA verbatim p itemize p )
6: doc.xml:386: element subsubsection: validity error : Element
subsubsection content does not follow the DTD, expecting (heading ,
(dm | blockquote | h | tabular | verbatim | verse | description |
enumerate | itemize | p | multipar | hr | group | math | ch | latex |
figure | table | theorem | proof)* , paragraph*), got (heading CDATA
CDATA CDATA CDATA CDATA verbatim )
7: doc.xml:408: element subsubsection: validity error : Element
subsubsection content does not follow the DTD, expecting (heading ,
(dm | blockquote | h | tabular | verbatim | verse | description |
enumerate | itemize | p | multipar | hr | group | math | ch | latex |
figure | table | theorem | proof)* , paragraph*), got (heading CDATA
verbatim p)
8: doc.xml:415: element subsubsection: validity error : Element
subsubsection content does not follow the DTD, expecting (heading ,
(dm | blockquote | h | tabular | verbatim | verse | description |
enumerate | itemize | p | multipar | hr | group | math | ch | latex |
figure | table | theorem | proof)* , paragraph*), got (heading CDATA
visual CDATA visual CDATA visual CDATA verbatim p itemize paragraph)
9: doc.xml:468: element subsection: validity error : Element
subsection content does not follow the DTD, expecting (heading , (dm |
blockquote | h | tabular | verbatim | verse | description | enumerate
| itemize | p | multipar | hr | group | math | ch | latex | figure |
table | theorem | proof)* , subsubsection*), got (heading CDATA CDATA
CDATA CDATA CDATA verbatim )
10: doc.xml:478: element subsubsection: validity error : Element
subsubsection content does not follow the DTD, expecting (heading ,
(dm | blockquote | h | tabular | verbatim | verse | description |
enumerate | itemize | p | multipar | hr | group | math | ch | latex |
figure | table | theorem | proof)* , paragraph*), got (heading p CDATA
CDATA CDATA CDATA CDATA visual CDATA verbatim )
11: doc.xml:493: element subsubsection: validity error : Element
subsubsection content does not follow the DTD, expecting (heading ,
(dm | blockquote | h | tabular | verbatim | verse | description |
enumerate | itemize | p | multipar | hr | group | math | ch | latex |
figure | table | theorem | proof)* , paragraph*), got (heading CDATA
verbatim p )
12: Document doc.xml does not validate against
file:///var/www/wikipublisher.org/wikibook/xml/wikibook.dtd

then identify the <section> or <subsection> and try to diagnose the problem:


195: <subsection><heading>Starting the SQLstream engine</heading>
196: <p>To start  your SQLstream server, double-click its desktop icon
or run the script named &ldquo;SQLstreamd&rdquo;, located in the bin
directory:
197: </p><verbatim>
198:     $SQLSTREAM_HOME/bin/SQLstreamd
199: </verbatim>
200: If you have included <visual
markup="tt">$SQLSTREAM_HOME/bin</visual> in your <visual
markup="tt">PATH</visual> then you can just run<verbatim>
201:     SQLstreamd
202: </verbatim>
203: <p>As the SQLstream server is started, your screen will show
progress lines like these:


   - You can see here that at line 200 there is no <p> … </p> between the
   <verbatim> sections
   - This seems to be a Wikipublisher bug. Make sure that [@ code sections
   start on a new line, with a clear separation from the prior line. It seems
   that if the code section toouches the preceding text paragraph that the
   Wikipubisher skin misconstrues things and forgets to put the text para into
   a <p> element.
   - Markup that doesn’t work (note I have inserted a space into [@:
   (example markup follows)

If you have included $SQLSTREAM_HOME/bin in your PATH then you can just run

[ @
    SQLstreamd
@ ]
As the SQLstream server is started, your screen will show progress
lines like these:


   - Markup that does work; note the blank line inserted before *As the
   SQLstream server is started*:

[ @
    SQLstreamd
@ ]

As the SQLstream server is started, your screen will show progress
lines like these:

Binary Chop

If all else fails, use the binary chop method to eliminate parts of the page
until it does print. Eliminate entire markup sections using (:if false:)
.... (:ifend:) conditional markup. Ensure that any “start” markup is always
followed by the matching/balancing “end” markup (eg >>red<< should always
have a balancing >><<
I am PDF typesetting an entire book

You have left the PDF checkbox checked, and then pressed the [Typeset]
button, or you have pressed the [PDF Options] button

   1. Use the steps above to validate the XML
   2. Check that each wiki page in the book can print individually. If the
   individual pages all print, but the document doesn’t, there is a
   configuration or security problem :-(/





On 6 March 2010 08:57, Bernard Bel <bernarbel at gmail.com> wrote:

> I installed wikipublisher on my pmwiki sites so that visitors can create
> PDF versions of the wiki pages.
>
> See the PDF button on page http://ciane.net or
> http://wiki.leti.lt/DanseRecherche for instance.
>
> Unfortunately on either site it generates an error message that I am unable
> to interpret :
>
> -----
> Document at
> http://wiki.leti.lt/pmwiki.php?n=DanseRecherche.DanseRecherche&action=print&ptype=print&format=pdf&authid=wikibook&wpversion=2002016does not appear to be in Wikipublisher XML
> -----
>
> I visited http://www.wikipublisher.org looking for support and posted a
> message on their site but got no reply.
>
> The URLs are properly registered on their site, so I guess that the problem
> may lie in the way I set up the implemented recipe.
>
> Any help would be greatly appreciated!
>
> Bernard Bel
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20100306/efc83683/attachment-0001.html 


More information about the pmwiki-users mailing list