[cowiki-dev] Re: [cowiki-issues] pb in parsing, other issues highlighted

Archie Campbell <[email protected]> Sun, 07 May 2006 15:14:05 +0100
Newsgroups gmane.comp.php.cowiki.devel
Message-ID <445E00AD.1090306__21583.5641873584$1147011253$gmane$org@blueyonder.co.uk>
--------------030708060400050001020503
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Raphael,

I'm disappointed to discover that the errors are a result of your use of 
non-ASCII characters in your coWiki script. This is exactly what my work 
was supposed to fix, so you can imagine my embarrassment!  Unsure how 
this was overlooked, we continue to a fix...

Sorted. Fix appends "<?xml version='1.0' encoding='ISO-8859-1' ?>" 
preamble to the xml from the database in ReverseParser to kick the php 
xml_parser into behaving. Where options fail, an xml tag has worked.

I made another couple of changes: emphasis processing now doesn't rely 
on buffering the intervening string, it just bangs out the tags as 
they're encountered (relies on <origin> output immediately after the 
markup is picked up); fronthtmltransformer processes tables properly, 
had been failing to clear a flag.

Raph - your wiki syntax needs updating: bold now takes two asterisks 
"**bold**" and tables need a newline between each cell. e.g.

<table>
| cell1
| cell2
</table>

Stay in touch.

Regards,

Archie

Raphael Letocart wrote:

> Hi Archie,
>
> The move of the database worked without error, but the result was not 
> very good: the documents and folders have been retrived correctly 
> (except of the %TITLE% constant inside documents, see attached screen 
> shots), but then it was not editable because of lots of xml datas 
> inside...
>
>
> eg : the source of the document (cowiki 0.3.4)
>
>     + %TITLE%
>
>     *Le portail internet des sociétés calédoniennes ((XL Programmation
>     Micro)) et ((Pecsi)).*
>
>     <q>
>     Ceci est donc notre wiki. Son objectif est évidemment d'y mettre
>     en commun toute la documentation, les howtos et outils nécéssaire
>     à notre travail quotidien.
>     </q>
>
>     <table>
>     | <plugin Embed src="/img/world.png" alt="Le Monde"> | <plugin
>     Embed src="/img/nc.png" alt="Nouvelle-Caledonie">
>     </table>
>
> the source of document after migrate to cowiki cvs version
>
> <p><b>XML error: Mismatched tag</b></p>
> <pre>]]><h1><var><name><![CDATA[TITLE]]></name></h1><p><strong><![CDATA[Le 
> portail internet des sociétés calédoniennes 
> ]]><link><idref><![CDATA[19]]></idref></link><![CDATA[ et 
> ]]><link><idref><![CDATA[20]]></idref><![CDATA[PECSI]]></link><![CDATA[.]]></strong></p><![CDATA[</pre> 
>
> <p><b>XML error: Mismatched tag</b></p>
> <pre>]]><q><p><![CDATA[Ceci est donc notre wiki. Son objectif est 
> évidemment d'y mettre en commun toute la documentation, les howtos et 
> outils nécéssaire à notre travail quotidien.]]></p></q><![CDATA[</pre>
> <p><b>XML error: Mismatched tag</b></p>
> <pre>]]><table><tr><valign><![CDATA[top]]></valign><td><colspan><![CDATA[1]]></colspan><![CDATA[ 
> ]]><plugin><name><![CDATA[Embed]]></name><src><![CDATA[/img/world.png]]></src><alt><![CDATA[Le 
> Monde]]></alt></plugin><![CDATA[ 
> ]]></td><td><colspan><![CDATA[1]]></colspan><![CDATA[ 
> ]]><plugin><name><![CDATA[Embed]]></name><src><![CDATA[/img/nc.png]]></src><alt><![CDATA[Nouvelle-Caledonie]]></alt></plugin><![CDATA[ 
> ]]></td></tr></table><![CDATA[</pre>
> <p><b>XML error: Mismatched tag</b></p>
> <pre>]]></document></document></pre>
>
>
> After that, I tried with a fresh install database.
> All errors I send you yesterday was from a fresh database.
> An example of error: I'm trying to create a new document with the 
> following content:
>
>     + %TITLE%
>
>     *Le portail internet des sociétés calédoniennes ((XL Programmation
>     Micro)) et ((Pecsi)).*
>
>     <q>
>     Ceci est donc notre wiki. Son objectif est évidemment d'y mettre
>     en commun toute la documentation, les howtos et outils nécéssaire
>     à notre travail quotidien.
>     </q>
>
>     <table>
>     | <plugin Embed src="/img/world.png" alt="Le Monde"> | <plugin
>     Embed src="/img/nc.png" alt="Nouvelle-Caledonie">
>     </table>
>
> And I got the followin error:
>
> *Fatal error*: Call to a member function get() on a non-object in 
> */var/www/cowiki/includes/cowiki/class/render/class.FrontHtmlTransformer.php 
> * on line *553
>
> *When I remove the links "((XL Programmation Micro)) et ((Pecsi))", 
> the doc is validating correctly.
>
> Regards,
> Raphael
> *
>
> *
> On 5/7/06, *Archie Campbell* <[email protected] 
> <mailto:[email protected]>> wrote:
>
>     Raphael,
>
>     In order to understand what you are describing, I need to know
>     exectly how the error occurs, so that I am able to cause the error
>     for myself, and then I can diagnose the problem.
>
>     So, from installation of latest CVS until the error occurs, I'm
>     going to need a list of all the things you do.
>
>     Importantly, did the setup task described as  'Move old stored
>     wiki representation to new, stricter XML' run ok for you?
>
>     If I can't reproduce the problem, I can't help you.
>
>     Regards,
>
>
>     Archie
>


