[okfn-help] openMilton junk error in lineno view

Iain Emsley print.crimes at yatterings.com
Tue Apr 8 10:51:25 UTC 2008


Quoting Rufus Pollock <rufus.pollock at okfn.org>:

> On 31/03/08 14:39, Iain Emsley wrote:
>> I've nearly managed to get a working copy of Milton's works   
>> (barring  one or two parsing issues) from the Shakespeare code but   
>> seem to have  run into an issue along the line.
>
> Sorry for the delay Iain but I was out of email contact last week ...
No worries.
>
>> I can get the raw and plain views working but each time I try the    
>> lineno view, I get the error from genshi\input.py line 172:
>> raise ParseError(msg, self.filename, e.lineno, e.offset)
>> ParseError: junk after document element: line 2, column 0
>>
>> Does any one have any ideas on what might be an issue or a way of    
>> better "sanitising" the text stream as Genshi handles it?
>
> Hmmm. I think there is an issue here I probably need to clean up as the
> same thing seems to be happening on the main site too. I'll take a look
> and get back to you as soon as I can. For the time being I wouldn't
> worry too much about the lineno stuff as it is not essential (and
> probably should be 'refactored' in any case).
Foigured it out. Line 98 in wsgiplain read:
thtml = genshi.XML(ttest)
It works if it reads:
thtml = genshi.HTML(ttest)
since format.py is returning HTML.
>
However I can't seem to get the annotater to work for me but TBH, I've  
not delved into it too deeply.

Barring the cleaning of some random sentences (which if I add to the  
head phrase the entire text is wiped) and some cleaning up of links,  
openMilton is pretty much ready to be tested.

Iain

BTW, I posted to the other list about your comment about diffing  
texts. I've got a Perl programme now which sort of does it for you in  
a very early stage.

--

Iain Emsley

Blog: www.yatterings.com
Mobile: 07942 259725




More information about the okfn-help mailing list