maven-doxia-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukas Theussl <>
Subject Re: List parsing with Confluence parser wrong?
Date Thu, 25 Oct 2007 10:21:50 GMT

Vincent Massol wrote:
> Hi,
> The APT and Confluence parsers behave differently when parsing lists.
> The APT parser generates paragraph()/paragraph_() events for each  list 
> item whereas the Confluence parser doesn't.
> So my questions are:
> 1) Who's right? This is very important since a Sink will output  
> different results if the parsers behave differently

I think in this case the AptParser is wrong. I have recently modified 
the xhtml sink [1] which, before, didn't emit paragraphs within list 
items. I don't see a reason for that since paragraphs are legal and 
significant in list items (ie <li>item</li> is different from 
<li><p>item</p></li> and both are legal and meaningful). However,
AptParser behavior remains to be corrected, it's one of the few reasons 
why the apt module currently doesn't pass the identity test (see DOXIA-134).

> 2) How do we ensure parsers are correct in the events they send?

See related DOXIA-132. We don't have a mechanism yet to test parsing 
events and since doxia is only about events (no object model), I don't 
quite see how this can be done in general. In practice, I think the 
standard is set by the AptParser, and the model emitted by the 
SinkTestDocument, all parsers should try to be consistent with that.

> For 2), we should probably have an abstract test case similar to what  
> is done in AbstractSinkTest for Sinks.

There is already an AbstractParserTest, it currently only does a simple 
check with the WellformednessCheckingSink, but it should be extended.



> For 1) I've checked and it seems TWiki also doens't output paragraph () 
> events for list items.
> So is the AptParser wrong?
> Thanks
> -Vincent

View raw message