--------------030708060400050001020503
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Raphael,<br>
<br>
I'm disappointed to discover that the errors are a result of your use
of non-ASCII characters in your coWiki script. This is exactly what my
work was supposed to fix, so you can imagine my embarrassment!&nbsp; Unsure
how this was overlooked, we continue to a fix...<br>
<br>
Sorted. Fix appends "&lt;?xml version='1.0' encoding='ISO-8859-1'
?&gt;" preamble to the xml from the database in ReverseParser to kick
the php xml_parser into behaving. Where options fail, an xml tag has
worked.<br>
<br>
I made another couple of changes: emphasis processing now doesn't rely
on buffering the intervening string, it just bangs out the tags as
they're encountered (relies on &lt;origin&gt; output immediately after
the markup is picked up); fronthtmltransformer processes tables
properly, had been failing to clear a flag.<br>
<br>
Raph - your wiki syntax needs updating: bold now takes two asterisks
"**bold**" and tables need a newline between each cell. e.g.<br>
<br>
&lt;table&gt;<br>
| cell1<br>
| cell2<br>
&lt;/table&gt;<br>
<br>
Stay in touch.<br>
<br>
Regards,<br>
<br>
Archie<br>
<br>
Raphael Letocart wrote:
<blockquote
 cite="[email protected]"
 type="cite">Hi Archie,<br>
  <br>
The move of the database worked without error, but the result was not
very good: the documents and folders have been retrived correctly
(except of the %TITLE% constant inside documents, see attached screen
shots), but then it was not editable because of lots of xml datas
inside... <br>
  <br>
  <br>
eg : the source of the document (cowiki 0.3.4)<br>
  <br>
  <blockquote>+ %TITLE%<br>
    <br>
*Le portail internet des soci&eacute;t&eacute;s cal&eacute;doniennes ((XL Programmation
Micro)) et ((Pecsi)).*<br>
    <br>
&lt;q&gt;<br>
Ceci est donc notre wiki. Son objectif est &eacute;videmment d'y mettre en
commun toute la documentation, les howtos et outils n&eacute;c&eacute;ssaire &agrave; notre
travail quotidien.
    <br>
&lt;/q&gt;<br>
    <br>
&lt;table&gt;<br>
| &lt;plugin Embed src="/img/world.png" alt="Le Monde"&gt; | &lt;plugin
Embed src="/img/nc.png" alt="Nouvelle-Caledonie"&gt; <br>
&lt;/table&gt;
    <br>
    <br>
  </blockquote>
the source of document after migrate to cowiki cvs version<br>
  <br>
  <div style="margin-left: 40px;">&lt;p&gt;&lt;b&gt;XML error:
Mismatched tag&lt;/b&gt;&lt;/p&gt;<br>
&lt;pre&gt;]]&gt;&lt;h1&gt;&lt;var&gt;&lt;name&gt;&lt;![CDATA[TITLE]]&gt;&lt;/name&gt;&lt;/h1&gt;&lt;p&gt;&lt;strong&gt;&lt;![CDATA[Le
portail internet des soci&eacute;t&eacute;s cal&eacute;doniennes
]]&gt;&lt;link&gt;&lt;idref&gt;&lt;![CDATA[19]]&gt;&lt;/idref&gt;&lt;/link&gt;&lt;![CDATA[
et
]]&gt;&lt;link&gt;&lt;idref&gt;&lt;![CDATA[20]]&gt;&lt;/idref&gt;&lt;![CDATA[PECSI]]&gt;&lt;/link&gt;&lt;![CDATA[.]]&gt;&lt;/strong&gt;&lt;/p&gt;&lt;![CDATA[&lt;/pre&gt;
  <br>
&lt;p&gt;&lt;b&gt;XML error: Mismatched tag&lt;/b&gt;&lt;/p&gt;<br>
&lt;pre&gt;]]&gt;&lt;q&gt;&lt;p&gt;&lt;![CDATA[Ceci est donc notre
wiki. Son objectif est &eacute;videmment d'y mettre en commun toute la
documentation, les howtos et outils n&eacute;c&eacute;ssaire &agrave; notre travail
quotidien.]]&gt;&lt;/p&gt;&lt;/q&gt;&lt;![CDATA[&lt;/pre&gt;
  <br>
&lt;p&gt;&lt;b&gt;XML error: Mismatched tag&lt;/b&gt;&lt;/p&gt;<br>
&lt;pre&gt;]]&gt;&lt;table&gt;&lt;tr&gt;&lt;valign&gt;&lt;![CDATA[top]]&gt;&lt;/valign&gt;&lt;td&gt;&lt;colspan&gt;&lt;![CDATA[1]]&gt;&lt;/colspan&gt;&lt;![CDATA[
]]&gt;&lt;plugin&gt;&lt;name&gt;&lt;![CDATA[Embed]]&gt;&lt;/name&gt;&lt;src&gt;&lt;![CDATA[/img/world.png]]&gt;&lt;/src&gt;&lt;alt&gt;&lt;![CDATA[Le
Monde]]&gt;&lt;/alt&gt;&lt;/plugin&gt;&lt;![CDATA[
]]&gt;&lt;/td&gt;&lt;td&gt;&lt;colspan&gt;&lt;![CDATA[1]]&gt;&lt;/colspan&gt;&lt;![CDATA[
]]&gt;&lt;plugin&gt;&lt;name&gt;&lt;![CDATA[Embed]]&gt;&lt;/name&gt;&lt;src&gt;&lt;![CDATA[/img/nc.png]]&gt;&lt;/src&gt;&lt;alt&gt;&lt;![CDATA[Nouvelle-Caledonie]]&gt;&lt;/alt&gt;&lt;/plugin&gt;&lt;![CDATA[
]]&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;![CDATA[&lt;/pre&gt;
  <br>
&lt;p&gt;&lt;b&gt;XML error: Mismatched tag&lt;/b&gt;&lt;/p&gt;<br>
&lt;pre&gt;]]&gt;&lt;/document&gt;&lt;/document&gt;&lt;/pre&gt;<br>
  </div>
  <br>
  <br>
After that, I tried with a fresh install database.<br>
All errors I send you yesterday was from a fresh database.
  <br>
An example of error: I'm trying to create a new document with the
following content:<br>
  <br>
  <blockquote>+ %TITLE%<br>
    <br>
*Le portail internet des soci&eacute;t&eacute;s cal&eacute;doniennes ((XL Programmation
Micro)) et ((Pecsi)).*<br>
    <br>
&lt;q&gt;<br>
Ceci est donc notre wiki. Son objectif est &eacute;videmment d'y mettre en
commun toute la documentation, les howtos et outils n&eacute;c&eacute;ssaire &agrave; notre
travail quotidien.<br>
&lt;/q&gt;<br>
    <br>
&lt;table&gt;<br>
| &lt;plugin Embed src="/img/world.png" alt="Le Monde"&gt; | &lt;plugin
Embed src="/img/nc.png" alt="Nouvelle-Caledonie"&gt; <br>
&lt;/table&gt;<br>
    <br>
  </blockquote>
  <div><span class="gmail_quote">And I got the followin error:<br>
  <br>
  </span><b>Fatal error</b>: Call to a member function get() on a
non-object in <b>/var/www/cowiki/includes/cowiki/class/render/class.FrontHtmlTransformer.php
  </b> on line <b>553<br>
  <span style="font-weight: bold;"><br>
  </span></b>When I remove the links "((XL Programmation Micro)) et
((Pecsi))", the doc is validating correctly. <br>
  <br>
Regards,<br>
Raphael<br>
  <b><span style="font-weight: bold;"></span><br>
  <br>
  </b><span class="gmail_quote"><br>
On 5/7/06, <b class="gmail_sendername">Archie Campbell</b> &lt;<a
 href="mailto:[email protected]">[email protected]</a>&gt;
wrote:</span>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
    <div style="direction: ltr;"> Raphael,<br>
    <br>
In order to understand what you are describing, I need to know exectly
how the error occurs, so that I am able to cause the error for myself,
and then I can diagnose the problem.<br>
    <br>
So, from installation of latest CVS until the error occurs, I'm going
to need a list of all the things you do.<br>
    <br>
Importantly, did the setup task described as&nbsp; 'Move old stored wiki
representation to new, stricter XML' run ok for you?<br>
    <br>
If I can't reproduce the problem, I can't help you.<br>
    <br>
Regards,</div>
    <div style="direction: ltr;"><span class="e"
 id="q_10b09d586a58b843_1"><br>
    <br>
Archie<br>
    <br>
    </span></div>
  </blockquote>
  </div>
</blockquote>
<br>
</body>
</html>

--------------030708060400050001020503--